Time Throttle: POC Milestone

posted Nov 13, 2017, 9:22 PM by Good Idea Games

This weekend I reached a new milestone with Time Throttle.
It's Fully Playable, and it's FUN.
Here's a short video showing off what's going on in a match...

Of course I have a lot of work left to do... All of the VFX are just recycling the same smoke and flame objects, I don't have all my sounds in place, and the game only works while supervised. There's a lot that can go wrong. For the love of god, don't unplug a controller after the game starts. My game pad support is so janky you basically have to reboot ;^).

But it WORKS.

Time Throttle: Dev Journal 16

posted Nov 7, 2017, 11:16 AM by Good Idea Games

I ran into an issue with engine noise that I can't explain, so I've posted to a few forums for support.
Once I get that sorted out, I can move forward on SFX, but for now...

So my proof-of-concept is almost complete, BUT.. the time throttle isn't *really* working.
Don't tell anyone, but it's just a series of hacks that give the appearance of time throttling.
In reality, left trigger reduces the game's frame rate, which *literally* slows down time in the game.
This is pretty Okay, as long as I can keep the game's frame rate smooth.

The right trigger is supposed to be a local acceleration... it applies to your pawn, and a small area around it.
This isn't doing that at all. In reality, I just up the player's speed, acceleration, reduce their cool-downs, and up the pitch of their sound. I mean... technically I'm doing all the things that an actual time-speed-boost would do, BUT... I'm not creating an AOE around the player that can speed up bullets.
I want that.

So it's back to the drawing board for the Time Throttle.
The Time Grenades *are* working, and produce the desired effect...
Any object that enters one has it's active properties effected by a certain 'time factor' and when they leave, the difference is restored. They even stack nicely!

So... what if left trigger creates a grenade effect that's centered on the player, and just happens to be large enough to cover the entire screen? It should work.

With some simple (read as 2-days) augmentation of the grenade, I updated the code to allow the time_factor to change dynamically based on player input, and continuously augment the motion of those affected objects. 

The tragic draw-back is that this much activity is overloading my desktop, and driving the game down to like 10 frames per second. 

I'm going to do some optimization and troubleshooting before I move on.

Time Throttle: Dev Journal 15: SFX

posted Nov 5, 2017, 3:53 PM by Good Idea Games

The time has come to implement Sound Effects to Time Throttle, and it's been interesting.

The first thing I did was implement background music, and tie the pitch to the game frame rate.
My global time manipulation mechanic is a hack, and just reduces the game's frame rate. By doing it this way, it was extremely simple, and produces *all* the side effects that I want... a general slowing of everything that the game does. It's a terrible solution, but I'm still running a proof-of-concept. If the game is fun, I can do this in a better way.

After that, there were a few simple SFX to implement... cannon fire, grenade fire... 
These were also simple. My audio wizard Lara Barden put together some SFX for me.

Next, for the engine noise I needed something special. And Stupidly complicated. It took me more than 3 hours to get it working right. This was dumb, and for a POC that will have like 4 players, it was a waste of time... but I learned a lot. 

The sound of a VW engine is special and unique, since my POC vehicle is a rocket powered bug, I needed to capture the unique sound of an idling air-cooled bug engine. I ended up ripping the sound from a youtube video, and breaking it up into different loops using audacity. I have one loop with an uneven pace, and one loop with an even pace. Then, I set the two sounds to play in order, a random number of times each. It worked out perfectly, and I created an idle engine sound that doesn't sound like a single looping track!

Next, I have a rocket engine. So I created a rocket engine loop (youtube+audacity again) that plays when the player is applying thrust to their craft. This did *not* work.

After a few hours of troubleshooting, I had to turn to reddit for help.

Time Throttle: Dev Journal 14

posted Nov 1, 2017, 10:13 AM by Good Idea Games

I've reached a major milestone!
My core game loop is complete. The game can start, play, end, and return players to the selection screen again. Hooray!

I've also implemented basic bullet trails for time throttling and background music with tempo tied to the time throttle as well!


Upcoming features: full SFX, additional vfx tweaks.

Time Throttle: Dev Journal 13

posted Oct 26, 2017, 5:11 PM by Good Idea Games

Things have come along nicely for Time Throttle in the past week.
I've got the memory hole patched up, and gameplay-wise, the POC is complete!
... But I still have a bit of work to do before it's ready for sharing.

I need to implement a menu system so players can load in, set the game mode and track, check the controls, and set their colors.
I need to augment the victory condition so it honors the players' choice.
I need to generate a Victory menu, so the players can see their performance after the match.

I still need to implement sound. the game is completely silent at the moment.
I need to implement additional VFX for player craft, forward thrusters need to generate smoke and trails as well.
And most importantly, I need to implement sound and VFX for the global time slow.

And after that, it's bug fixing!
This is really coming together.

Time Throttle: Dev Journal 12

posted Oct 15, 2017, 10:10 PM by Good Idea Games

Things are getting interesting!
I've implemented the first of my necessary VFX, flame and smoke.
This was important, because I need some on-screen effects to slow down, to give the appearance that time is slowing, not just speed.

This means that my flame and smoke need to be 'objects' that can store the data necessary to receive and recover from a time modification. And consequently, this has shown me that I'm not properly destroying my data structures, and when I create 120 new objects per second (smoke+fire) I have a massive memory leak. This means the game doesn't recover the memory it's used, and the footprint just steadily increases.

It has to be fixed.

Also, my flame and smoke sprites are too small and symmetrical for any animation to actually be noticedm so the desired effect of animation slowing down isn't happening. But I can fix this.

Also, I have a local speed boost on the right trigger, but it doesn't get undone... so using it permanently boosts your ship's clock time, reducing cool downs to ~0. Good Times!

Here's a video!

Time Throttle: Dev Journal 11

posted Oct 12, 2017, 9:36 PM by Good Idea Games

I've reached a major breakthrough with Game Maker!
After so many hours in this tool, I've become familiar enough with the debugger, error messages and documentation to troubleshoot most of the issues I've run across. This feels *incredible*.

POC 2 of Time Throttle has made massive strides in the past 48 hours.
  • 1-4 players are supported, rendering in unique colors and on unique spawn pads
  • Players are scoring laps
  • Player scores are decremented when hit
  • Players can shoot Time Grenades out the rear of their vehicle
  • Time Grenades cause an AOE slow effect for objects touching them
  • Time Grenade effects are tracked on the affected object, and removed when no longer colliding
  • The effects of multiple time grenades can stack
Now I'm working on getting the Left Trigger, Global Slow working.
Player craft still get stuck to obstacles :^(.

Time Throttle: Dev Journal 9

posted Oct 10, 2017, 9:07 PM by Good Idea Games

This tutorial covers the basics of inheritance in Game Maker.

I've got a problem where the player object gets 'stuck' on obstacles in the game. I *suspect* this is because a collision causes some small amount of overlap, and ends up locking the player object in place.

If I apply move_bounce_solid(true) to the player object, this applies a good bounce effect, but this 'automatic' bounce doesn't reduce speed, so a fast moving player starts to bounce like a pinball. Not the behavior i'm looking for.

So I need to write my own collision handling code. This is a good opportunity to learn about inheritance.

The practical purpose is to put my player collision code in a parent object, so all player objects inherit the same collision properties.

I also augmented the YoYo Games Recommend Controller Implementation to create additional player spawn pads in a vertical row, preventing new players from spawning atop one another.
obj_spawn_pad is a non-solid starting line whose purpose is to posess x,y coordinates where a player should spawn.

if !(instance_exists(player[pad]))         // Check to see if an instance is associated with this pad index
        //Create a new spawn pad, located on top of starting spawn pad
        instance_create(obj_spawn_pad.x, obj_spawn_pad.y, obj_spawn_pad)
        //Identify instance number of new spawn pad
        player_pad_instance = instance_find(obj_spawn_pad, pad)
        //move spawn_pad down, according to player number
        player_pad_instance.y = player_pad_instance.y - 80*pad
        // Create a player object, spawn it on the new spawn pad, and assign it a gamepad number
        player[pad] = instance_create(player_pad_instance.x, player_pad_instance.y, object_player);
        with (player[pad])
            image_index = pad;
            pad_num = pad;

Dev Journal: Time Throttle 8, Drawing the HUD

posted Oct 10, 2017, 12:13 AM by Good Idea Games

There is no shortage of tutorials for Game Maker, but every project is different, so not all tutorials will work.

I'm working off of This lovely tutorial, which mostly worked, except I am also using NAL's Multiple-Object-Camera, which means my view window is always changing.
So fortunately I found this post on Reddit, which described my situation, without giving me a solution.

Long story short, my game has a view window of 1024x768, so I can hard-code my GUI elements to fit that screen.

//Player 1 HUD Data
draw_sprite(ui_top_left_spr, 1,0,0);

//Player 2 HUD Data
draw_sprite(ui_top_right_spr, 1,1024,0);

//Player 3 HUD Data
draw_sprite(ui_bottom_left_spr, 1,0,768);

//Player 4 HUD Data
draw_sprite(ui_bottom_right_spr, 1,1024,768);

//Top Center HUD
draw_sprite(ui_top_center_spr, 1,(512),0);

//Bottom Center HUD
draw_sprite(ui_bottom_center_spr, 1,512,768);

Next Step is to draw player score data in a layer on top of the UI elements...
A little bit of Trial and Error, and I found the x,y positions of the little screens on my UI elements, and I could place my score text...

//Draw Player 1 score

... use your imagination for the other player scores.

This worked out perfectly, bringing me to my next step: Tracking player scores.

I have a player_parent object, that contains a set of score and statistics variables that the player_objects inherit. 

I went to the cannon_ball object, and created a step to handle what happens when the cannonball touches a player object. This did not go smoothly, but once again, Google saves the day. And this one helped too...

But then I hit a snag, and spent about 2 hours just trying to get the scores to display on the screen.
Now it's bed time, but I got a lot done today.

Dev Journal: Time Throttle 7

posted Oct 6, 2017, 5:35 PM by Good Idea Games

With the help of the Game Maker asset store, copious research, and smashing my head against a wall until the wall made sense, I've made some great progress in POC2 for Time Throttle.

At this point I have a 1-4 player, gamepad enabled top-down shooter with basic time manipulation.

Player hovercraft are floaty, and operate as if floating in space. The handling is pretty good.
Bullets bounce indefinitely, reducing their speed as they do so.
Left Trigger slows time globally, Right Trigger accelerates time globally.
The camera zooms in and out to ensure all players remain visible on the screen.

But there are still some significant issues I need to fix before I can consider this proof-of-concept complete:
Player craft get stuck when they collide with obstacles.
The time grenade just drops a 4 second AOE around the player. I'd like it to shoot forward, and detonate with player releases the 'a' button.
Still no scoring. I'd like players to earn 10 points per successful lap, and lose 1 point per bullet they collide with.
Also sound. I need some sort of sound effects.

No game end conditions. I think a 1 minute timer is a good place to start.
This weekend is set aside for family time, so I won't be able to continue development until next week.

Helpful Resources:
Angular momentum demo: this helped me get my non-physics craft operating smoothly.
Multiple-Object Camera: my first imported Game Maker asset, this freebie isn't *perfect*, but it's fantastic for my POC. It took a complicated problem away immediately.

1-10 of 56