7 Days to a Game ~ Day 7! Slap Happy is done! I’ve got a contest for free games too!

  Welcome to the last day of the first video game project I’ve ever done! I’ve done lots of work on games in the past but they’ve always been other people’s games. This time I set down and thought of something silly and I made it! This is a very proud moment for me and while it is super silly and kinda lame I am very happy.

  It’s not every week that I can sit back and see something solid that I’ve finished. I may even come back to the project in the future and make a “Slap Happy 2”. There are some fun things that could be added like sounds, higher widescreen resolution, choose your face (and I could probably add importing faces) and difficulty settings!

  But as with all things you don’t want your eyes to be bigger than your stomach and I didn’t want my brain to be bigger than my abilities and of time. If you think it will take you 10 minutes it will probably take you 10 hours. That’s a bit of an exaggeration but trust me you will always screw yourself if you think you have a grasp on the depth of a project.

  Today I’m going to go over the final tweaks to Happy that were made and the way the game works. After that I’ll provide a link and then I’m going to play Borderlands 2 or something and just laugh the night away. Next week will probably suck but today I’ve got something to be giddy about. To me that is what Happy is about.


    First we’ll take a look at the resources that were used in this game. You will recognize most of them and I’m just going to go over what each one ended up being.


  The tutorials I took when I first got gamemaker suggested using a signifier for objects so that you know what they are. This is why I add “spr_” before all of the sprite models. When you are coding later this is helpful because you don’t accidentally pull an object when you were trying to pull a sprite. It also means you can type “spr_” in GML and see a list of all your sprites because they all start with the same name.

  I will exclude spr_ to reduce a bit of redundancy in this bit. (Thanks man!) wall is an object only visible while we are working in the room window. It is otherwise invisible. happyhappy is the default state sprite for happy. When happy is not getting the shit slapped out of him or winning the game he is happy. happyslappied is the sprite resource used when we score a pimp slap on happy.

  snowball is the sprite for snowballs and we only have one. We used scaling in this project to give the illusion of it growing instead of using separate larger sprites (which would have been jerkier. If you get confused by my use of “we” its simply because you have been following me along during this journey so I am speaking about the project in that manner. Anyways.

  happyslapper is the neutral state for your cursor. You actually cannot use custom cursors on the free version of game maker so I got a bit clever. Basically I turned off the mouse cursor in the general settings and then had this sprite always exist in the x/y coordinates of where the mouse currently is. Voila!

  scoreboard is the bar that we displayed all the score information on. The font is terrible but I was more interested in functionality than looks for most of this project. Looks takes a lot more time than function and has a lower rate of return.

  happyscored is the face I suspect the real life happy makes whenever he scores. So I used it for when he’s laughing heartily at the end of the game. (There’s an end? Yes! See below!)

  happyslapperslap is the alternative image for the slapper when it gives Happy the ole slap. Not much else to say there.

  bg_happy is the background we used for this project and includes the snow and the crystaline background that I expertly crafted from difference clouds, color balance, and another filter that I don’t remember the name of. Or wait no I totally painted it from scratch.


  The objects is where it gets real exciting. We have the wall which literally does nothing on its own. The script for it is on happy instead. I felt it was better to centralize the things that happy is doing or having done to him all on him so that I can find them all easily. Duh-right? happyhappy Is happy. I would rename him to just happy now that I have the final project done and realize I only need him as one object but this is a vestige of the first stages of the project.

  I didn’t quite realize how well I’d be able to optimize it in such a short time. I’m sure if I showed you my final code for a lot of this (and assuming you knew anything about coding) you’d probably crap yourself laughing at how ugly it is in relation to my previous sentence.

  snowball is the object for the snowball and the second busiest object in the game next to happy himself.

  happyslapper is your mouse! It literally only does 2 things! It follows your cursor and it alternates between two images. There is a small bug where it doesn’t alternate properly but it has no impact on gameplay. I’ve maximized the accuracy of the slapper and it should now be between 0 and 1 pixels from the actual tip of your mouse cursor. Originally it was off by – well – lets not talk about how off its been this entire project. Yes. There is nothing to see here…


(Goddamnit! I said nothing to see here!)

  scoreboard does nothing but stand there and look cute. score, life, and timer are all busy bodies that keep the important data of this game (and indeed are crucial to making it feel like a game). Without them you are just mindlessly clicking something and really it is more of an artistic statement at that point and I’ll be damned if anything I’ve ever done will be seen as art. I’m far too hair brained for that. hue hue

  happyroom is the room where all the objects have been dropped! I even placed the slapper outside of the zone so that if the game loaded slowly on some archaic old machine it wouldn’t be seen just sitting in the middle of the screen mysteriously. I doubt anyone is loading this shit up on a commodore 64 but if they did we’d be set! (It would also probably lag them to hell and back).

  So what about changes? What did I do today to finalize the project? Glad you asked!

  Mostly balance tweaks. Happy no longer shrinks or changes speed when you click him. The game was speeding up far too quickly and becoming too difficult to have fun with them in the game. We’ve also changed happy back to his original ellipse hit box! This is because of the next changes.

  Happy speeds up constantly as the game moves on and it will become progressively more obvious until he hits his maximum speed. He will also be slowly ramping up how fast he throws snowballs and how fast those snowballs move! Originally I had worked out some complicated math involving frames and growth and things were looking a bit like rocket propulsion in my files. Then I had an epiphany.

  There is a size I want the snowball to be when it “hits” you. Why not just find out what that size is and then set the snowballs – no matter how fast they are growing – to detonate at that point? Turns out that I was able to make this accurate within an error of less than a 10th of a % of the original butter zone! The discrepancy has to do with the game not doing anything “in between” frames and how fast Happy can start throwing these little bastards.

  So basically there is an ultimate point where Happy is going to crush your face in with super sonic snowballs. How long can you last? How many points can you rack up? These become the challenge! Happy also does not speed up when he bumps into walls but instead does it when he changes course. This is because the additional speedup from him hitting the walls caused him to hit maximum thrust in a matter of seconds. Happy isn’t a two second sheriff – he’s got lasting power.


  We can’t end this without talking about Happy’s last alteration (that I can remember, I tweaked a lot of things today). It’s perhaps my jolliest moment of the entire project because it signified the end of this arc and just how I felt about the whole thing. It allowed me to immortalize someone that I may or may not work with again and gave me a chance to blow off some steam instead of the alternative (venting endlessly about a particularly terrible human being I’m forced to be around 5 days a week).

  When your hands ache and the last life has been balled out of you. Happy prepares for his iconic moment – the duck hunt moment. I nearly gave him that same laugh.


  To put things simply. The script first turns off the alarms related to Happy so that he no longer does anymore checks (to reduce burden on your computer). Then we have him stop moving because moving is for suckers. Next we put him dead center in the middle of the screen.

  After that we start a delightful loop! A variable that I initialized in his create code begins to work! The game checks to see if he has 4 units of happyvictory and if so it sets him to his scored sprite and resets the victory to 0 where he will then switch to the regular sprite the next time the script runs. Any other time it will increase the value by 1.

  This is basically a really messy alarm that I wrote on the fly and I think it works delightfully well. Plus the more I use the scripting section the more I start playing around with strange ideas to accomplish things. Rube Goldberg machines of all shapes and sizes.

  I actually needed a screenshot of the game for this last bit and found myself plowing away trying to get the highest score I could manage. You get some serious finger fatigue in this game. Here is my best.


  I’ve run the game dozens of times and don’t see any errors. I removed a lot of redundant code today to improve stability and performance. There was a mysterious lag spike after about 280 or so seconds but that has since been fixed. I believe it had to do with object screen limits and has to do with why I gave Happy maximums for hurl speeds on snowballs. GML apparently has about a 50 object limit before it starts to blow chunks (or so I’ve read).

  How about you? Give the game a shot and post your best score in the comments below. Anyone who records themselves playing and uploads their video to YouTube with a link back to this webpage (http://theios.net) will be entered to win games on steam! Check out my profile on steam to see what games I have for trade and those are what I can (or will) currently choose from to giveaway. Note that this deal is while supplies last, void where prohibited, also void with people who are rude, bots, cheaters, North Korean dictators, and basically anyone trying to be uncool.* The more impressive your performance the better the prize I’m likely to choose for you [if you win]! So be like Happy! Enjoy life and get your balls out there for everyone to see!

  Snowballs I mean.

  Don’t like – show your balls – that’ll probably get you prison time.

  As before you can find a link of the game here! The installer should work but if it doesn’t just post a comment and I’ll get it fixed. Sometimes it gets corrupted on upload. Feel free to run it through AV programs and so on. If it asks you to allow access through your firewall you can tell it no and nothing should break. There is no netcode running in it so I’m not sure why it even asks. Maybe with version 2 we’ll add a leaderboard on the website!

  I’d like to thank tumblr for becoming possibly my most favorite place on the internet now. Anytime I have an emotion or a thought I can type it into tumblr and find tons of delightfully relevant images. It has really kept me entertained while writing these over the last week. To all the folks who use it – Thanks!

*Also if you aren’t sure if the offer is still good you can email me or ask here (or in my latest post) and I’ll happily tell you if its still good : ).

[ Table of Contents]

Day 6 – 7 Days to a Game ~ Day 6! Scores, Time, and Lives! It’s a game!

Day 5 – 7 Days to a Game ~ Day 5! This game has (snow)balls!

Day 4 – 7 Days to a Game ~ Day 4! Testing / Bugs / Variables

Day 3 – 7 Days to a Game ~ Day 3! Development and Testing!

Day 2 – 7 Days to a Game ~ Day 2! Art Assets.

Day 1 – Preparations

0 0

Lost Password

Please enter your username or email address. You will receive a link to create a new password via email.