Thursday, March 10, 2016

Information for you, sir.

So I haven't told much about my game other than it having epic spells, "living" AI and things to build from items to cities and governing of cities, what I've yet to tell you is that as you, the player, can be mostly anything in the game and I'll try to make it interesting, of course being a peasant can get quite dull after some time but you can always move on from that from a peasant to a dictator having peasants.

What I'll try to achieve in this game is a living world where the npcs can do something big which can change a city by a lot, for example an npc finds a book of undead and decides if he should start reading it or not, if the npc begins reading the said book he will probably change into a necromancer and built a cult somewhere near the city and most likely attack the place after the npc has gained enough power. This might sound big and very scripted, sure there is "scripting" involved but I'll try to make it very random on how it will proceed based on the npc's personality.

There is also a concept of good and evil but its not based on what we declare what is good or evil but
based on the religion of the village, which can change over time, a village might find cannibals saints and people who help others evil.

Speaking of religion the gods of a religion might or might not exist at all depending on how many believes in a god of specific religion, by this way it is possible to make the people of a vast land believe or fear you so much that you might gain divine powers, what you can do with these divine powers I've yet to design but one possibility is creating a new race (which should be easy as everything is random generated), it would also be possible that npcs could disguise them as you or some other god and gain popularity in areas or possibly even overthrow you as their god.

Now you might think that doing all this is impossible or a project that will last for an infinity, you might be right but that's why it's called a seemingly impossible project. All of the things above need careful planning and designing before they can be programmed and I've already began doing all the planning and designing. Most of the world will be simulated in a very high level by using time as the controlling variable, everything important like kings and queens, leaders, necromancers, people you meet, people you love, people you work with are simulated in a low level so they actually do stuff in the game, the more you are involved with an npc the finer the npc is simulated.

Of course that's not all there is to the game as you can do all sort of things from crafting to skinning beasts, you will level up your skills as you do a specific task over and over, for an example if you poke enemies with your dagger enough you will be a master poker and a master in using daggers but you also gain better skill to weapons in the same category of one-handed weapons.

That is all for now, in a moment I'll forget everything and I'll have to read all of this before I can continue working on the game again, but hopefully at some point, at some, most likely a distant year I've finished this project (Seriously though I'll be working on this game every week and most likely everything here that I mentioned might be removed or changed, who knows).

Wednesday, March 9, 2016

Rivers, streams and more optimizations

I found a way to optimize the noise function I'm using by reversing how I calculate it and without calling it for all the cubes in the same X and Z coordinate in one chunk, but just changing the Y calculation in the end of the noise function. This allowed me to create the heightmap 100 (or something like that) times faster.

Why I began poking around the noise function was because I'm trying to add water to the game but
adding rivers and streams is very hard (at least making it fast enough), so incidentally looking for a way to add rivers via heightmap I found the optimization, although it didn't help me much in adding the rivers. I need to add some sort of flood fill algorithm to the noisemap to add rivers (streams are harder) and modify the values accordingly, though this is quite hard as overflow of the water can happen easily...

I also received new GUI graphics from Samuli which I have to add to the game, but before that I have to reprogram the GUI framework so I can modify the GUI more easily and add more features to it as well, I'll also add support for players to modify the GUI.

Here's also a webm of the trees that I got working in the game, I'm a little worried on how much objects I can actually let the player see before it fries their GPU.
View post on imgur.com