Asteroids clone-ish

Hi All,

My latest game project is a little Asteroids clone. It’s an attempt to make a small enough game that I’ll actually finish it, and an experiment to see if I can do some reasonable graphics in a web game.

As of October 2017, it’s done! If you want you can give it a try here. Any feedback is welcome!

14 Likes

Nice! I like the graphics. I’m not sure if I like the fact that the bullets also wrap around the edges of the screen.

2 Likes

Nice screen shake effect. Very juicy!

2 Likes

graphics are very cool, how did you make them?

2 Likes

That looks lovely. I’d make asteroids polygonal or just more bulky. And I’d reduce collision area of the ship to a circle inside it.

2 Likes

Thanks a lot guys!

@britzl - Hmm, I never even thought about making the bullets not wrap. Do they wrap in the original? I did make the bullets last a very long time, so maybe that’s the issue. Your ammo/energy regenerates slowly over time, and you get a shot’s worth back when a bullet hits something. I was trying to encourage accurate shooting and penalize random blasting away, but maybe it’s just not fun. I’ll fiddle with it.

@Tomires - Thanks! It’s a very simple camera shake, I just offset the camera randomly within a radius every frame, and linearly reduce that radius to zero.

@loren.hopkins - Thanks! They are just painted in photoshop.

@sergey.lerg - Also thanks! Do you mean the “asteroids” are too small, or are you just talking about their appearance? I’m not sure about their design yet. I was thinking of using a shader to make them look like jelly blobs, but more traditional polygonal rocks would be simpler . . . I’m not sure about the collision area, wouldn’t it be weird if things passed right through your ship? I actually made the ship longer on purpose because I like how you can turn sideways to slip through small spaces (or fail to do so).


I updated the build late last night with some new button graphics. No more dumb white boxes! I still need to remove the “quit” button in the main menu, it doesn’t make any sense in a web game does it . . . :dizzy_face:

4 Likes

Yes, about appearance and the shape difference makes it more fun to avoid them. Now they look like small planets.
If you can make it so they actually get splitted (split the actual mesh), I think that would look cool. Compound objects.

Why not keep the button green when the mouse is over it?
Also I suggest changing the movement of the brackets when you select a button - make them spread apart. So the corners would go not only left and right, but up and down. And make it so that the brackets don’t touch the button when unselected, otherwise they are visible under the button texture.
I like the button label movement, how about aligning all the text to the right when unselected and to the left when selected?

Smaller collision area in my opinion makes it more fun to play, it’s more forgiving and you have more “almost crashed” situations.

I also noticed that the game over explosion doesn’t wrap around the edges, easy to fix?

4 Likes

@sergey.lerg Thanks a lot for the detailed critique! I will work on that stuff.

  • Real splitting of the asteroids would be cool, I’ve seen games like that, but it might be more work than I want to do, I’ll look into it.
  • I wanted to change the text alignment on the buttons’ text but couldn’t figure out how to do it smoothly before I moved on. I was thinking I would need to get the pixel length of the text somehow . . .
1 Like

gui.get_text_metrics_from_node() is the function you’re looking.

3 Likes

Really nice game!

I am not sure if I got that wrong, or the game really miscalculates the score. When I die, it shows a different score than on the upper right.

3 Likes

Hey, thanks! Good catch. I actually fixed that yesterday but didn’t upload the changes, I will do that now. The problem was I made it so you destroy the “asteroid” you run into, but forgot that you would get points for that. :smile: (and that score came the next frame so it didn’t get included in the player death message.)


Britzl to the rescue as always! Thanks! I guess I should read through more of the API docs.


Speaking of updating, I’m not sure if anyone else around here uses Itch, but they have a little command line tool for uploading your builds and it’s pretty nice. It creates a patch and only uploads the changed data, which saves a ton of time if you have terrible internet like I do. Plus it’s faster to type in one command than to go through the website, upload the new build, delete the old one, etc.

6 Likes

Cool! I didn’t know this. Thanks!

1 Like

I got a fair bit of work done on this in the last week or so, though a bunch of it was behind the scenes. I spruced up the “asteroids” with a simple blobby shader and some particles:

I like the look, but I think the shader is causing some performance issues on lower spec machines, so I may have to do something else.

I shrank the player’s collision shape by a couple pixels as per Sergey’s suggestion. It’s not noticeable unless you compare the versions directly, but it makes the game much nicer to play. :tada:

I also started implementing sound! Thanks to the new HTML5 stuff I was able to go through javascript and have a lot more features than Defold does out of the box. First I used blip, but once I set it up I realized it didn’t have some features that I really wanted, so I switched to Howler, which seems to have everything I need and is still very light. At the moment I just have a few sketchy placeholder sounds in the game and no proper pausing or anything, but I’m excited for the possibilities. Big thanks to Mathias Westerdahl and Pkeod for showing me how simple it is to use javascript libraries now!

I also put together some basic enemy behavior, but none of that is in the game yet. I’m sure I’ll have a bunch of re-balancing to do once I add them.

5 Likes

Jelly asteroids, yummy!

2 Likes

I’ve been quiet for a while, but not slacking. I actually think the game is nearly done, my to-do list is mostly down to small tweaks! Here’s what I’ve done in the last two weeks:

  • Added “Bumble-blob” enemies - they putter around more or less minding their own business and dodging asteroids, but occasionally decide to run into you when you’re not paying attention.
  • Added enemy ships or “Hunters” - these guys show up after a certain time delay—which gets shorter with each wave. They actively hunt you down and fire seeking missile-blobs at you. They’re very dangerous, but also pretty fun to dogfight with.
  • Added scoring stuff - I may change exactly what stats are recorded, but the functionality is all there. It keeps track of your last scores, best scores this session, and all-time records, and there’s an option to clear your scores. I also added wave number and time displays to the in-game screen.
  • Added a transition between asteroid waves - now there are blinking indicators to show where the asteroids in the next wave will appear. (Note: unfortunately these have a bug with their animation. I think it’s this engine bug, but maybe I’m just doing something stupid. )
  • Fiddled with the default splash/loading screen a bit. My html and javascript skills are minimal, so I’m not sure if I will change this much more. It’s a nicely functional loading screen as-is.
  • Added a tiny bit of acceleration to the steering controls - it may seem a little bit weird at first, but it gives you way more precision at small increments, while still allowing you to turn fast.
  • Added real sounds. There are a couple sounds still missing, and an occasional bug with pausing the engine sound, but the most important stuff is present and it almost sounds like a real game now!
  • Added an annoying performance issue - The game generally runs fine on the machines I’ve tested it on, but they all get occasional huge lag spikes for several seconds. I’m not sure what’s causing this, but I think it’s the sound stuff causing some big garbage collection delays? It’s kind of random and only seems to happen once per play session, so I haven’t been able to profile it yet. If this sounds familiar to anyone, please let me know.
  • Spent many, many hours tweaking game balance stats and a bunch of other little things. Mostly the enemy spawn delays and their progression, health, mass, movement speeds, behavior, etc. It’s a hard game, but hopefully not crushing, and hopefully with a decent difficulty curve.

If anyone takes the time to playtest this (link here or in the top post) I would appreciate any feedback you have, especially regarding any usability problems, “what the heck just happened?” moments, or glaring quality issues. I’m hoping to have this polished up for release on Kongregate in a few weeks.

I’ll try to get some cool action gifs up here soon. Sorry for the wall of text!

7 Likes

I like it!

But I found that I was mainly standing still and moving as little as possible because the ship was so hard to control!

It would also be nice if you could use the same button that you are shooting with as for clicking “replay”

Nice work!

2 Likes

Thanks! Yeah, tiny key taps are kind of the name of the game. I will fiddle with reducing your thrust or maybe just capping your top speed, but no guarantees. Very good point about using the fire button for the UI, and a very easy fix. I also made the escape button behave as you might expect in any given circumstance.

Here’s a “cool action gif”, as promised.

6 Likes

Cool, cool! Maybe add velocity damping, so the ship will stop after some time?
And maybe mouse control for the direction?

2 Likes

I kind of forgot about actually releasing this! I finally just fixed the last couple small issues and made in public on itch. First solo game actually finished!

I guess it has a pretty steep learning curve and isn’t very appealing to most people, but personally I’m really happy with it. It’s now one of my favorite ways to waste a few minutes of my life! :smiley: I may possibly make a desktop version at some point with more features—local multiplayer, other input methods, other game modes, etc. One of my dream games now is to have an Escape Velocity type game with this kind of fast and satisfying combat, though those two things are probably contradictory . . . :slight_smile:

7 Likes