+Karl G Posted January 20, 2019 Share Posted January 20, 2019 I'm not sure if this will be of interest to anyone besides myself, but I thought I'd post it just in case. This is my first completed stand-alone assembly game. The original Space Game is a 32K game, and I filled almost all of that 32K. Because I was intrigued by the idea of making a game that would fit onto a standard QR code, and because I wanted to hone my assembly skills, I challenged myself to see what subset of Space Game I could fit into 2K. Since that's only 1/16th the original size, there was a lot that had to go off the bat: all of the cool music Maggie composed, special screens like the title screen, wave screens, etc., boss battles, mini-games between waves, etc. Optimizing code and data to this level was an interesting exercise for me. I managed to fit in 9 of the 14 non-boss aliens along with all of their special abilities. Unfortunately, I wasn't able to fit in powerups! I couldn't fit in a 6-digit score routine along with the graphics data for the digits, so I made a playfield-based scoring system where each alien group defeated scores one green bar, and if you get over 8 green bars they are exchanged for a red bar. If you have 8 green and red bars, then you win the game. Anyway, here's the game along with the source in case anyone is interested in trying it / looking at it. sg2k.bin sg2k.asm 14 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted January 20, 2019 Share Posted January 20, 2019 (edited) Hat off to you KarlG, that's damn impressive taking your 32k original (and rather good) Space Game and working a playable subset into 2k using assembly. I'd love to have the time to learn assembly. Edited January 20, 2019 by Muddyfunster 1 Quote Link to comment Share on other sites More sharing options...
JeffJetton Posted January 21, 2019 Share Posted January 21, 2019 Fun! Having never playing the 32K version, I don't really have anything to compare it to. Not sure what the floaty dash thing is, but I've learned to not let it hit me. :-) 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 21, 2019 Author Share Posted January 21, 2019 Smartbomb! Any similarity to the one in Yars' Revenge is strictly coincidental. Quote Link to comment Share on other sites More sharing options...
+ZeroPage Homebrew Posted January 24, 2020 Share Posted January 24, 2020 CONGRATULATIONS to Space Game 2K for being nominated in the 2019 Atari Homebrew Awards! Be sure to vote for your favourite homebrew games of 2019 with the links below and watch the awards LIVE on February 1, 2020! Awards Show: February 1, 2020 @ 12:00PM PT | 3PM ET | 8PM GMT LIVE on the ZeroPage Homebrew Twitch Channel! Atari Homebrew Awards Categories (VOTE IN ALL!!): Atari 2600: Best Homebrew Atari 7800: Best Homebrew (New!) Atari 8-Bit/5200: Best Homebrew (New!) Atari 2600: Best ≤ 4K Homebrew (2600) (New!) Atari 2600: Best Graphics Atari 2600: Best Music & Sound Atari 2600: Best Packaging Atari 2600: Best WIP 1 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 26, 2020 Author Share Posted January 26, 2020 It has been brought to my attention that I had been miscalculating my free space, and I actually have 282 bytes free! I will have to decide how I want to fill that space, or I could be totally crazy and see if I can make a 1K version. ? 3 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 27, 2020 Share Posted January 27, 2020 I love that attitude. 3 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 30, 2020 Author Share Posted January 30, 2020 Now that voting is done, I wanted to share a minimalist title screen I was able to add. 7 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted January 30, 2020 Share Posted January 30, 2020 (edited) 11 hours ago, Karl G said: Now that voting is done, I wanted to share a minimalist title screen I was able to add. I reckon that would take about 200 bytes. You've still got plenty of room! Edited January 30, 2020 by Andrew Davie 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 30, 2020 Author Share Posted January 30, 2020 18 minutes ago, Andrew Davie said: I reckon that would take about 100 bytes. You've still got plenty of room! 6 distinct PF lines x 5 bytes/line = 30 bytes for the SG2K part. in a loop for multiple scanlines, so 2 for the index load + three colour loads @ 4 bytes/colour = 12 bytes = 42 bytes + a PF write for the top dot = 4 bytes, plus a few 0 writes to PF1 and 2, plus various timer/wsync code and screen on/off essentials and setup I'd say maybe 80 bytes would be possible. Giving you 100. So, you have nearly 200 free still. Uhh... I haven't done an optimizing pass on my new titlescreen yet, but I'm using more than twice that amount of space. Karls-MBP:Downloads kdgarris$ assemble sg2k 38 bytes free Here's the titlescreen function. I use quad players for the letters for ease of positioning and color changes, and the playfield for the ship itself. I reuse the 6-byte ship graphic from the game, and SG and 2K are new 6-byte graphics. Here's the titlescreen function in case you or anyone else wants to suggest more optimal code: SubTitleScreen lda #$30 sta CTRLPF lda #1 sta GameState lda #7 sta NUSIZ0 sta NUSIZ1 sta HMCLR ; position P0 lda #32 ldx #player0object jsr SetHorizPos ; position P1 lda #64 ldx #player1object jsr SetHorizPos ; position ballobject lda #109 ldx #ballobject jsr SetHorizPos lda #$88 sta COLUP0 lda #$64 sta COLUP1 sta WSYNC sta HMOVE TitleNextFrame VERTICAL_SYNC lda #44 sta TIM64T TitleWaitVBlank lda INTIM bne TitleWaitVBlank ; loop until timer expires sta WSYNC sta VBLANK ldx #54 jsr SubBlankLines lda #2 sta ENABL lda #$3F sta COLUPF ldx #8 jsr SubBlankLines lda #0 sta ENABL ldx #18 jsr SubBlankLines lda #ship_color sta COLUPF ldx #ship_height-1 lda #5 sta Temp1 TitleLoop sta WSYNC ; 3 (0) lda title_sg,x ; 4 (4) sta GRP0 ; 3 (7) lda title_2k,x ; 4 (11) sta GRP1 ; 3 (14) lda #0 ; 2 (16) sta PF1 ; 3 (19) lda ship_graphics,x ; 4 (23*) sleep 12 ; 12 (35) sta PF1 ; 3 (39) dec Temp1 ; 5 (44) bne TitleFiveLine ; 3 (47) lda #5 ; 2 (49) sta Temp1 ; 3 (52) dex ; 2 (54) bpl TitleLoop ; 3 (57) jmp ____done_title TitleFiveLine jmp TitleLoop ____done_title ldy #0 sty GRP0 sty GRP1 sty PF1 ldx #80 jsr SubBlankLines lda #36 sta TIM64T TitleWaitOS lda INTIM bne TitleWaitOS ; loop until timer expires lda #2 sta VBLANK lda #bit0 and SWCHB bne ____skip_title_reset jmp Reset ____skip_title_reset bit INPT4 bmi ____skip_title_fire jmp Reset ____skip_title_fire jmp TitleNextFrame I'll also attach the current source. sg2k.asm Quote Link to comment Share on other sites More sharing options...
+sramirez2008 Posted January 30, 2020 Share Posted January 30, 2020 11 hours ago, Karl G said: Now that voting is done, I wanted to share a minimalist title screen I was able to add. I like it I'd like to see this on cart and you could use the title screen for the cart label. 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 30, 2020 Author Share Posted January 30, 2020 34 minutes ago, sramirez2008 said: I like it I'd like to see this on cart and you could use the title screen for the cart label. Thanks. I'm unlikely to have carts made, but I'm okay if anyone else wants to for their own personal use. Wait a little bit, though, since I may well try to sneak a bit more into my remaining space. ? 4 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted January 30, 2020 Share Posted January 30, 2020 8 hours ago, Karl G said: Uhh... I haven't done an optimizing pass on my new titlescreen yet, but I'm using more than twice that amount of space. Yeah, I got my comment/calcuations wrong and changed it within a minute or two, but you beat me and responded to the original Still, the challenge is on! 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted January 31, 2020 Author Share Posted January 31, 2020 76 free bytes after some modularization and looping. I am hoping to add a very short melody to the title screen (the new wave melody from regular Space Game). It's 56 bytes of music data, but the remaining 20 bytes isn't quite enough to implement a dual-channel music player. It seems within reach now, though. sg2k.asm 1 Quote Link to comment Share on other sites More sharing options...
Prizrak Posted February 1, 2020 Share Posted February 1, 2020 Could you post a bin of the latest asm?Sent from my SM-N960U using Tapatalk Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 1, 2020 Author Share Posted February 1, 2020 Latest version displays the title screen, and plays the short opening melody. 1 byte left. I need to free up a bit more to be able to kill the sounds if the game is started when the music is playing in (or not start the game until the music is finished). sg2k.asm sg2k.bin 2 Quote Link to comment Share on other sites More sharing options...
+sramirez2008 Posted February 1, 2020 Share Posted February 1, 2020 Loving it! SG2K.MOV 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 1, 2020 Author Share Posted February 1, 2020 I spent some time clearing more space for code to clear sound channels upon game start or game over, only to realize that I already had this functionality built-into my function for updating sound channels. So, it looks like it's "done" with the title screen, opening melody, and 11 free bytes if I find I need them later. Edit: 8 bytes left, but I eliminated the screen jump after title screen. sg2k.asm sg2k.bin 7 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 1, 2020 Author Share Posted February 1, 2020 And here's a Javatari link: http://javatari.org/?ROM=http://gridbug.homebrew.net/sg2k.bin 2 Quote Link to comment Share on other sites More sharing options...
+ZeroPage Homebrew Posted August 3, 2020 Share Posted August 3, 2020 (edited) We'll be checking out Space Game 2K on tomorrow's (Tue Aug 4) ZeroPage Homebrew stream LIVE on Twitch at 11AM PT | 2PM ET | 6PM GMT! Hope everyone can watch! Twitch Stream: https://www.twitch.tv/zeropagehomebrew/ Games: S.A.M. 2600 (2020 WIP) by @rossum Space Game 2K (2020) by Karl Garrison (@Karl G) Penult (2020 Exclusive WIP Update) by Karl Garrison (@Karl G) (SET VIDEO TO 1080P60 FOR FULL QUALITY) Edited August 6, 2020 by ZeroPage Homebrew 2 Quote Link to comment Share on other sites More sharing options...
+sramirez2008 Posted August 3, 2020 Share Posted August 3, 2020 Really like this game. Look forward to seeing it.? @Karl G Heard it mentioned on ZPH that You may add more to this game Unlikely to release this on cart Give your permission for others to make carts Thank you for giving permission, as I would love to have this on an actual cart. I think this is a great, pick up and play, pure shooter and I prefer to pop-in a cart and play it on actual hardware if possible. Having just said all of this, please consider releasing a cart. IMO you've squeezed a great amount of gameplay out of 2K and deserve to be rewarded for your time/effort. Btw, I thought I would really miss the power-ups, but I don't and that speaks to the level of gameplay that is retained in this version. Love the ship and enemy sprites too. 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted August 7, 2020 Author Share Posted August 7, 2020 Thanks @sramirez2008! I did this as a coding exercise, and I'm glad people like it, but I really don't want to make carts. Feel free to do so if you want one, and maybe put a pic of the cart in this topic! It would be cool to see one in use. 4 Quote Link to comment Share on other sites More sharing options...
+sramirez2008 Posted August 8, 2020 Share Posted August 8, 2020 I look forward to doing so.? Harmony Cart gameplay 1 Quote Link to comment Share on other sites More sharing options...
+sramirez2008 Posted September 26, 2020 Share Posted September 26, 2020 On 8/7/2020 at 3:04 PM, Karl G said: Thanks @sramirez2008! I did this as a coding exercise, and I'm glad people like it, but I really don't want to make carts. Feel free to do so if you want one, and maybe put a pic of the cart in this topic! It would be cool to see one in use. As promised, below are a few pics of my custom SG2K cart. @Karl G thank you for providing your permission to make a cart and thanks to @Albert for manufacturing the cart. This will always remain in my collection.? 8 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted September 27, 2020 Author Share Posted September 27, 2020 That's awesome! Thanks for posting pictures. ? 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.