Day_9Creating a character, and rewriting a lot of codeHey all.
I've been quiet about this project for a while, mostly because it took a long time to actually decide how to proceed with it. If you remember the first posts, I talked about how I rendered the world only using software. This mean that the graphics card idles, while the CPU is working it's ass off. For low resolution games, this is fine. But for this project it became more and more apparant, that most people probably would not be able to run it because of software rendering. My own beefy i7 laptop had trouble rendering the world at satisfying speeds.
So, I decided to give the LWJGL library a shot. LWJGL stands for lightweight java openGL library, and is essentially a wrapper around openGL for java. OpenGL being a high performance graphics library which uses the graphics card to render stuff, meaning it is way faster for most people. There was one problem. None of my rendering code was set up for openGL. this meant that a lot of code has to be rewritten, and a lot of new code had to be written.
The end results are very nice, so the effort was defiantly worth it.
After boxing the new rendering code into place, I decided to actually add a interface to create the world, and create a character for the world. OpenGL allowed me to scale the resolution up to something proper, instead of what I was using up to now, which was about half of what the screen was.
The biggest change in the main menu is that info box. I don't know if I will keep it or not. It is quite useful for new version info in the future.
I decided to make full use of openGL and actually render the world in the preview window of the world creation menu.
(Please don't mind the darkness, I will explain it later, it will get fixed)
I make full advantage of this in the character creation page, here the map automatically jumps to the starting city location when you toggle between them. This should give a really nice way of exploring the world, and starting locations.
Now for some of the visual goodies openGL opened up for.
Here is the reason for why the world was so dark in the preview. The world starting date is year 0, month 0, day 0, at 00:00 am, which means it is night. OpenGL allowed me to implement a neat day/night effect. There is also a bunch of other effects thrown in for good measure. Fake ambient occlusion (The darker ocean areas). Fake waves, and wave specular reflections, and so on.
Here is the world in the evening again:
Here is one at midnight.
I also implemented a bunch of other things. Such as entities now actively attempt to get married, there is space for improvement, but it works for now.
Last screenshot is how the game looks when rendering it at a higher resolution, I don't know what resolution I will go for. Time will tell..
(The world looks derpy because I was playing with the world generated when I made that screenshot)
That is it for today.
I'll work on making the character take its first steps next time, and I will probably add actual buildings to the cities too, the player and world entities can visit.