Jump to content



5

My 2600 racing game: "F40" (aka Ferreira 4.0 KB)


9 replies to this topic

#1 Rastignac OFFLINE  

Rastignac

    Star Raider

  • 78 posts
  • Location:France

Posted Sun Mar 27, 2011 1:55 PM

Hi !

Why is my avatar a fast red European car ? It's the main sprite of my first 2600 game.

I started a brand new project a few years ago. August 2008 (damn, time flies). Version "0.0.1 alpha" was shown onto Stella Mailing List. Nobody remembers it.

A few weeks later (octobre 2008), version "0.0.2 alpha" was about to be shown. But the project got lost and died. Damn. Sad story.

Today, I'm shameful and proud, because I found it back ! Yeah. Not really the whole complete project. Just an old piece of dirty backup bits of the project. It's kind of "v0.0.1.9.9.9 alpha", in fact. Not really the final "v.0.0.2 alpha". A few things are missing (some characters missing from some texts, menu is present but useless, etc).

So, here it is.


I don't know if the project will live again and continue, or die again. There were nice things in this game; I loved working on it. I don't know if I can finish it and sell it as a homebrew. There is a fat lot of things to do more ! (It's not a game today: it's just a WIP/PoC).

Note that:
- V0.0.2a was not tested on real hardware (v0.0.1a was tested and working on real hardware), but it should run.
- v0.0.2a sucks on real TV (CRT or LCD) but is very nice on emulation screen. "Phosphor off" is better.
- V0.0.3a will fix these interlacing problems. (I think display will go from 60hz to 30hz in v0.0.3a to solve that).



Old "v0.0.1 alpha" text:

Quote

Here are a few information about my work-in-progress 2600 game: codename "F40". The codename "F40" means "Project 'F', size 4.0 KB". It's not at all a game with a fast red car named "F40", you know. My target is a 4.0 KB ROM; it should be enough. I want to do the best I can within the 4.0 KB limit.

My game is a vertical top view cars race. The player's car is red, fast and European. But not Italian at all. It's a Portuguese car: the famous "Ferreira" brand from Portugal, you know. Project 'F' stands for "Ferreira".

Final title is not chosen yet. It should be "Ferreira: Cruisin' Portugal" or "Ferreira: Portuguese Stallion" or something similar. It needs some brainstorming here. Something stupid, something funny. May I choose "Ferreira: Grande Turismo" ? Why not "Ferreira: Road Cod" ? Or "Ferreira: Need For Bacalhau" ? Or "Formula Ferreira" ? Etc.

The current version is "0.0.1 alpha", is full of bugs (I know them), and is not even a game. It's just a mock-up / prototype / proof of concept. (Am I able to do it ? Will it be possible to build a real game around my ideas ? Can I finish it ? Will it be sold ?). If my tricks work, if my ideas are good, then I'll try to make a real full game from it, then finish it, polish it and publish it. If it sucks, I'll stop right now. So, tell me the truth ! Does it suck ? Will it suck ?

I tried not to play the existing 2600 racing games before writing mine, so I won't copy anything from others. I'll try to do something unique. I won't do a "better Enduro" or a "better Pole Position". I'll try to do my own best game. I hope it will be as good as yesterday games and today homebrews. I think I can do better than Atari's Street Racer... That's just my goal now ;)


Current progress:

- Current WIP version is NTSC only. Final version will be PAL also (TODO v0.0.2). Using the select switch, it will cycle through NTSC - PAL60 - PAL50.

- I don't know about SECAM yet. (I hate SECAM). Here in France, 99% of 2600s are SECAM, and that's a big problem. You can't seriously do anything with a SECAM one; so I just can't buy a console in my own country. It took me weeks to find and buy an European PAL 2600 here. But if I want to show my game to friends or other French people, I need to handle SECAM consoles also. (TODO v0.0.3)
My European PAL 2600 is a Portuguese one. Not joking. It really came from Portugal.

- Present Kernel is not the Real Final Kernel I'll use; it's just a dirty mock-up now. Kernel is a 1LK, using 192 lines (out of 262). Perhaps I'll use more lines (200 ?) later if the final kernel allows it.

- This NTSC WIP has been tested with my PAL 2600. Colors were all wrong, but it runs (PAL60), without rolling, on my TV sets (French SECAM50/PAL50 sets; one LCD set and one CRT set). It runs, but the visual effects are not good.
It also needs tests on NTSC hardware.

- I burnt an old used 2732 eprom with a cheap Chinese Willem clone. It was hard (because of this cheap low quality burner) (advice: avoid cheap hardware, or be very patient) (it took me hours to burn just the first good one). I used it on a PixelPast / AtariAge 2600 4KB PCB.
This WIP should also work with SuperCharger / CuttleCart / etc (I don't touch the forbidden bytes).


Main menu:

- Game's title is drawn with PFx graphics (V0.0.1a). It's a bit blocky (lines x4). I also tried x2 (v0.0.0), and that was not really nicer, and that was just using twice more ROM space. So, it will stay at x4.

- Yeah, the police font is nice. It looks like a famous one, you know, just blockier.

- I think I can add a few pixels here and here to enhance the blocky aspect. The "I" point should be made round (using a sprite), etc. (TODO v0.0.4).

- I'm using six bytes per line. I can cut to five bytes to gain ROM space later.

- Title was created with my own tool (an old quick-and-dirty Qbasic program I wrote years ago, converting "xx x xxx" texts into PFx datas) (should I distribute it ?).

- Title screen shows a scrolling road, the player's car as a cursor, and a scrolling text (using an ugly rainbow colors effect).

- Hey, the police font is nice. Perhaps too small ? Is it readable enough (on real hardware) ? Some characters need some rework (TODO).

- Scrolling text shows version and copyright information (DONE v0.0.1a). When the player moves its car/cursor (TODO v0.0.2), it shows the different available choices (easy game, medium game, hard game, two players duel game). Press fire to validate your choice and start the selected game.

- Reset switch is handled (v0.0.1a). Other switches are not yet used (TODO).

- Display should be stable (262 lines), until fire is pressed. No PAL color loss so far.

- Yeah, there's some kind of boring noisy music too.

- Music routine is mine, so it's buggy and it sounds bad. I tried to do it fine (notes decay, phasing effect, stereo sound), but it's not state-of-the-art at all. To rewrite later (TODO).

- Music is mine, created with my own tool (an old quick-and-dirty Qbasic program I wrote years ago; you can use the PC keyboard as a piano, generating AUDx datas) (should I distribute it ?). I'm not at all a musician; it took me less than five minutes to write the whole song. (It was easy) (but, hey, it sucks).


Main game screen:

- No curves, only straight lines. Portugal from south to north is just a long straight road...

- PF2 is black and empty. It's the road itself.

- PF1 is the landscape/background/roadside, using a tricky fast scrolling animation, giving a nice speed effect.

- PF0 was empty (V0.0.0), to gain a few cycles, to hide HMOVE black bars, and to let the screen be more vertical.

- The main menu was ugly, because the title was wider than the road. So I now update PF0 also (v0.0.1a), with only a few cycles cost. So, the landscape takes all the width of the screen. And it's nicer, on the two screens.

- The ball was used as the road central lines (v0.0.0). But I removed it: I found another use for it (v0.0.1a).

- Different landscapes will be available (TODO v0.0.2) depending on the chosen game option. Scrolling speed is variable (better speeds are x1, x3 and x5; but different speeds can be done easily (even non-integer speed are easy)).

- Landscape color will change also. (Different levels ?).

- I ported a DirectX 10.1 routine (environment texture mapping using pixel shaders) to the 2600's TIA. It was quite hard ! So now, the landscape is reflected in the player car's windows ! Impressive. (Just joking. I'm just using the ball under the player's car to simulate the windows).


Gameplay:

- Player's car is always running at full speed. Yeah. No acceleration. Always at top speed. No need to stay pushing the same button during hours. Just try to avoid incoming things.

- You can brake by pressing fire button. That's your last chance to avoid a imminent collision (à la "Matrix slow motion").

- When you're braking, the road scrolls more slowly, the badguys' cars are slower, so it's easier to avoid them. (You are still moving as fast).

- Braking will be time-limited (TODO v0.0.2). When the brakes are hot, it stops braking, and you can't brake anymore during a short time (TODO v0.0.2) until they get cold again.

- Braking leaves skid marks behind your car (v0.0.1a). Size of the marks depends of braking duration time.

- Player's car steps back when braking (v0.0.1a). Better effect coming (TODO v0.0.2).


Sound:

- There's no motor sound. I hate motor sound. Hearing the same full speed motor sound during hours is boring.

- There's some "braking sound" (v0.0.1a), but it needs some rework. I need a "hot brakes" sound too (v0.0.2).

- I'll add some "overtaking sound" (vraaaaooooom) for each overtaken car (TODO v0.0.2). The sound will be stereo (left/right depending on the position of the overtaken car, volume depending on the distance of the overtaken car).


Horizontal position:

- I'm using the same routine as everyone (the modified BattleZone one, I think). (v0.0.0).

- I made a special version of this routine, because I'm using a 1LK. Horizontal positioning eats one line; during this eaten line, PFx graphics are not updated, so it's ugly (a glitch can be seen). So I modified it: I manage to update PF1 during the horizontal positioning (v0.0.1a). There's still a glitch (PF0 is not updated on this line), but it's less visible.


Random:

- I'm using the same random generator as everyone. (TODO v0.0.2)

- I initialize it with INTIM at start-up, and keep the value (resetting don't loose the seed). (v0.0.1a).

- I'm shuffling the random numbers every time (while the player is waiting in the main menu, each time the joystick is touched) so it's really random. (TODO v0.0.2)


Bad guys' cars:

- A car is 30 lines of graphic (+1 blank line, to erase). So I can put 8 different cars in a 256 bytes page.

- A car can have more or less lines (variable height is possible), but I'll try to stick to 30+1.

- I have a lot of cars to draw. I will draw them later (TODO v0.0.2) when the final kernel will be done for sure. Perhaps I'll look for help (a open contest ?).

- Cars' AI will be basic, but good enough. Some cars are stupid (straight line), some cars are aggressive (homing missile), some cars are random (erratic moves), some cars are bouncing (to the left then to the right then to the left), etc. (TODO v0.0.2)

- My first idea was to choose cars' color depending on the model (the "German car" is always grey, the "tuning car" is always purple, etc).
My second idea was to choose cars' color depending on the AI (red car if aggressive, green car if passive, blue car if bouncing, yellow car if random, etc).
My current idea is to choose a random car color, so the cars are always different. (TODO v0.0.2)


Scoring:

- I don't know yet. I now have no game's aim. A score with points (points when overtaking cars, negative points when braking) ? A total number of cars to overtake ? A time trial ?

- One hit and you're dead ? Or a life bar to manage many hits ?

- A life bar displayed on the screen ? Player's car changing color depending on its health (from healthy bright red to deadly black) ?

- Bonus to catch on the road (health bonus / oil refill / repair tool) ?

- I'll see later.


Manual and art:

- Documentation will be written in French, then translated into English and Portuguese (of course !). The manual will feature the three versions together (three columns layout ?).

- I'm still looking for art and illustrations (sticker, cover, manual, etc). (TODO v0.9.9).


Sources:

- No real need for optimizations now. Code is far from final. There's still a lot of free room (rom space, ram space). There are already a few optimization tricks here and there.

- Sources are not available now. Sources will be available soon (TODO v0.0.2). No need to disasm, just wait.

- Sources are just ugly now. Some comments, variables, labels and such are written in French. Some routines need a few clear comments. Some parts are really ugly. There are duplicate parts, unused routines, debugging code, etc.


F40's trick number one: the roadside.

- Before the kernel, I increment the road seed. Speed of the scrolling depends on seed's increment. See: menu's speed is not the same as game's speed.

- Integer increment works. Non-integer increment can also be done (with 16bit math).

- I copy the seed to another variable.

- For each line, I increment the value then put it to PF1.

- So, in the first frame, you have 1, 2, 3, 4, etc. For the second frame, you have 2, 3, 4, 5, etc. And so. The road scrolls. Magic.

- By changing increment/decrement, you can change the road's motif. (DONE v0.0.1a). See: menu's road is not the same than game's road.


F40's trick number two: the cars.

- I'm using reflection (REFPx) for the cars visual effect. Only one sprite by car is used. Swapping reflection every frame does the animation effect.

    Normal:     Inverse:    Final:

     XXXXXX      XXXXXX      XXXXXX
    XX XXXXX    XXXXX XX    XX*XX*XX
    XXXXXXXX    XXXXXXXX    XXXXXXXX
    XXXXXXX      XXXXXXX    *XXXXXX*
     XXXXXXX    XXXXXXX     *XXXXXX*
    XXXXXXX      XXXXXXX    *XXXXXX*
     XXXXXXX    XXXXXXX     *XXXXXX*
    XXXXXXXX    XXXXXXXX    XXXXXXXX
      ...         ...         ...

- So, the wheels move, the lights blink, etc. The sprites are "one color and half" (the F40 is even more colored). That's nice. The sprites are moving and alive. And at nearly no cost.

- The effect is not perfect on emulators. The effect is not perfect on LCD TV sets. The effect is not perfect on CRT TV sets. Still need so rework. (TODO)

New "v0.0.1.9.9 alpha" what's new:

Quote

- Still not a real game. Still a prototype/mock-up/WIP/test/alpha/etc.
- Version number changed to 0.0.2a.
- Third BadGuy added.
- Fourth BadGuy added.
- Little bugs fixed here and there...
- Temporary pseudo-random BadGuy cycling. (Four different BadGuys)
- Temporary pseudo-random BadGuy color.
- Select switch handled (but only in the main menu). Use it to cycle "NTSC-PAL60-PAL50".
- BW switch handled (but only in the main menu). Needed for SECAM support (SECAM 2600 has hard-coded BW switch).
- PAL palette supported (no full support yet).
- SECAM/BW palette supported too (no full support yet).
- 60hz/50hz handled. 192/262 lines at 60hz, 242/312 lines at 50hz. No PAL color loss so far.
- When at 50hz, the additional 50 lines are not blank but filled with game's title (but displayed at smaller ratio (x3, because 16x3=48)) down the screen.
- Music tempo follows the 60hz/50hz change. Music speed is always constant.
- Sprites priority changed. Ferreira's priority was higher than BadGuy's priority, so Ferreira is always drawn on top of BadGuy, so it's never hidden during the collision. But Ferreira's windows are drawn under everything, so BadGuy's car was drawn between Ferreira's body and windows (it was strange and ugly). So, now, Ferreira is drawn under BadGuy's car. (So, it's hidden during collision).

- In the menu screen, Ferreira is no more at the real center of the screen. (Moved one pixel). Position is now the same as game screen.

- Code cleaned. Still not final. More comments. More english comments. Still dirty and unreadable.
- Sources still not available (still too ugly now).

- Main menu begins to work. You can move the car left and right to select the different options. Moving the car changes the choices. It has no real impact yet.

Thanks.

Attached Files


Edited by Rastignac, Sun Mar 27, 2011 2:08 PM.


#2 LS_Dracon OFFLINE  

LS_Dracon

    Moonsweeper

  • 410 posts

Posted Sun Mar 27, 2011 4:17 PM

I think, with right timming, you can paint the PF as green and set PF color to blue only in the car road area. Just an idea.

#3 Devin OFFLINE  

Devin

    Moonsweeper

  • 487 posts
  • Its all HCLR to me!
  • Location:Sacramento, California,

Posted Mon Mar 28, 2011 10:44 PM

It looks great so far!

#4 Wickeycolumbus OFFLINE  

Wickeycolumbus

    River Patroller

  • 4,064 posts
  • Location:Michigan

Posted Tue Mar 29, 2011 2:12 PM

View PostRastignac, on Sun Mar 27, 2011 1:55 PM, said:

Hi !

Why is my avatar a fast red European car ? It's the main sprite of my first 2600 game.

I started a brand new project a few years ago. August 2008 (damn, time flies). Version "0.0.1 alpha" was shown onto Stella Mailing List. Nobody remembers it.


I remember seeing that! I was actually wondering if your avatar was from it. Keep up the good work :thumbsup:

#5 Atari_afternoon OFFLINE  

Atari_afternoon

    Moonsweeper

  • 295 posts
  • Location:Germany

Posted Wed Apr 27, 2011 11:33 AM

The car wheels and the introduction screen look great :)

#6 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Mon May 2, 2011 7:05 PM

Grr. Screenshot please. :)

#7 Impaler_26 OFFLINE  

Impaler_26

    Cookie Meister

  • 2,148 posts
  • Braindead
  • Location:Hueco Mundo

Posted Tue May 3, 2011 12:17 AM

View Postyuppicide, on Mon May 2, 2011 7:05 PM, said:

Grr. Screenshot please. :)
Here you go:

f40v002a.bin.png f40v002a.bin_2.png

#8 Atari_afternoon OFFLINE  

Atari_afternoon

    Moonsweeper

  • 295 posts
  • Location:Germany

Posted Tue May 3, 2011 4:07 AM

^^You must see this in motion! :)

#9 TrekMD OFFLINE  

TrekMD

    Stargunner

  • 1,542 posts
  • Location:Coral Gables, FL

Posted Tue May 3, 2011 5:38 AM

Very nice!

#10 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue May 3, 2011 10:00 AM

Wow! That screen shot looks great. I love the skid marks.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users