ID:272134
Apr 8 2008, 11:56 am
|
|
I am a beginner coder and i want to make a game with waves of monsters coming in and players setting up defences to stop them. i need a base wave system that i can customize myself but will make it so enemies will spawn at 'start' spot and wander. thanks
|
For things like this, it's best to start with a simple version of the game and go from there. Test each version before getting it to the next level.
So your game might evolve like this: 1. A game that allows you to login and say hello. 2. Added: a map with only grass. You can now wander around on the map. 3. Added: dense objects. You can now wander anywhere but on their tiles. 4. Added: a "create fire" command. You can now cause a flame object to appear on the map next to you. 5. Added: a "spawn enemy" command. You can now cause a creature to appear on the map. 6. Added: a start area. The "spawn enemy" command now places an enemy in each start area tile unless it is already occupied. 7. Added: enemies now move towards the player. 8. Added: enemies now delete when they bump into flame objects. 9. Changed: the "spawn enemy" command is now called "start game". It now places an enemy in each start area tile, then sleeps for a while and repeats this action as long as the player's mob is alive. So the trick to being an experienced coder developing advanced game systems is to make something you know how to do, then learn how to do something new to it that is a small change. |
This is 'Developer How-To', not 'Code Request'.
As for the wave system... essentially a procedure would be used to start a wave (create certain and/or # of monsters), probably by using for() in conjunction with /list, and then wait for the next wave by sleep()ing or while() if you'll be using a variable to know if someone wants to go to the next wave quickly.