Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - [Coding competition 2018] Astroswab by hang-on

Reply to topic

Rate this entry!

1 (Poor) 0% 0%
2 0% 0%
3 0% 0%
4 6% 6%
5 0% 0%
6 25% 25%
7 37% 37%
8 18% 18%
9 (Excellent) 12% 12%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12330
  • Location: London
Reply with quote
[Coding competition 2018] Astroswab by hang-on
Post Posted: Tue Mar 27, 2018 10:46 am
Description:
One day it just happened: Giant, flaming rocks swirling through the atmosphere and crushing everything in their path! There is talk of an alien invasion - people claim to have seen flying saucers and hi-tech guided missiles. Who can we depend on to swab the sky clean of danger? You guessed it... Swabby is back!

The objective of the game is to score as many points as possible. You guide Swabby the snail through different areas of increasing difficulty, while shooting down asteroids, missiles and even the occasional UFO. Be sure to grab the juice, cakes and other bakery goodies – they will boost your score and make Swabby shoot even faster. Don’t let the flaming asteroids (the so-called spinners) reach the ground!

Please refer to the included instructions sheet for full details on scoring, controls and helpful hints.

Controls:
Move Swabby left or right with the d-pad. Press button 1 to fire. Pause and reset the game with the corresponding buttons on the console.

On the high score list, browse through the letters with the d-pad, type a letter with button 1 and backspace with button 2.

Highlights:
*) Random scene selection creating up to 54 unique playthrough experiences.
*) 100% homebrewn assembler code, graphics and sound.
*) Battery-backed, 10 position high score table with initials input.
*) Swabby is back - this time with quick, upgradeable shooting abilities.

The following modifiers apply :)
Cover art included = + 20% awesomeness!
Source code included = + 256% awesomeness!

Astroswab is an unlicensed Sega Master System homebrew created for the SMS-Power coding competition in 2018. It is based on the Astroblast game for the Atari 2600, fused together with homebrew hero Swabby the Snail.

Credits:
Anders - Concept, code, music, graphics
Lasse - Graphics, playtesting

Greetings:
Maxim - BMP2Tile tool
sverx - PSGLib sound library and vgm2psg tool
Calindro - Emulicious emulator
Bock - Meka emulator
Kagesan - Screen fading routines
SMS-Power - Community, resources and support


http://www.smspower.org/Homebrew/Astroswab-SMS

  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 494
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Tue Mar 27, 2018 10:50 pm
This is like a cute-em-up version of Astrosmash! ;)
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 558
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Wed Mar 28, 2018 12:05 pm
Good call! The game was born out of me wanting to play some Astrosmash/Astroblast, but I don't have a real Atari, and the versions/emulators I tried, all seemed to rely on a paddle controller. What I did have was a shooting snail, so I thought: Why not? :)
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 387
Reply with quote
Post Posted: Wed Mar 28, 2018 4:04 pm
Great to see you back in action, and Swabby, too. This is exactly the kind of frantic action I like. The graphics also do an admirable job of covering up that they are tile-based. Very well done.
  View user's profile Send private message
  • Joined: 23 Mar 2013
  • Posts: 558
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Thu Mar 29, 2018 1:46 pm
Thanks Kagesan! And yes, the sprites are tile-based - but the backgrounds are actually drawn 'freehand'. Then they are processed by BMP2Tile. After some trial and error, I managed to have my stuff setup so that I could draw on the iPad, click a batch file to import and convert the image, and then assemble and run the game with the modified graphics - all with just a couple of clicks. This shortening of the distance between asset creation and implementation was a major behind-the-scenes achievement for me :)

And thanks for the screen fading routines!
astroswab-2.png (768 B)
Spritesheet, part 2
astroswab-2.png
astroswab-1.png (3.71 KB)
Spritesheet, part 1
astroswab-1.png

  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 64
  • Location: Ireland
Reply with quote
Glad you shipped the Z80 source code
Post Posted: Fri Mar 30, 2018 2:37 pm
Another great entry hang-on! Neat graphics and music and lots of SFX which adds to the gameplay. I did find that I had to get used to the controls a little at the start as I kept overshooting my target. Great box art also :)

Finally, really glad you shipped the source code for this. I think most people are coding in C using sverx devkitSMS for SMS homebrew nowadays... I would like to tackle pure Z80 assembly for a project at some point and your code here has given some solid ideas on how this could be done so thanks very much for that!
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 558
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Fri Mar 30, 2018 8:08 pm
Thanks StevePro! And yeah, I guess the controls can be a little hard to get used to. Family-based location testing also suggested this - so in fact I scaled down the difficulty prior to shipping the game for the compo. The controls are more precise than the emulated trackballs I have endured while playing the original Astroblast for Atari anyway :)

I you want an easier way to see some of the later levels, you can activate the cheat: On the title screen, press button 1 while holding left on the controller. This will enable an invisible shield that will take some asteroids and shards, but gradually wear off as it is used.

Regarding the source code: You are most welcome! I'm still conquering new aspects of z80/wla-dx assembler programming for myself with every new project. In Astroswab I used structs for the first time, and it really helped keeping everything in place. All the moving stuff (asteroids, Swabby, shards, shots, missiles, etc.) are instances of the same object struct:

.struct game_object
  y db
  x db
  sprite db
  yspeed db
  xspeed db
  state db
  shape db
  hitbox_offset db  ;xxxx yyyy (deprecated)
  hitbox_offset_y db
  hitbox_offset_x db
  hitbox_width db
  hitbox_height db
  id db
  anim_counter db
  anim_pointer dw
  timer db
  timer_handler dw
  timer_state db
  ;reserved_word dw
  ;reserved_byte db
.endst

I made a whole sub-library for dealing with these structs, and it kept spaghetti coding (almost) at bay! :)
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2199
Reply with quote
Post Posted: Wed Apr 04, 2018 9:13 am
Very well done and polished - and fun!
I especially liked the touch of suggesting the PAL (50Hz) mode on NTSC (60Hz) consoles - having a modded SMS II, I switched back to 50Hz to enjoy the game the way you meant it. Also, I see that you made sure that there never are sprites that would cover other sprites, and that's another nice touch.
At first I though Swabby was moving too fast, but after some seconds I got used and now I'm quite sure it's just the right speed.
Congratulations, pal! :D
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 7887
  • Location: Paris, France
Reply with quote
Post Posted: Wed Apr 04, 2018 10:18 am
Nice! And nice work with the box art, it feels very legit :)

It feels like it would be a good game to play with the Japanese Paddle Controller, if it supported it (with analog inputs).

One of the thing I may suggest to improve the game would be to add some visual effect when breaking asteroids, this was the thing I feel would really improve the polish level.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 558
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Thu Apr 05, 2018 9:05 pm
sverx wrote
Very well done and polished - and fun!
I especially liked the touch of suggesting the PAL (50Hz) mode on NTSC (60Hz) consoles - having a modded SMS II, I switched back to 50Hz to enjoy the game the way you meant it. Also, I see that you made sure that there never are sprites that would cover other sprites, and that's another nice touch.
At first I though Swabby was moving too fast, but after some seconds I got used and now I'm quite sure it's just the right speed.
Congratulations, pal! :D


Yeah, thank you sverx! I'm very glad you liked it :) I fried my main modded SMS II a couple of years ago, so I'm a pure PAL guy when it comes to real HW these days, but your description of the experience of switching region/speed on a modded console made the extra code and graphics totally worth it! It was exactly what I had in mind!

And thanks for the PSGlib and related tools. I used them (again), and they never let me down!
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 558
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Thu Apr 05, 2018 9:26 pm
Bock wrote
Nice! And nice work with the box art, it feels very legit :)

It feels like it would be a good game to play with the Japanese Paddle Controller, if it supported it (with analog inputs).

One of the thing I may suggest to improve the game would be to add some visual effect when breaking asteroids, this was the thing I feel would really improve the polish level.


Thanks Bock - I'm really glad you like the game! Regarding box art, I used the font and template suggested by Maxim and others in other threads. I was going for a 'modern' take on the early box art style: Sparse text and a very visible background grid, but not the gruesome clip art graphics of the period. I'm happy it feels legit!

Paddle controller - yeah, maybe this game really does need such a thing. It is on a paddle on the Atari as far as I know.

A little asteroid-breaking explosion? That would not be the hardest thing to add; plenty of sprite-tiles left. Did you experience the screen-shaking effect when a spinner (the flaming asteroid) hits the ground. Now that's visual effects :)

And thank you for Meka. It still sits faithfully on my F10 compile-and-run button!
  View user's profile Send private message Visit poster's website
  • Joined: 01 Jan 2014
  • Posts: 316
Reply with quote
Post Posted: Wed Apr 11, 2018 5:55 am
Nice work. The graphics really bring this one to life. Gameplay is simple but fun. Really like the vibe of this one :D
  View user's profile Send private message
  • Joined: 23 Mar 2013
  • Posts: 558
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Wed Apr 11, 2018 10:00 pm
Thanks psidum! I have really put some effort into the graphics. Once I decided on a (Pico-8)-inspired palette, I went on to draft different backgrounds and sprites. I have been working on this project for so long that I have had time to grow tired of the first 1-2 rounds of background images I drew months ago, and then slowly iterate over them to improve and adjust the designs. Not that they are all that fantastic, but it was at least an improvement of my usual compo workflow which is ruled by common deadline panic, combined with the fear of revising the art - because what if it turns out uglier than before revision. :)
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!