The End


The Beginning

Quick into, I am a professional software engineer. I've developed all sorts of things, apps, websites, firmware for embedded systems, but I couldn't ever really grasp game dev. I tried Unity tutorials in the past, but only really succeeded in the tutorial. I used GameMaker Studio for this and I think it is tons simpler than unity, obviously they were made for quite different types of games. So here I was with GameMaker, instead of trying to go through a tutorial again I just went with the quickstart guide and some super simple free sprites.

The Idea

I really didn't know where this was going. I just thought, what's the simplest game mechanic I can think of. My mind went to little contra style shooters, but a side scroller with levels was much too complex for someone going in blind, so I just stuck with the jumping out of the way of bullets. I had a bullet in the sprite sheet, so I made it into a game object while following the quick start guide, got it to move around the screen, and dug through the manual to figure out I can just call one function to get it to move anywhere on the screen. So I had my way of moving them towards a player.

Development

Overall, once I got the hang of objects and events and scripts things started to move along. I was importing sprites, made my background (the orange walls and purple floor), got the player to jump (a bit more math than I expected) and was moving towards a playable game.

My First "Unique" Problem

Once I had the player moving around on the screen and I had bullets spawning and shooting, my bullets just kept going through walls. I couldn't figure it out, I set up invisible walls (because the visible "walls" are technically just the background), and I had the collision event programmed so the bullet would disappear once it hit the wall or the floor. I check my events again and again, I googled to see if anyone else was having this problem but couldn't figure anything out...

So I decided to try making a different game object, yep the bullet collides with it just fine. So as I'm going through I find out that every sprite has a "collision mask." This is the part of your sprite GameMaker is checking to see if objects have collided. Well GameMaker Studio is smart and it will make your default collision mask a rectangle around the non-transparent part of your sprite. So my fully transparent invisible walls had no collision mask which was why my bullets went right through them.

Small Assets Issue

From there development was relatively smooth, the game is quite simple so I was just adding in the controls until the game was decently playable. The player could jump over bullets and I had a playable prototype. Now to do some polishing I added some text hints and boy was the text ugly... It still doesn't look great when the game starts, but it looks quite good on the title screen and my logo screen looks alright.

Well these Urizen sprites are 12x12 pixels. So to make them look decently sized what did I do? Well the right thing to do would have been just scale up my sprites to a reasonable size for an HD display. Pixel Art scales perfectly fine. I could blow up the 12x12 to 144x144, made it 12x the size and it would have looked exactly the same.

But instead I changed my game resolution to 360x204, so that my 12x12 tiles fit perfectly in the room. Now my game window was ridiculously small, so I set the fullscreen option. GameMaker automatically upscales everything so now my tiny game window looked great! Pixel graphics perfectly maintained. Except that it's upscaling 360x204 --> 1080p... So now when I draw text on the screen, it's drawing the text on a tiny screen and upscaling it 5.3x and now I have blurry funky looking text. I already did everything at the low 360px resolution so it would have been more work than I was willing to do for this prototype to fix and upscale all of that. But I was able to upscale my logo fade in, the title screen, and the credits screen up to 1366x768 resolution, so all the text and assets look reasonably good on an HD screen.  So for all future games here, I'll definitely start with scaling up my assets so that I don't get ugly text and the other issues that come with it!

The Upscaling Problem...

Well I did upscale the Fade In Logo, title screen, and credits screen... But not before I had already made them at the 360x204 resolution. But there weren't that many assets to scale for these so it was easy enough. Except that now my game launches at 1366x768, and then changes to 360x204. And now I'm actually dealing with 3 resolutions....

  • GamePlay Screen => 360x204
  • Launch Screen => 1366x768
  • Monitor Screen => 1920x1080

Now all the text that shows up in the game was positioned relative to the GamePlay screen. meaning the "midpoint" of the screen was 180x102. But now that I launch at the 1366 resolution, even when it got to the game room all my text was just sitting out in a corner at 180x102! Now GameMaker is smart enough to scale up all my sprites, but it draws the HUD/GUI (where I wrote all my text) was still at 1366x768. I decided to keep it that way hoping it would fix my blurry text problem, so I had to go refactor all the code writing text to fit the new GUI. And shame myself a little bit as a pro software engineer for not making my draws agnostic to the screen size! But this is what experimentation is all about.

Learnings

So to wrap all this up, I went from very little knowledge about making games, to this relatively playable game!

  • I've learned the basics of GameMaker Studio
  • I should take screenshots of my issues during development so that I can add them to write ups like this so that it's not just a wall of text!
  • I should always start with an HD resolution and upscale my graphics. It'll be far more difficult to upscale afterwards.
  • Focus on organizing code. GameMaker uses a different script for every event on every object, so managing data is crazy important. I was jumping around so much looking for where some code lived because I didn't really have any organization in this.

Now with some experience making this game, I think I better understand how to control things on the screen. So when I'm playing another game, I could think about how I would program similar actions in a game of my own.

Get Dodge That Bullet

Leave a comment

Log in with itch.io to leave a comment.