Programming without planing everything through has finally taken its toll. I have to scrap most of the editor code, leave the PC, grab a bunch of paper sheets a pencil and thing everything through.
This time the problem was that I didn't differentiate the edit mode from the game mode, which lead to serious complications (the code worked fine but the logic behind it didn't).
In this version you could change the entities on the fly without having to worry about it making any sense later but on the other hand you could also edit entities that shouldn't be editable and once a game run it preserved its state and didn't reset.
What I'm gonna do now is use the game engine as it is, take out the editor related stuff and rebuild it so that while editing will take place inside the engine, it won't be held at game runtime. I think it'll be easier to manage editor logic like this. All the previously existent features should still be possible right now, but running the game during the edit mode won't be possible that easily, it'll have to save the level, reset the world and load game from the saved map, and then do the same when entering edit mode. It'll still be faster than closing the program and loading the map again since all the textures used in the map will be kept.
This is also another thing my engine has: preserving resources between levels. After a level finishes loading it'll just delete the resources noone asked to load and thus shortening the loading time.
That's all for today. I doubt I'll update this blog until I make significant progress.
See ya in a week or two!
~Spliter
Monday, March 8, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment