I’m working on a game in which the enemies - creatures living in dark caverns - can evolve over time.
(I’ve shown work in the Discord Channel from time to time, but wanted to make a dedicated topic here as well.)
The creatures are generated in Blender via code. Each creature is generated from a fixed set of values (it’s “DNA”) which determine its exact look. I can then merge different DNAs or mutate them to get new DNAs, from which I then generate new creatures - this can be thought of as mating creatures and creating their - slightly different - children.
I am confused, however: You say that the creatures are developed in Blender–but also that the creatures evolve over time in the game. How do you achieve the latter given the former? Do you update the game with new creatures every so often?
Yeah, the current plan is to have the generator on a server. The player’s actions are sent (as an anonymized summary) to the server and influence the creation of the new generation of creatures there. The creatures are then sent back to the players.
With that said, the process is still not set in stone. As I’m developing this I’m noticing more and more how much fun one can have with the generator - I might distribute it with the game somehow…
I thought about it briefly, but it would be extremely difficult, since I rely on a lot of blender’s functionality to speed up the process (not just the mesh creation functions, but also UV-unwrapping, automatic bone weight assignment (at least for some bones), the material nodes and material baking). I’d have to reinvent a lot of wheels, and this game would never see the day of light.
Theoretically, I can build blender as a python module and then I should be able to include the generator in the game. I’m not sure though, I heard blender’s licensing might prevent me from then selling the game (I haven’t double-checked this), but it would probably be the way to go if I want to include it.
However, there’s one major thing to consider: One person will probably never generate enough data to meaningfully influence evolution. You would have to fight every creature (and ideally, multiple times) of a generation before the next generation can be created.
I would much rather aggregate results from multiple players.
(And indeed, do check that license before you decide to include Blender with your program! You don’t want to learn that renders makes your game illegal to sell only after taking the effort and time to incorporate it!)
I am intrigued and surprised that your game features such slow evolution, so slow that one player will likely see little of it–that could make for an interesting set of player-experiences, and an interesting life-cycle for the game, I think. It’s pretty neat!
And indeed, given such slow evolution, I think that it does make fair sense to keep the generation on the server-side.
There is, however, always the risk of the servers going down, and I imagine that they’ll likely be shut down entirely in due course. What then of players who want to play after that point? Will the game still work for them? I presume that there would be no further evolution available, alas…
Your point is a good one, but I think it’s true for most modern online games - they just rely on a server.
I do want the game to work independently of a server, of course (no “always-online” mode!) but I haven’t figured out yet where/how to do the creature generation in that case yet.
What I’m actually more afraid of is that I won’t have a constant player base and the game needs to work similarly if there are only 10 players playing or 1000. That’s also another thing I still need to figure out - I might have to rely on simulation somehow (i.e. playthroughs are simulated based on a player’s style in order to collect enough data).
But I don’t worry about these things too much at the moment, because right now it’s still way too early to tell how much I need to tweak/control the evolution. I first need to add some brains to the creatures and then make some gameplay!
Yes, but this is a thing that I would rather we didn’t aspire to.
It’s something that limits players’ abilities to play a game when they see fit–both in terms of required connectivity and in terms of server availability. Further, it’s something that impedes the archiving and preservation of games.
The fact that others are doing a thing doesn’t mean that said thing is a good idea.
This is, however, good to read!
Hmm… A thought: What about offering the server-side program as a free download, with only the client-side game being paid for?
Hmm… That’s a good point.
What about having evolution occur based on time rather than number of playthroughs, with more playthroughs simply providing a richer source of input data?
I fully agree with your point that it’s not good many games rely on a server. However, I do think it’s fair when this is basically a multiplayer aspect (which it would be in my case - the players are creating the “world” together). I.e. I would have a very good, meaningful reason to use a server.
The offline playable part will probably be based on downloading many creatures once and then making them available to the player. This is also useful in the case of new players - they shouldn’t have to start by playing against the newest, smartest, toughest creatures…
Yes - offering the server-side program is an option I’m considering. I might even make the generator open source after release… we’ll see.
Evolution will be based on time, yes, because I want the game to always progress. However, if there is too little data then this might simply be “random” mutation of the creatures without real progress…
Since I started working on an armor/damage system (having more scales can now actually protect the creature more, i.e. it has a gameplay influence!), I also wanted impacts to look slightly more impressive.
Visual effects are WIP and impact is slightly exaggerated here, but I like how the creature’s procedural animation allows me to offset hit areas!
In this video, I put the creatures through their first real tests - they are placed into a cave with magical turrets that attack them relentlessly.
They then have to evolve defensive strategies to get better at surviving against these turrets.
The good news is that most of this DevLog takes place right inside Panda3D!
It would mean a lot if you could check it out, and please do share with friends!