Asterocks v2 with Sound!

Share your games and programs with the community.

Asterocks v2 with Sound!

Postby yodasvideoarcade » Thu Aug 07, 2014 5:02 pm

I just finished another classic game in a fully ported version: Asterocks aka Asteroids.

Here's a screenshot:

Image

It features up to 32 asteroids on screen, rotating spaceship and thrust + hyperspace (use with caution!), plus the large and small saucers that shoot at you. Each level has more asterocks and meaner saucers. Be a bit patient when you die, it may take a while before you re-appear, because you only appear when there's enough space around you. Since the screen is small, it may take a few seconds.

Biggest problem in programming was the 4k limit of ram. Since the rocks move in different angles and speeds, it basically needed to be floating point variables in a 32 sized array, which means: x, y, xspeed, yspeed each times 32 = 128 times 4 bytes per value = already 512 bytes of ram. Since I started with up to 64 rocks on screen (only later I read that the original arcade game has even less than 32 on screen at a time!), it was 1024 bytes -> much too much. So I had to come up with a solution to "simulate" floating point without using it. What I did is to handle the action on a virtual screen that is 8 times the size and at drawing-time divide positions by 8. The result is that I can use integer values for speed and positions. Get it? If not, doesn't matter. Just enjoy the game.

Latest Update: Real sounds added! Enjoy the game.

If you like it, I'd be happy to recieve some comments and donations on Paypal to yoda@yodasvideoarcade.com
Last edited by yodasvideoarcade on Sun Sep 07, 2014 12:32 am, edited 2 times in total.
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: Asterocks

Postby yodasvideoarcade » Thu Aug 07, 2014 5:28 pm

I forgot the controls:

A - shot
B - thrust
left/right - rotate
down - hyperspace (be careful, you may appear in an asteroid, use only in emergency)

To prevent discussions: Yes, I'm aware that ripper already did a version of the game. I found that a lot of things (ufo, lives, levels etc.) are missing in that one. Also I never wrote an Asteroids-game and since it's my favourite arcade-machine I was quite interested in coding it as a learning-piece and also wanted to play it on the gamebuino.

Enjoy the game!

Btw, it's quite hard!
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: Asterocks

Postby Matrix828 » Thu Aug 07, 2014 6:12 pm

How do you bring out these masterpieces so quickly?
Do you already have them programmed for another platform and just work some magic on the code?

Love your work :D
Matrix828
 
Posts: 43
Joined: Tue Jul 22, 2014 7:44 pm

Re: Asterocks

Postby yodasvideoarcade » Fri Aug 08, 2014 9:10 am

Thank you for your praise!

I code them from scratch, including graphics and everything. I don't have them on another system.

I'm working on a game about 2 hours per day.

I'm quite experienced in game-programming, maybe that's why it's going quite fast. But still there are some bugs costing me a lot of time and frustration. Yesterday the saucer-routine was not working and I searched for more than 1 hour to find the bug. It was a =! instead of != typo. Aaargh! I really would appreciate a gamebuino emulator for Mac, so I don't have to upload the game to the board every time I want to test.

I made a lot of games for Atari 8-Bit systems years ago. At the moment I'm creating Yoda's Video Arcade, a website where you can play old-school retro-style games I made, online play of course, no download. My goal is to get that website to make some money so I can focus on gamedesign full-time.
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: Asterocks

Postby qubist » Wed Aug 13, 2014 1:32 am

Hey. Nice game.

It works great but I think it's too fast. Everything is too sensitive. Could you make it match the original more, or open your source so I could tweak it? Thanks!
User avatar
qubist
 
Posts: 31
Joined: Thu Mar 27, 2014 1:58 am
Location: USA

Re: Asterocks

Postby ripper121 » Wed Aug 13, 2014 12:34 pm

qubist wrote:Hey. Nice game.

It works great but I think it's too fast. Everything is too sensitive. Could you make it match the original more, or open your source so I could tweak it? Thanks!

The source is in the zip file included.
http://www.yodasvideoarcade.com/gamebuino.php
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: Asterocks

Postby yodasvideoarcade » Wed Aug 13, 2014 2:57 pm

You can simply change the frame-rate, that makes the game slower.
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: Asterocks v2 with Sound!

Postby yodasvideoarcade » Wed Aug 13, 2014 3:43 pm

Changed the frame-rate a bit lower. And added real sounds! More fun now!
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: Asterocks v2 with Sound!

Postby Skyrunner65 » Wed Aug 13, 2014 3:51 pm

I would play this, but 2 things hold me from doing so:
1. Can't compile the emulator!!!!
2. Don't have a Gamebuino (just yet!)
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: Asterocks v2 with Sound!

Postby 94k » Wed Aug 13, 2014 4:01 pm

You can run the emulator in wine, just install wine and prepend wine to the emulator command.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany


Return to Games Gallery

Who is online

Users browsing this forum: No registered users and 12 guests

cron