Post news RSS Sonar game experiment

Experimenting with new game ideas. Started on a new sonar-type game.

Posted by on

After seeing all the recently sonar games that have started development, I decided to try my hand at it. Here's what I've got after an hour and a half-ish of work:

Hosted by

Hosted by

Kinda looks like some complex form of Pong if you look at it right.

Anyways, it's a lot less forgiving than the models that others are using. It requires the sonar pings to bounce all the way back to you (meaning if you move, chances are you'll miss out on some pings) before you can see the object they pinged, pinged objects disappear after about 2 or 3 seconds (including enemies!), and each use of a ping requires you to wait until all of the pings disappear before you can use another one.

There are also enemies in there that are the same size as the player currently, and they will restart the game on contact (until there are more levels, when it'll just restart the room). I think I'm going to adjust both them and the player to be half the size.

Minor coding oddity. For some reason, my algorithm for ping generation in a circle actually requires me to go all the way to 42, rather than 36, even though I multiply the ping's number in order of creation (starting at 0) by 10. If I didn't, there would be a chunk of pings missing from the top-right section of the circle.

Here's the snippet:


if (keyboard_check_pressed(vk_space) && !instance_exists(obj_ping))
    for (ping_count = 0; ping_count < 42; ping_count += 1;)
        ping_dir = ping_count * 10;
        with (instance_create(x, y, obj_ping))
            direction = other.ping_dir;

Not really sure what went on there, but I'll figure it out, I'm sure. :)

Feel free to download it and try it out.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.