Something went wrong. Try again later

HelicopterSpy

This user has not updated recently.

172 358 19 3
Forum Posts Wiki Points Following Followers

My Adventure In Learning To Make A Game

Let me start by saying this: At this point last week, I knew next to nothing about coding and scripting a video game. I had toyed around with BASIC when I was a kid, like I think we all did but never really got too far with that. I made a few stupid flash games, but again, never anything serious. This past Saturday though, I thought I might try to make something in earnest. I downloaded the Unity engine, but found that was way over my head. I took a step back and wound up at the LÖVE2d framework. Löve works in Lua, a lightweight scripting language mostly used for game mods rather than full games. It's quick to learn and can get you where you need to go, for the most part. Mari0, the game that gave Mario a Portal gun was made using Löve.

So, Sunday, I spent the day just watching a video tutorial on YouTube and copying it exactly. Goature's Make Your Own Gamespecifically. He explained the basics pretty well, but went about some things in a sort of roundabout way, he admits that most of his experience is in Garry's Mod scripting, so he explains things based on that. It helped me greatly just understanding how Lua and Löve work and how they work together. I was on my way, but I wasn't content just following what he did exactly.

Monday was the start of my first real project. I figured a good, fairly simple game to ape would be Galaxian, the predecessor to Galaga. I called it "Fauxlaxian". I quickly whipped up a few sprites, made a few controls and that was pretty much all I knew how to do. Left arrow moves left, right arrow moves right, space bar draws a little square that flies up at 2 rows of 5 completely static aliens. Nothing happened when the shot hit the alien. Hit detection, as it turns out, is a bitch.

The real problem is tables. In the video tutorial that I watched, the guy only ever called for the data from one table at a time. But I needed to call from the Aliens table and your player's Shot table too. This took a lot of trial and error and way way way more frustration. I turned back to things I knew how to do. I made the aliens fly down at the ship at random times, I scrolled Löve's surprisingly comprehensive help wiki until I finally found how to do it. Let me tell you, solving a problem, even one as simple as this, that has had you frustrated and hating yourself for hours feels amazing. Now the shots connected, the aliens died and your score went up. It was looking more and more like a game by the minute.

Wednesday, the aliens started shooting back. There were levels, sorta, each time you cleared all the aliens, they'd repop right at the top of the screen. You'd die if their shots hit you. It was a shitty game, but a game none the less. Since then, I've made between level screens, had it get harder with each level, made a title screen and seen the compiler error screen more times than I can count. Either I forgot to write "Then" in my if statements, or I wrote = where I meant == or I miscapitalized a function or variable or whatever. It's becoming a genuine thing though.

There's still a lot to do though. Restarting the game after you die causes a huge memory leak and the framerate takes a nosedive. This is actually a fairly common problem for me. If you call too many tables at the same time, it starts chugging even though it's a stupid little 2D shooter on my iMac with 4 GB of RAM. Also it looks like pure garbage. I've spent probably about 10 minutes total on the art. Yesterday, I decided that instead of playing on a flat grey background, you should be flying above the clouds on a sunset colored sky. I'm gonna take the art from there. I also have sorta insane plans for a story, but I'm gonna save that for if I make it that far.

This was far too long. I'll keep at it and keep you guys posted if you want. Hell, everything I'm using has been free, except Pixelmator, so make your own damn games already.

4 Comments