Car racing game concept, idea, want, worth a try?

Chat about anything CX16 related that doesn't fit elsewhere
SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

Car racing game concept, idea, want, worth a try?

Post by SlithyMatt »


The GBC game paks could have up to 8MB of ROM and even add up to 128k of additional RAM if so equipped.

lamb-duh
Posts: 63
Joined: Fri Jul 10, 2020 7:46 pm

Car racing game concept, idea, want, worth a try?

Post by lamb-duh »



1 hour ago, SlithyMatt said:




The GBC game paks could have up to 8MB of ROM and even add up to 128k of additional RAM if so equipped.



I didn't realize gbc games got that big! the toy story racer rom is only 2mb, even the pokemon games are only 1-2mb. The biggest gbc rom I have is donkey kong country (at 4mb, which used a lot of prerendered assets). Do you know which games used 8mb carts?

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

Car racing game concept, idea, want, worth a try?

Post by SlithyMatt »


May only be a theoretical limit. Don't know if any games went that high

Fenner Machine
Posts: 68
Joined: Tue Jul 28, 2020 8:30 pm

Car racing game concept, idea, want, worth a try?

Post by Fenner Machine »


Some interesting and inventive suggestions and ideas of limits and capabilities.


A pre rendered environment would not achieve what I envision.


 


I am thinking of a 360 degree environment.


The track, “representations” of cars and other interactive elements can be “simple” 3D for game engine purposes, such as screen placement and collision detection.


The track would be calculated and displayed as vectors and curved shapes.


Cars and other item positions would be calculated in 3D space but displayed as 2D sprites.


 


I don’t know if it would make a difference to the maths, or if optimisations can be used, but no full 3D shapes or rotation would be required.


“y” and “z” would be directly related to each other, as in how far from the screen/camera. Like a flat plane projected into the screen at an incline.


So maybe only two coordinates such as "x" and "z" would need to be calculated in real time, or "y" could be more easily calculated?


Imagine a weird mix between Starglider, Mario Kart and Sega Rally.


 


I would like 640×480 resolution if possible for the increased imaged fidelity and 2D quality.


Screen split top and bottom half.


Bottom half track and playfield.


Top half backgrounds and sky.


 


Does this sound doable?


If the game engine works, it could be modified for other games.

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

Car racing game concept, idea, want, worth a try?

Post by StephenHorn »


Strictly my opinion, but 640x480 sounds ambitious, even considering that you're limiting your 3D to the bottom 320x480. It's a fill rate issue, your 8MHz CPU can only write so quickly, even if we're just talking wireframes. Just keep in mind that 320x480 is 4x as much work as 160x240. Also, I'm assuming you plan to draw to something like a 1bpp bitmap, so your memory requirements are 19KB and you can draw to a bankbuffer and flip between the two. 2bpp is also theoretically possible, costing a reasonable 37.5KB but requiring twice as many writes to the VERA. 4bpp will be untenable, that's 75KB and thus more than half of your VRAM -- this will severely limit your pixel drawing, because you won't be able to fit a backbuffer and will have to either live with seeing the draw process happen over multiple frames or you'll have limit your drawing exclusively to the vblank.

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
User avatar
AndyMt
Posts: 326
Joined: Sun Jun 21, 2020 3:02 pm
Location: Switzerland

Car racing game concept, idea, want, worth a try?

Post by AndyMt »


I agree that this will be ambitious in  640x480, especially in bitmap modes. Although - with a bit of trickery and strategically optimized tile definitions you could do this in 16x16 tile mode with 256 colors. You would only have to render the borders of the track. So instead of rendering the full lower half you could arrange the tiles just where the track is. This way memory requirements could be lowered substantially. 60-80 tiles of 16x16 in 8bpp require 15 to 20kB of VRAM for tile definitions. Let it be 100, then it's 25kB. Because the most part of the track (asphalt) and surroundings (grass etc.)  would be the same tiles all the time. You would also have to update much less VRAM. Page switching would also be easier, as the pages require a lot less memory.

Of course this might require slightly more CPU power (not sure actually) - but we do have that in the X16.

Then you would have enough VRAM left for a nice bitmapped sky... Or use tiles, there, too.

lamb-duh
Posts: 63
Joined: Fri Jul 10, 2020 7:46 pm

Car racing game concept, idea, want, worth a try?

Post by lamb-duh »



11 hours ago, Fenner Machine said:




Does this sound doable?



I think this is definitely doable, but you're going to have to make a lot of compromises between things like resolution, framerate, how much stuff is on the track. It's hard to say whether there's a balance of all these things that will make the game you want.

That said, I think in terms of computation time there's two things that are going to be taking up most of your time:

(1) coordinate projection. you need to do lots of multiply-accumulates, probably with more than one byte of accuracy. It wouldn't surprise me if there are good well-optimized libraries for the 6502 that could easily be adapted, though.

(2) the way that vera's memory is accessed is not great for drawing vector graphics. I think this is going to be the most difficult challenge in porting wireframe techniques from other 6502 platforms. even drawing a line requires seeking in vram for every scanline. you might have to render the scene into system memory, then copy it into a backbuffer in vram. or maybe there's something more clever you can do.

TomXP411
Posts: 1783
Joined: Tue May 19, 2020 8:49 pm

Car racing game concept, idea, want, worth a try?

Post by TomXP411 »



On 8/2/2020 at 1:40 PM, Fenner Machine said:




Some interesting and inventive suggestions and ideas of limits and capabilities.



A pre rendered environment would not achieve what I envision.



 



I am thinking of a 360 degree environment.



The track, “representations” of cars and other interactive elements can be “simple” 3D for game engine purposes, such as screen placement and collision detection.



The track would be calculated and displayed as vectors and curved shapes.



Cars and other item positions would be calculated in 3D space but displayed as 2D sprites.



I think it would help if you drew some mockups of what you mean. I can sort of picture what you're describing, but I don't knmow if the picture in my head is anything like what you're thinking. 

 

Fenner Machine
Posts: 68
Joined: Tue Jul 28, 2020 8:30 pm

Car racing game concept, idea, want, worth a try?

Post by Fenner Machine »


I have made a hilariously bad 3 stage image of what I have in mind.


Many aspects of it, include aspect ratios ba dum tss, are way off, but gives an idea.


Car heading toward a turn, turning, and coming out the other side.

1540746736_Examplegamelook2.thumb.jpg.6148da3a5f68d0b2180c9f891b9a0e4c.jpg

Fenner Machine
Posts: 68
Joined: Tue Jul 28, 2020 8:30 pm

Car racing game concept, idea, want, worth a try?

Post by Fenner Machine »


I think I’ve found a game that looks similar to what I envision.


Enduro for Atari 2600.


Something like that but a 360 degree 3D environment/plane with road edges drawn with vectors.


I’m thinking vectors as full polygonal 3D would be implausible.


Add in better 2D graphics, such as nice backgrounds and good sprites.

Post Reply