Hello my readers! It’s been another exciting week in FTD development. Those collision problems I had last week? No more. Those weird issues I had with the character’s movement? Vanquished! I’m happy to say that most of the problems I struggled with last week are gone, but as is always true in game development more have emerged. However, before I delve into what problems I’m running into currently, I’m going to cover how I ended up fixing previous issues.
Last week, I struggled with two issues: one, collision with the Light character and the walls, and two, the Light character continuing to move, despite the player releasing the movement key. I realized that the Light wasn’t colliding with the walls because only the wall object had instructions for colliding with the Light. For collision between a character and a hard surface to work in Game Maker Studio both objects, the surface and the player, must feature collision events referencing each other. By defining collision with the wall in the Light object, I was able to fix the first problem.
The second issue, the character’s continual movement, was fixed by assigning a key release event to the movement buttons. After a key is released, the character stops moving, until a key is pressed again.
Now that I have those issues out of the way, I have several other problems I must tackle. Bugs aside, there were two things I wanted to get done last week. I wanted to implement all four characters into the game and set up the mechanic for the Darkness appearing randomly in rooms. I was successful in getting the four characters into the game, but I do not have their abilities functional (except for the Runner). I also don’t have the ability to control one character at a time and switch between them on the fly. Currently, the player is in control of all four players at once. When one moves, they all move in the same direction, and I don’t want that.
While I have a few ideas about how to go about fixing the character control issue, I’m not entirely sure how I’ll get the Darkness to appear randomly in the rooms. In my own pseudocode, this is what I think needs to happen.
- Create a global timer object (timer1)
- Create another global timer object (timer2)
- Create Darkness object and sprite
- Set time1 object to count down from 60
- Create a room object and sprite
- Create multiple instance of the room object, but assign them different names, ie Room1, Room2, Room3 etc.
- Link room object to timer1
- Assign randomize function to room object
- Assign replace sprite function to room object
- When timer1 reaches zero, replace room sprite with Darkness object and sprite
- Have timer2 go off so that timer1 is repeated
I think this approach is the best way to get the random Darkness appearance function to work. At this point I’m not going to code the Darkness to kill anything or destroy rooms, I just need to make sure that I got the random mechanic working. I need to get the random mechanic working perfectly, because later I’ll be implementing the glyphs, which determine the chance that the Darkness will appear in a certain room.
Problems aside, I ended up getting a little sidetracked and started messing with some of the basic HUD elements of the game. Below is a mock-up of what the HUD might look like.
As useful as HUDs are, even the best designed ones get in the way sometimes. One of the functions I want the player to have is the ability to toggle the HUD on and off. I went ahead and created one of the HUD elements to test out the toggle feature, in this case the game’s timer.
Now I know once I work on the HUD in the future, I can give the players the ability to toggle the HUD on and off at their own whim. So what’s on the FTD development menu for this week? I have three items I want to have implemented by next Sunday.
- Get the randomized Darkness appearance mechanic working.
- Limit player’s control to one character at a time
- Get some of the other character’s abilities implemented.
Well, that about wraps things up for this week. There are a few official Game Maker tutorials that I think will help with the development of FTD, but I am open to suggestions and tutorials on Youtube/Vimeo/etc. If you see a tutorial that you think will help, by all means, send it my way! It will be appreciated. USCF over and out.
Post commandeered by the US Claire Force