Jump to content
IGNORED

My 2k Game Experiment - Gate Racer


Atarius Maximus

Recommended Posts

If there really must be a crash-car sprite can you asm hack the player0 sprite pointer to code?

 

UPDATE: Doing this worked just fine!

 

player0pointerhi = rand


player0:
%11011011
%11111111
%11011011
%00011000
%00011000
%01011010
%01111110
%01011010
end

player0x = 30
player0y = 30

main
if joy0left then player0x = player0x - 1
if joy0right then player0x = player0x + 1
if joy0up then player0y = player0y - 1
if joy0down then player0y = player0y + 1
COLUP0 = $2E
player0pointerhi = rand
drawscreen
goto main

 

UPDATE 2: Er, this works on Stella. Sometimes accessing RAM/ROM in weird ways doesn't work on real hardware :P Not tested on real 2600.

Link to comment
Share on other sites

Glad that someone else is attempting a 2k game with bB, even though my best time is 10 seconds. I think the controls should be more like Grand Prix than the way they are now, with the car being all wobbly and hard to control.

Thanks for your feedback. You are the king of 2k games on this forum, so I'd love to hear about specific things you've done to free up space. Have you made any modifications to the standard asm files? I'm experimenting with that now.

 

bB is challenging in 2k, I know there's a bunch of extra code that could be eliminated, but it's hard to figure out what. My favorite small game is Thomas' Cave 1k from years ago. It's a fun game, and amazing what he accomplished in 1k. Something like that is impossible in bB I think.

 

I like the controls, but I know not everyone will. My last update includes an option to turn it off, but it makes the game too easy IMO.

Link to comment
Share on other sites

Balance it however you like, of course. Just keep in mind the careful tight walk between frustratingly challenging and frustratingly unplayable.

Yep, I understand. When you make a game and play it constantly, you get pretty good at it. Ramping the difficulty down a notch or two is usually a good idea.
Link to comment
Share on other sites

crap

 

Ever look back at a bit of code and say

what the hell was I thinking !?

 

Presumably you had the wits to ignore this

 

if joy0right || joy0left then direction = direction ^ 1 : goto skip

 

for this

 

if joy0right then direction = 1
if joy0left then direction = 0

 

If not please do so. ;)

Link to comment
Share on other sites

Thanks for your feedback. You are the king of 2k games on this forum, so I'd love to hear about specific things you've done to free up space. Have you made any modifications to the standard asm files? I'm experimenting with that now.

For my Explosive Diarrhea game, I went in to the default.inc file and remmed pf_drawing.asm, pf_scrolling.asm, and std_routines.asm. With this setup, you can still make changes to the playfield, but it has to be done with the playfield: command (you can't use pfhline, pfvline or pfpixel, though.) You need pfscrolling in this game, so remming pf_scrolling.asm would probably not work. In asm, putting a ; next to code makes it not do anything, so it acts just like rem.

Link to comment
Share on other sites

I made some changes to pf_drawing.asm, pf_scrolling.asm, std_kernel.asm, and std_overscan.asm. The game now reports 137 bytes free rather than 16 bytes free with the unmodified includes. I've playtested this version for a while this morning and it seems fine, but my changes introduced one strange little bug. It happens very rarely, but occassionally there will be a pixel missing (or a pixel added) to the scrolling barrier. It doesn't hurt anything and in some cases adds a bit more challenge if it happens to appear in the normal gate opening. Not sure if I want to leave that in there as a "feature" or just go back to the unmodified includes. That's the only issue I've found so far. I'd really like to keep those 137 bytes! My new high score is now 1:27.8. :)

 

EDIT: I didn't keep very good track of my changes, in most cases I was just removing items that I know I'm not using. I removed options for scrolling L/R, paddle controls, etc. I should have commented them out rather than just deleting.

custom_includes.zip

GateRacer9.bin

GateRacer9.txt

post-2143-0-85556400-1361293020_thumb.jpg

post-2143-0-40895300-1361293080_thumb.jpg

Link to comment
Share on other sites

Here's an idea... Maybe instead of causing an instant loss, the oil slick should jolt the player to either side, so it's not a certain loss if you're very good and lucky and can correct from it.

Pretty good idea. If I decide to keep that new "feature" in the game that I just described there'd be plenty of space for that change. :) I was also thinking of a "powerup" that would make you temporarily invincible but would be risky to try and grab. That would take a lot of space, though. Right now I'm thinking I'd like to use most of that extra space for a proper title screen.
Link to comment
Share on other sites

I dunno if the powerup would take that much space. You randomize the location of the pfline, right? Just make sure that the item's placement is always proportionately away from the gate, so take the number used to calculate the farthest pfpixel of the gate and subtract it from the total number of pfpixels and there you've got your x location for the powerup.

 

And as for how it works, just swap the player's color and ignore playfield collisions for a few cycles. That would just take an if statement and a counter.

Link to comment
Share on other sites

Here's the latest update. I'll probably still make a few more changes before I call it done. This version changes the oil slick so it causes you to slide back and forth rather than causing instant death, it removes the ability to disable the oil slick (needed to free up some space), adds a sprite on the titlescreen so the game doesn't start up with just a blank screen, and adds a powerup (a white block) that will randomly appear. The power up block will give you temporary invincibility for about three gate passes. It's possible there may be a bug in the powerup code, I haven't done much playtesting yet (busy day today). The addition of the powerup used up most of the extra space that I freed up by modifying the standard include files. There's 1 byte free in this revision.

gateracer10.bin

GateRacer10.txt

Link to comment
Share on other sites

I don't know how much space you have left, but maybe for the title screen you can have the car in the game move back and forth.

There's only 1 byte free right now. I would like a better title screen, I'm going to be spending some more time looking at code optimization to try and fit it in.
Link to comment
Share on other sites

Just so you know, you CAN upload .inc files for post attachments now.

 

Also, it would be kinda nice if that little bug with the random small gap could get sorted. It does look a big buggy rather than intentional.

Thanks for the update about posting .inc files, didn't know that. As far as the little pfpixel bug, in all honestly I'm probably not going to be able to fix that. The bug was created by making random changes to the standard include files and while I'd love to say I knew exactly what I was doing, I really didn't. I'll see if I can work around it though. The final "perfect" version is going to be the version 7 build, at this point I'm just seeing what extras I can squeeze in with that little bug still in there.

Link to comment
Share on other sites

For many years the first thing I've typed in to a new bB project is 'set romsize 32kSC'. :) This has been quite a challenge, there's so many things I've tried to do that just won't fit in 2k. I know there's lots of bloat using bB that's proven by the few things I've removed from the standard includes, but I've definitely gained a new respect for all those original 2600 programmers from the late 70's. I'll likely start working on an expanded version for fun soon.

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