Jump to content
  • entries
    73
  • comments
    133
  • views
    82,995

KABOOM! on Propeller

Sign in to follow this  
potatohead

546 views

I've some free time, and seriously like this game. Perfect for a first pass Propeller project. The screenie attached to this post is the core video driver code up and running with one sprite active. The score lines are full-on character mode graphics, with a small font table defined to handle the score. The middle of the screen utilizes a scan line buffer, filled with the background color needed for the next line, while the current line is drawing.

 

Sprites are being written as strips, just like A8 bit PM graphics are. I've got one strip running, and it appears there is time enough in one COG (one of 8 CPU's, running in parallel on the thing), to build two sprites. The paddle in KABOOM is doubled. Not sure how I'm gonna do that just yet. If it's doable, I'll set a flag to double up sprite strip #2, for those scan lines. If not, I'll just multiplex the two sprites, leaving some flicker on the paddle scan lines. Because I've got access to the scan line buffer, I can multiplex that every other scan line. Really want to see what can be done with one video COG only.

 

Sprite data is a series of two longs per scanline, organized in series, two longs per scan line to form 8 full-color pixels. There is a render table that contains the scanline background color, sprite x positions, and one so far unused byte. (likely to be the double sprite flag, if possible) Vertical movement is done by moving the sprite data up and down in the sprite table. Horizontal is done by changing the x position in the render table, thus allowing for scan line, by scan line positioning of the sprite images.

 

The speed tests of SPIN were interesting. I did some basic stuff, like counting numbers on screen, moving blocks of memory, etc... SPIN, the on-chip high-level interpreted language, appears to run at about 70 to 90 percent native 6502 assembly on a real Atari 8 bit computer does! Plenty fast for game logic, input, etc...

 

Should this end up messy, there are plenty of COG's in the chip, worst case, re-write the video such that one COG is rendering scan lines, another is building images for them. That technique is being used in lots of games done so far.

 

Sound is up in the air at the moment. Might make sense to get one COG to act somewhat like a TIA. Input will be mouse to get the game up and running. I'll build a simple paddle interface after that and just use a paddle or driving controller.

 

The blur seen on the moving sprite happens to be an artifact that results from the sprite scan line positions being changed, without sync to the display. That's coming up in the next driver code pass, along with sprite number two. Took quite a while to figure out how to and and or all the data together to build the moving sprite. Could have looked some code over and avoid reinventing the wheel, but I really need to work through that exercise for future projects. The blue color really is just filler data to verify the sprite strip is on the display.

 

Check out screenie number two! It's an excellent port of DEFENDER! Runs on the chip, in 32K, with sound too boot. Input is keyboard, game controller. Damn cool, and maybe something I can approach some day. The journey is fun though. Motion blur is likely an artifact of my capture card. That one is done and playable on most any Propeller setup.blogentry-4836-1198130647_thumb.jpg

Sign in to follow this  


2 Comments


Recommended Comments

The latest screenie represents some work I got done today. Basically, there is plenty of time in one COG to do two sprite strips. Hmmm... maybe some decent TIA style graphics might be possible in one COG.

 

That's good news. I don't quite have the sprite handling right. Sprite one underlays beneath sprite two ok, but the opposite is not true. I need to incorporate the sprite 0 buffer image into sprite 1, or just avoid that case in the game. That's actually not a bad idea, though I think I'll clean it up now, before it's too far into the game to change otherwise.

 

Added in the VBLANK flag too. Sprite motion is now keyed to the display. Gonna have to check it on a real TV however. My capture card insists on adding motion blur to stuff that shouldn't have it. That, or I've got it wrong some how. Either way, there is a screen drawing flag for limiting screen changes to those times when the electron beam is not actually drawing the video image.

 

On to cleaning up the sprite masking, then making a decision about doubling or multiplexing to permit the paddle display necessary at the bottom of the screen.

Share this comment


Link to comment

Added screenie today.

 

Got in some minor progress. Keyed in the bomber graphics. Not quite right, but good enough to test the two sprite movement approach. I'll show the bombs in the bombers hands with simple animation. Just build some different sprite table for that. Where the bombs are falling, it will just be one sprite active, drawing bombs and being scrolled downward.

 

So, now it's the paddle and collisions at the bottom of the screen. That will complete the core game elements from a video perspective.

 

Just noticed. That bomber is too fat! For some reason, I thought he was significantly wider than the bombs. Doh! Looks like everything fits into one sprite strip. Oh well, I've got the pixel data done, just have to cull every other pixel and go forward from there!

 

Kind of like the fat bomber though...

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...