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.

Dev Journal: Time Throttle 6

posted Oct 4, 2017, 11:39 PM by Good Idea Games

With last night's discovery, I doubled down on my mantra: fail fast, fail often.
I was sure that the physics sandbox is where I want this game to live, but I haven't proven that the concept is fun. 

So this evening I rebuilt the game without physics.
This was actually incredibly easy.

I've got my POC2 complete, but I'm luke warm on it.
There's a global slow and speed-boost, and AOE slow-zones, but my 'quick and dirty' player controls aren't too fun to work with.

Tomorrow I'll work on improving craft control, some sort of scoring, and adding multi-player.
But for now, here's Time Throttle POC2:

Dev Journal: Time Throttle 5

posted Oct 3, 2017, 11:01 PM by Good Idea Games

My first POC is not a success, but I've learned some great things.
Most relevantly, the 'cheap and easy' way to implement slow motion is to speed down the frame rate of the room. This works on sprite animation and on 'conventional' Game Maker games, but when using physics objects, their behavior is not bound by frame rate.


Dev Journal 4: Time Throttle | Game Maker Alarms

posted Oct 2, 2017, 11:48 PM by Good Idea Games   [ updated Oct 3, 2017, 7:43 AM ]

Development is coming along well!

I've got a hovercraft that can move around in a Game Maker physics environment, operated by a game pad left stick!
This hovercraft can shoot cannon balls in any direction the player pushes the right stick!
The cannon balls are also physics objects, and interact with crates and barriers!
This was harder to do than it should have been.
I'm still not manipulating time yet, because I've got a little bug to work out.
My cannon fire cool down is not working as intended, and it creates like 10 projectiles in the time it should create one. Then it doesn't stop. 

It's frankly hilarious.

I think the solution to this problem is Alarms.

Dev Journal: Time Throttle 3

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

Grenade Effects and Splash Damage
There are 2 core elements to the game, first is a global slow-down, which should be easy enough to implement (though I haven't started). Second are grenade-style AOEs that affect movement/animation speed of any object that enter them.

Game Maker has a lot of built-in functions to handle this sort of thing, but the trick is learning which one is appropriate for my situation.

Gamepad input
This has been a lot more complicated than I expected, because Time Throttle uses Game Maker's 2D physics to handle object interactions, which precludes the use of direct object manipulation, which is what basically *all* the tutorials assume you are doing.

There's a 50 minute tutorial on creating a physics based drift racing game... I'll check that out.

Studying AOE effects

This one taught me about Alarms. I'm never surprised to learn about how little I know.

Sprite Depth: To allow the 'Time Bubble' to lay over all game objects, except generator towers 
TLDR: Set 'depth' of an object during a step event, NOT during a draw event OR as a property of the object. Which is weird.

Implementing gamepad input:

Dev Journal: Time Throttle 2

posted Oct 1, 2017, 7:56 PM by Good Idea Games

Progress comes along!

I want to talk a little bit about some of the resources that I'm using to make this demo.

First, I've chosen to build in Game Maker 1.4. Is that the right tool for the job?
I believe the the right tool for a job is the one you know how to use. This doesn't quite scale, but it's especially true for personal, non-commercial experiments. While Game Maker 2 has some sexy new features, there are *years* worth of development tutorials and troubleshooting posts on Game Maker 1.4.
If I want to fail fast and iterate quickly, Game Maker 1.4 is the way to go.

This is just a proof-of-concept demo. If the concept is worth building on for commercial release, I'll probably want to refactor the code after I'm not so rusty anyway. I can pick a different tool at that time.

My Game Maker skills are *rusty*, so I'm building off a nice tutorial.
Top-Down Shooter by rm2kdev: It's and 'intermediate' tutorial, so it doesn't explain *why* the designer made the choices they did, but his use of the Game Maker physics modules make it a particularly appropriate tutorial for my project.

I am using very basic art assets. I want to make sure the *mechanics* are fun on their own. Time Throttle should be a pleasure to play mechanically... just moving through the world should feel good. With no lovely art to distract you from the mechanics, the flaws in the game will stand out nicely.

Expanded Resources:
My very first Game Maker tutorial was this series by the wonderful Tom Francis.
Tom has used Game Maker for a few steam hits, like Gun Point, Morphblade, and the new Heat Signature.
He doesn't know it, but because if this tutorial series, he's basically become my friend friend.

1-10 of 51