I've been working for the past month on the engine for a 3rd-party adventure / puzzle game. It's early stages, but I've got most of the core 'engine' stuff done, which leaves me with what I'd call the fun part - building the world around it.

Here's a video with FRAPS - click here
The player controls the game using mouse, and keyboard if they wish. You can play entirely with mouse, but if you're a WASD-keys player, you can also move around like that. The idea of the game (eventually) will be to solve puzzles ala point-and-click games of old, such as the Lucasfilm/Lucasarts catalogue of games - Monkey Island, Loom, Sam n Max, Maniac Mansion etc. These games are responsible for my love of computer gaming when I was growing up, and also my desire to learn to program too.
The engine is pretty complex - the main element is a fairly simple, but flexible, scripting system.
The world and the levels/rooms within it are all defined by text file 'databases' which hold lists of all items in the world. I'm storing absolutely everything in these data files - items, player and NPC inventories, rooms, sound fx, music, animation, NPC characters, conversations, etc. (phew!). This seems like the best way to build a large world, however I can imagine when it comes to actually building it, it's going to get confusing keeping track of all those unique ID's.
My latest attempt has been to introduce pathfinding - for instance, if the script engine wants to make a character walk from one side of the room to other, but without colliding with chairs and tables.

After bringing it into the game, it's proving to be quite jerky due to the character following the zig-zag of nodes without a smoothing effect. I could introduce more nodes in a scene, but this will just slow things down.
My plans for the pathfinding are to reduce the nodes in a scene to 2 or 3, and to only use them if no direct path is found, ie. by testing a linepick every 5 main loops or so. The problem with linepick is where there appears to be a direct route, but there is a steep valley inbetween the player and the target. Any tips on how to go about pathfinding would be really helpful, as I'm still not sure...
|