Jump to content
IGNORED

Raknotron (WIP)


Recommended Posts

Posted (edited)

I've been working on a couple of 2600 projects over the last year, and I'm finally comfortable with sharing one of them.  This is Raknotron, a twin keypad shooter.

 

Raknotron.png.68cba346385e2c3ecc05c123d6a271c0.png

 

Raknotron_001.mkv

 

It draws inspiration from Black Widow, but I intend for it to be its own thing.

 

Right now, the game is more of a technology demo than anything else.  You can move and shoot, and you're bound to the screen.  That said, background art, character art, and animations are all in so it'll hopefully look and feel polished.  The controls are as follows:

 

Left Keypad:

Move Up+Left		| Move Up 		| Move Up+Right
Move Left		| Move Down		| Move Right
Move Down+Left		| Unused		| Move Down+Right
Unused			| Unused		| Unused

Right Keypad:

Shoot Up+Left		| Shoot Up		| Shoot Up+Right
Shoot Left		| Unused		| Shoot Right
Shoot Down+Left		| Shoot Down		| Shoot Down+Right
Unused			| Unused		| Unused

 

I'm open to changing around the controls for the left keypad.  I had originally mapped Move Down to the middle key on the third row, but I found myself pressing its current location instead.  I also plan on using one or two of those middle keys for special actions.

 

Raknotron is NTSC only at the moment.  PAL and SECAM support are planned though!  Moreover, the NTSC colors have not been finalized yet.  I'm kind of purposefully keeping things grayscale for now.

 

Also, the game is 4K and should be playable on real hardware.  (I tested a very similar build on my 7800 using a Harmony Encore cartridge, two Video Touch Pad controllers, and @8bitwidgets.com's Synthcart coupler.)  It should also be playable on the 2600+ if keypad support is added.  (Please don't hate me @Ben from Plaion. 😅)

 

As for what's next, I've been trying to adhere to a very simple development philosophy.  I focus on one thing, and I try to finish that one thing in a week's time.  The next week will be focused on adding an additional sprite to screen.  I know that doesn't sound very exciting, but I'll try to make it worth your while. :)

 

Lastly, I'm including the source code with this release.  I hope someone finds it helpful!  Also, I'm open to any suggestions on how to optimize my code.  (I know I will eventually have to scale back how many sprites I'm processing each frame.)

 

Let me know what you all think!

 

P.S.: I'm not opposed to adding joystick support.  I just really wanted to show off the keypads in a way that I don't think other games have.

 

Past Builds:

 

Raknotron_05172024.7z

Raknotron_05262024.7z

Raknotron_06022024.7z

Raknotron_06122024.7z

Raknotron_07042024.7z

 

Current Build:

 

Raknotron_07162024.7z

 

 

 

Edited by KainXavier
Updated current build.
  • Like 6
Link to comment
Share on other sites

5 hours ago, KainXavier said:

I had originally mapped Move Down to the middle key on the third row, but I found myself pressing its current location instead. 

Awesome!  I wonder if you could include both configurations?  does that take much code space?  perhaps mode1 and mode2 would give folks both options.  This would also lay the groundwork to offer a dual joystick option as well. 

 

 

5 hours ago, KainXavier said:

Lastly, I'm including the source code with this release.

Did you make this with Batari Basic or straight assembly?   Always curious how folks create what they do.  Very cool of you to share your work for others to learn.  

 

 

5 hours ago, KainXavier said:

I know that doesn't sound very exciting, but I'll try to make it worth your while.

that's how you eat an elephant.  One bite at a time!  Not that I'm big on eating an elephant.

 

 

 

  • Like 1
Link to comment
Share on other sites

14 hours ago, 8bitwidgets.com said:

Awesome!  I wonder if you could include both configurations?  does that take much code space?  perhaps mode1 and mode2 would give folks both options.  This would also lay the groundwork to offer a dual joystick option as well.

I can definitely add new code, but the bigger issue is the number of CPU cycles it takes for that code to run.  Keyboard input is pretty latent, and while I can do things in between reading each row of keys, I don't have a whole lot of wiggle room outside of that.  That said, I will look into it should I add joystick support.  (I have an idea I'd like to try anyway.)  In the interim, I think a good solution would be to just make both keys move down.  I'll tackle that tonight and include it in the next release.

14 hours ago, 8bitwidgets.com said:

Did you make this with Batari Basic or straight assembly?   Always curious how folks create what they do.  Very cool of you to share your work for others to learn. 

That's a good question and one I forgot to address in my initial post.  Raknotron is written in 6502 assembly, and I used DASM to build the ROM.  (The .bin file is the ROM, and the .asm file is the source code.)  I've always wanted to learn an assembly language, and I don't have any experience with Basic or similar languages, so that's why I went that route.  I also wanted to try developing a 2600 game with the same constraints developers had back in its heyday. 

 

Also, sharing the source code was my way of paying it forward.  I wouldn't have been able to get as far as I have if it weren't for people like SpiceWare, Thomas Jentzsch, and Omegamatrix sharing their code and providing tutorials and examples! :)

 

Link to comment
Share on other sites

4 hours ago, KainXavier said:

I think a good solution would be to just make both keys move down.

that's a great idea!  

 

4 hours ago, KainXavier said:

Raknotron is written in 6502 assembly, and I used DASM to build the ROM. 

Awesome, I got Oscar's (nanochess) 2600 programming book but I have to say..  it caused my nose to bleed before finishing the first chapter..  just some heavy stuff going on that wasn't making sense.  I'm probably going to have to settle for batari basic which seems a bit more accessible for mortals.  I'd still like to get deeper into it, but I'm also pulled into other directions like intellivision and colecovision.. but there are a lot more interesting controller options for the 2600.. 

 

4 hours ago, KainXavier said:

I've always wanted to learn an assembly language

So how did you get into learning assembly?  I've always found it tough to kinda get that first "see the matrix" moment with these early systems.  Batari Basic if you didn't know, is a kind of assembly with some routines added to it to make some more common functions in a given game system to be easier to invoke.  Things that might take some extensive "busy work" code to achieve get wrapped up into a couple of lines.  It's still a compiled language so it's misleading when you hear "basic".  

 

4 hours ago, KainXavier said:

I also wanted to try developing a 2600 game with the same constraints developers had back in its heyday. 

Yea I really like that idea too.  I'd love to even code a game on computers of the time, but sadly a lot of those folks had fairly tough to come by computers today or ones that were terminals hooked up to some larger mainframe that would be a bridge to far for myself for such a niche experience.. 

 

 

Link to comment
Share on other sites

Posted (edited)
3 hours ago, 8bitwidgets.com said:

Awesome, I got Oscar's (nanochess) 2600 programming book but I have to say..  it caused my nose to bleed before finishing the first chapter..  just some heavy stuff going on that wasn't making sense.  I'm probably going to have to settle for batari basic which seems a bit more accessible for mortals.  I'd still like to get deeper into it, but I'm also pulled into other directions like intellivision and colecovision.. but there are a lot more interesting controller options for the 2600.. 

 

So how did you get into learning assembly?  I've always found it tough to kinda get that first "see the matrix" moment with these early systems.  Batari Basic if you didn't know, is a kind of assembly with some routines added to it to make some more common functions in a given game system to be easier to invoke.  Things that might take some extensive "busy work" code to achieve get wrapped up into a couple of lines.  It's still a compiled language so it's misleading when you hear "basic".

I'm not familiar with Intellivision or Colecovision development, but I'm guessing they would also require you to learn an assembly language.  That said, the nice thing about developing games for old systems is that there's usually a wealth of tools and information available to you.  Maybe there's a higher level language like batari Basic or some kind of middleware solution like GB Studio.  I wound up working on 2600 stuff just because I was inspired by all of the cool stuff the AtariAge community has put out.  That and they have a proper forum with loads of information, and I can usually find the answers I'm looking for.  (And that last part is really key for me.)

 

The way I got started was largely thanks to SpiceWare.  He posted a series of tutorials here on the AtariAge forums.  (Random Terrain also collected all of these tutorials and posted them on his website if you prefer that format.)  I would recommend downloading all of the examples and using a browser add-on like Save Page WE to save each web page itself.  The third tutorial, Score & Timer display, has an image regarding playfield timing.  Download a copy.  You will refer back to this image often!  6502.org has an excellent reference sheet for opcodes.  Download a copy!  I literally keep this open whenever I'm working on a 2600 game.  Download the Stella Programmer's Guide too!  There's the PDF version which has some useful diagrams and an HTML version which is far more navigable.  DASM's documentation is also pretty great.  I kept both of those documents open all of the time early on, and I still refer back to them now.  Lastly, make use of the Stella emulator's debugger!  You can set breakpoints and step through your code one operation at a time.  (DASM can also generate files Stella can use to make the disassembled code more readable.)

 

Of course, this is all assuming you have prior programming experience.  If you don't, you'll probably want to start with a high level language like Java or Python and then move on to something lower like C++ or (presumably) batari Basic.  An integrated development environment is also a really nice thing to have.  There's Atari Dev Studio but I've not used it yet so I can't speak to its ease of use or how up to date it is.  (I subject myself to using a combination of Notepad++ and batch files because I hate myself. 🤣)

Edited by KainXavier
  • Like 2
Link to comment
Share on other sites

Nice demo, and looking forward to see where this goes :) 

 

One thing to consider: keyboard controllers aren't as common as joysticks.  I get that the game is meant to use them in a way that other games don't, and it really does succeed in that regard.  However, a twin-stick option would definitely broaden the appeal.  Is this something you might be willing to consider?

  • Like 1
Link to comment
Share on other sites

8 hours ago, x=usr(1536) said:

Nice demo, and looking forward to see where this goes :) 

 

One thing to consider: keyboard controllers aren't as common as joysticks.  I get that the game is meant to use them in a way that other games don't, and it really does succeed in that regard.  However, a twin-stick option would definitely broaden the appeal.  Is this something you might be willing to consider?

Thank you, and yes, I'm more than willing to add joystick support.  Right now, I'm focused on adding an enemy to the game and coding support for enemies in general.  I'll tackle joystick input in a future build.  I can't really give you a timeline yet other than to say that it won't happen this week.

  • Like 2
Link to comment
Share on other sites

Posted (edited)

Okay, I'm sorry it's almost Monday, but the new build is here.  We'll call it WIP R2: Eggcellent Edition.

 

Raknotron_WIP_R2.png.810eeff0b404f5255cd70e91a90b9908.png

 

Raknotron_WIP_R2.mkv

 

I made some pretty massive changes to my code.  (More than I should have in a week really. 😅)  This build features an enemy egg.  You can push it off-screen or shoot it to death with 4 bullets.  Animations (for the egg) are not in yet.  You'll also have to wait to find out what horrors the egg brings.  Next week's build won't be as fancy.  I'll get animations in and maybe something else.

 

On a technical side, I had to scale back the # of bullets tracked by the game from 10 to 6.  This is because the game now keeps track of 6 characters as well, and I don't have enough cycles to handle 10 of each.  We'll see how well things hold up with 6 of each in the future.  (I may look into offloading more of my code into Overscan, but that'll be tricky since that's where I read keypad input, and I'd have to do it in between the latent reads.)

 

If anyone's feeling adventurous, you can look through the included .asm file to get more of an idea on how I intend to differentiate Raknotron from Black Widow.  The .bin file is what you'll use to play the game.  It should work on real hardware and be relatively safe for CRT users.  (Cycle overages were rare even with 8 bullets and 2 characters.)  Test at your own discretion, and let me know if you run into any issues!

 

Hope you all enjoy!

 

Raknotron_05262024.7z

 

 Edit: I meant to mention I've also updated the control scheme.  Keypad controls are now as follows:

 

Left Keypad:

Move Up+Left		| Move Up 		| Move Up+Right
Move Left		| Move Down		| Move Right
Move Down+Left		| Move Down		| Move Down+Right
Unused			| Unused		| Unused

Right Keypad:

Shoot Up+Left		| Shoot Up		| Shoot Up+Right
Shoot Left		| Unused		| Shoot Right
Shoot Down+Left		| Shoot Down		| Shoot Down+Right
Unused			| Unused		| Unused

 

Joystick support is not in yet but planned.

Edited by KainXavier
Added updated control scheme.
  • Like 1
Link to comment
Share on other sites

13 hours ago, ZeroPage Homebrew said:

Looking forward to giving Raknotron a quick look today during the news section on ZPH!

 

- James

Thank you very much!  I just finished watching the video, and I really appreciate the feedback!  Joystick support is definitely coming!  If not this week, then the next for sure! :)

 

 

  • Thanks 1
Link to comment
Share on other sites

 "An egg that does not wobble is scarcely an egg at all.  For what joy can a keypad bring if you only stick to what you know?  It's time to update your perspective."

 

-Raknotron WIP R3

 

Raknotron_WIP_R3.thumb.png.c50e26ccd85408e60f3fec6de055e07d.png

 

Raknotron_WIP_R3.mkv

 

I'm tired y'all.  Please indulge my nonsense. 😛

 

But seriously, egg animations and joystick controls are now in. 

 

Eggs will wobble back and forth for five seconds before they hatch.  Nothing hatches at the moment.  The egg simply destroys itself and respawns.  I also used the hatching sprite as a death animation to make it clear that the egg is being destroyed after you shoot it 4 times.

 

Joystick controls can be enabled by setting the left difficulty switch to B at boot or during gameplay.  (Keypad controls are set to A.)  If you're going to change controllers during gameplay, I would recommend unplugging your old controllers first, toggling the switch next, and then inserting the new ones last.  You'll run into some weirdness when going from joystick to keypad, but it'll resolve itself once you plug in the keypads.  I might be able to minimize that in the future too.  (Does anyone know if it's safe to plug in a joystick while the controller port is set to keypad input?)

 

On the technical side, I spent a lot of time trying to figure out how to detect if a keyboard controller was connected versus a joystick.  Unfortunately, I was unsuccessful.  (Hence why I went the switch route.)  That said, I did note some interesting behavior that others may find useful:

 

The D7 bits for INPT0 - INPT3 go to 0 just like joysticks do when keypad input is dumped.

 

SWCHA has a read value and a write value.  When you set SWACNT to output / keypad controls, whatever you write to SWCHA also gets set as the read value.  If you were to change back to input / joystick controls, the read value is set to $FF, but the previous write value is retained.  You can't access that write value, but it will get copied back to the read value if you switch back to output.

 

The read value for SWCHA will be set to $00 when SWACNT is set to output, $FF, for the first time.  (The read value gets set to whatever's stored in the write value.)

 

You can write to SWCHA while SWACNT is set to input, but it results in weird behavior.  (I didn't explore this in-depth, but I wound up with some pretty funky values.)

 

And I believe that's everything I wanted to cover with this build.  Next week's build will be focused on implementing multiple ammo types.  That's going to involve changing around the game's colors so you may see some preliminary support for PAL60 and SECAM60. :)

 

 

Raknotron_06022024.7z

  • Like 1
Link to comment
Share on other sites

So I have a new build, but it's unfinished and I'm not comfortable releasing it yet.  I will try to have it done before Wednesday and still do another build for this week.  Worst case, I'll just do the one build but try to make it extra special.  In the mean time, here's a new video.  It shows off the NTSC colors for the game's various ammo types.  I will dive more into that once I release the build proper.  Also, photo-sensitive viewers may want to stop watching around the 10-second mark.  There are two ammo types that cycle through certain colors rapidly, and it's hard even on my eyes.  I'll probably slow that down in a future build.

 

RaknotronWIP_R4.png.f2383e7ed87641338f9a4a9d9c101f5d.png

 

Raknotron_WIP_R4.mkv

  • Like 2
Link to comment
Share on other sites

Posted (edited)

I finally have a new build for you all.  I'm sorry it's late!  (I'll explain why in a bit.)  I'm including a new screenshot and video to show off more of this build's features.

 

Raknotron_WIP_R4_SECAM60.png.353b2b64e90b48a5fe4d5ff4fa58d190.png

 

Raknotron_WIP_R4_Palettes.mkv

 

The screenshot depicts the game running in SECAM60, and the video shows off the new ammo types in both PAL60 and SECAM60.  You may notice that I've slowed down the flickering for the ammo types that color cycle.  I hope this will make the game more playable for anyone who's photo-sensitive!

 

In terms of new features, native support for NTSC, PAL60, and SECAM60 is a big one.  Black & White is also supported.  You can cycle through the color palettes by using the 2600's TV Type switch or the 7800's Pause button.  Simply switch between Color and Black & White or press and release the Pause button to change palettes.  Assuming the TV Type switch is set to Color, the order is as follows:

 

NTSC -> NTSC B&W -> SECAM -> SECAM B&W -> PAL -> PAL B&W -> NTSC

 

Two things to note.  One, the initial palette will change based on the game's region.  (I haven't added support for regular PAL or SECAM, yet.)  Two, the SECAM palette will appear as black and white while running the game in NTSC or PAL60.

 

The other big addition is that of multiple ammo types.  You can cycle between them by pressing the button on the right joystick or by pressing the 5 key on the right keypad.  You'll also notice that you can shoot in the direction you're facing by pressing that key / button as well.  This is intentional.  I don't want you to be helpless while switching ammo types! :)

 

In this build, there are a total of ten nine ammo types.  In the final product, they won't all be available to you immediately.  Some of them will be tied to specific difficulties, others will be unlockable, and one is going to be a super move of sorts.

 

So why should you care?

 

Ammo switching is going to be the main gimmick of this game and hopefully what helps it stand out from other games in the genre.  It's going to work like Rock-Paper-Scissors.  The color of your bullets is the type of elemental damage they deal, and you'll want to attack enemies with certain types based on their color.  Here's a breakdown explaining it all:

 

Color		Element		Strong Against	Weak Against
White		Wind		None		None
Red		Fire		Earth		Water
Green		Earth		Lightning	Fire
Yellow		Lightning	Water		Earth
Blue		Water		Fire		Lightning
Orange*		Life		All		Death
Purple*		Death		All		Life
Rainbow**	Creation	All		All
Drainbow***	Destruction	All		None

* The Life and Death elements share the same color in SECAM and Black & White.  This is a technical limitation, 
  but I'm also going to design around it so you won't really need to worry about type differences.  
  Just know that these enemies are dangerous and hard to kill.  (You won't unlock these powers until later, either.)

** The Rainbow color cycles between White, Green, Blue, and Orange.  It was originally meant to be a nod 
   to Black Widow's multi-colored shots, but I added Orange, and I saved Yellow and Red for a "dark" equivalent.  
   Also, this power is your super move that you'll build up charge for over time.

*** The Dark Rainbow or Drainbow color cycles between White, Red, Yellow, and Purple.  This power is solely used 
    by the final boss.  I'm also thinking you'll be able to use it on the easiest difficulty.

Raknotron_06122024.7z

Edited by KainXavier
Corrected mistakes and tried to improve formatting.
  • Like 4
Link to comment
Share on other sites

Posted (edited)

Sorry for the double-post, but I think I hit some kind of word limit.

 

Continuing on, I wanted to share some details as to why the build was late.  (Aside from the usual IRL stuff, that is.)

 

I spent a lot of time working on a feature that I ultimately decided to cut.  I really wanted the player to be able change palettes using the keypad, but it just didn't make sense to switch to a color palette when the 2600's color switch is set to Black & White.  That and it was too niche of feature and added ~30 cycles to my code.

 

I knew the 7800 had a Pause button instead of a TV Type switch, but I had no idea it functioned differently.  I had a build ready to go on Monday night that I had to post-pone.  For those curious, the D3 bit of SWCHB is set to 0 when the Pause button is pushed in, and it returns to 1 when it's released.  (On a 2600, D3 is set to 1 when TV Type is set to Color.)  I also had no idea how to detect which console the player is using but I now do.  (And that's why AtariAge and its community are awesome!)

 

Lastly, thinking about what colors enemies should be got me to thinking about what enemies should be included in the game.  That in turn led to me thinking about their behavior and what to call them.  That in turn led to me thinking about the game's world and its story.  And I basically killed one of my days off writing a bunch of lore and multiple endings for a game that's already pretty ambitious.  So yeah, I'm sorry about that.  This is why I should stick to one thing at a time.  That said, I'm looking forward to the day I can finally share it with you all! :)

 

Two other things:

 

Does the 7800 Pause Button feature still work in Stella 6.7.1?  It didn't seem to do anything for me.

 

I kind of forgot that player color determines missile color, and I'm sure that's going to come back to haunt me.  I'll be limited to drawing just one enemy per frame unless I do some fancy computations prior to and during the kernel.  And I'm not sure I can do that without having to limit how many bullets and enemies I'm updating each frame.

 

One last thing:

 

I really just need to stick to one thing a week.  Saying I'll do one and then doing that plus the something else I mentioned is negatively impacting my work-life balance.  So for the next build, let's just say I'm going to add an enemy, and I'll post here again sometime on Sunday night / early Monday with more details.  I hope that works for everyone!

Edited by KainXavier
Fixed a typo.
Link to comment
Share on other sites

1 hour ago, KainXavier said:

Two other things:

 

Does the 7800 Pause Button feature still work in Stella 6.7.1?  It didn't seem to do anything for me.

 

I kind of forgot that player color determines missile color, and I'm sure that's going to come back to haunt me.  I'll be limited to drawing just one enemy per frame unless I do some fancy computations prior to and during the kernel.  And I'm not sure I can do that without having to limit how many bullets and enemies I'm updating each frame.

 

 

Yes, Stella does have pause, Press pause/break key to pause during game being played..

Link to comment
Share on other sites

6 hours ago, DeafAtariFromKansas said:

Yes, Stella does have pause, Press pause/break key to pause during game being played..

Stella also has a different event entitled "7800 Pause Key" that's bound to Alt+F3.  Are the two supposed to be the same?

Link to comment
Share on other sites

3 minutes ago, KainXavier said:

Stella also has a different event entitled "7800 Pause Key" that's bound to Alt+F3.  Are the two supposed to be the same?

Those are completely different. The first is to pause the emulator, and the second corresponds to a hardware button on the Atari 7800 console.

Link to comment
Share on other sites

8 minutes ago, Karl G said:

Those are completely different. The first is to pause the emulator, and the second corresponds to a hardware button on the Atari 7800 console.

Ah okay, that was my thought as well.  Does the 7800 Pause Button feature work for you?

Link to comment
Share on other sites

1 hour ago, KainXavier said:

Ah okay, that was my thought as well.  Does the 7800 Pause Button feature work for you?

The 7800 pause button only works as pause if a game is programmed for it. It is actually the same switch as the Color/B&W switch on an Atari 2600, but it only registers as black and white mode as long as you hold the button down.

Link to comment
Share on other sites

1 minute ago, Karl G said:

The 7800 pause button only works as pause if a game is programmed for it. It is actually the same switch as the Color/B&W switch on an Atari 2600, but it only registers as black and white mode as long as you hold the button down.

And it works for you in Stella?  Raknotron fully supports the 7800's Pause button.  I tested it on my own console while I was adding the feature.  Pressing Alt+F3 seems to do nothing in Stella, however.

Link to comment
Share on other sites

No new build for this week, sadly.  Adding a second enemy is going to require a lot of under the hood changes, and I haven't had enough time to finish that yet.  That said, I'm hoping to have two new enemies to show off instead of one.  Here's a preview animation of what the larval enemies will look like in the mean time:

 

Larva.gif.6ba8703555aa178576cbae8dfe06cf9d.gif

  • Like 2
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   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...