I spent a lot of time thinking about how to implement entities into my level design pipeline. Right now I have my game set up to import .bsp format meshes for the levels, and a bsp converter to create collision objects from those meshes. So I can design the level in Radiant, bake in lightmaps and use it in-game. But I have no pipeline for the placement of entities.
I considered a few options.
1. Use Radiant. Either try to jimmy-rig some way of using the built-in Quake 3 entities,
or grab the source for the whole program and mod it. That would be a lot of work but very educational.
2. Use 3ds Max. It would be so cool and such a great skill to write a simple plug-in for exporting.
Again, a lot of work and learning. Nothing is simple with that program...
These two options are both attractive to me because I love learning and garnering new skills. But I feel I need to keep with the kyuplex philosophy, simplicity. Interfacing with either of these programs would be very complicated, when the needs of kyuplex are quite simple. I spent some time researching all the options, and even looked at CopperCube, a world editor from the makers of Irrlicht. I liked the in-editor lightmapping ability. An important part of level design is being able to see what it looks like quickly. CopperCube was cool, and even had an embedded javaScript api. But in only 20 minutes of playing with it I abruptly bumped up against the edges of its capabilities, and got that feeling of being confined to the inside of a box, with only a few shiny toys that I can't disassemble : [
In the meantime, I began implementing a save / load system for kyuplex. I began by experimenting with ISceneManager->save/loadScene (...) but even this built-in functionality was overkill. I wanted something simpler, so I just wrote my own saveGame function that creates a custom XML save file. Very simple.
Granted, it will grow a bit in complexity as the game continues to develop. And it's not exactly hacker-safe either. Anyone with half a wit and some curiosity will quickly realize how easy it is to mod this file and cheat, but this doesn't matter to me. If players want to cheat, I say OK. Kyuplex is open-source and 100% transparent. In fact, I want to encourage experimentation with the game.
Anyway, this process of casting aside powerful tools created by others for the sake of building my own led to me back to the original question about placing entities in levels.
Thus I have decided to go for door number 3:
Create my own in-game editor.
Again, it doesn't need to be fully-featured or complex. Just enough for the needs of kyuplex : )
I'm so naturally an engineer. I want to research and learn about all the tools that are available, experiment with them, understand them, and then turn around and go design my own from the ground up, in the way I see is most ideal.
Oh, and I had a huge refactoring fail that sucked up the better part of a day. I tried to connect my kxClasses hierarchy to be directly derived from the irrlicht classes. My plan was to utilize ISceneNode::serializeAttributes in conjunction with the ISceneManager::save/loadScene. It simplified the code in some places, but led to a whole host of new problems. I gave it a few hours of debugging before throwing in the towel and reverting back to a separate hierarchy linked with a pointer.
No comments:
Post a Comment