Weber's Rants (tutorials)

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Weber's Rants (tutorials)

Post by Artcfox »

I really like the sprites! Will the driving be all on one screen, or will it scroll?
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Weber's Rants (tutorials)

Post by D3thAdd3r »

4 way scrolling hopefully without a HUD. For the minimap I might become limited by ram tiles, but ideally it would be transparently drawn over the top of the ground. Otherwise it would have to be a tile based HUD, where I couldn't do maps except with prebuilt screens stitched together, and static tiles representing those for the minimap(similar to RC Pri Am and others did with sprites). Even that would require a custom video mode, as mode 3 does not support sprites on the HUD. At that point, maybe a side HUD to get a more square camera area. Lots of things still in the air.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Weber's Rants (tutorials)

Post by Artcfox »

Could you just use fixed position sprites over the top of the scrolling mode 3 background, and fill the data in on the fly based on the map data, so you can have transparency?
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Weber's Rants (tutorials)

Post by D3thAdd3r »

I think Jubation was talking about something like ram sourced sprites(I think SPI Ram only?) for some of his video modes, so possibly it could be useful to have such a thing in mode 3. I was planning on directly manipulating ram tiles, but the prior concept would be more useful in general.

So either way I am figuring I will crash into some wall requiring a custom video mode, and maybe there are general additions that could be added to standard mode 3 as options. If the custom video mode ends up making more sense, then I would be inclined to attempt the SPI vram mode.
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Weber's Rants (tutorials)

Post by Jubatian »

D3thAdd3r wrote: Thu Mar 01, 2018 12:17 am I think Jubation was talking about something like ram sourced sprites(I think SPI Ram only?) for some of his video modes, so possibly it could be useful to have such a thing in mode 3. I was planning on directly manipulating ram tiles, but the prior concept would be more useful in general.
In Mode 3, you can use RAM sprites, videoMode3.def.h gives information on it (SPRITE_RAM_ENABLE enables it, then the SPRITE_RAM sprite flag indicates that the sprite data has to be fetched from a user RAM tile).

In Mode 74, the M74_SPR_RAM flag indicates that the sprite data has to be fetched from RAM. However if you only want to change the color set of a sprite, Mode 74 provides more efficient means for that (which FoaD uses extensively even for compression). The M74_RECTB_OFF and the M74_REC_SLOW compile time flags control this, see videoMode74.def.h. FoaD uses M74_REC_SLOW (and it can still output all those sprites!).
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Weber's Rants (tutorials)

Post by D3thAdd3r »

That could be quite useful. M74 might be a good candidate for this also.
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Weber's Rants (tutorials)

Post by D3thAdd3r »

Designing the track tiles out more I am realizing the sprites are simply too big, for blitting, as well as the track graphics in general. Making the track match the scale of the previous cars ends up too many tiles, and gives the whole thing a "zoomed in" look, with poor tiling ability. That limits visibility too much also, which directly affects the gameplay I am trying to create. The emphasis will be on very high speed where the skill is power slide timing(front brakes only in this game), so it would be annoying if the corners just pop up on you without a good amount of space to see ahead. I decided all cars must fit inside a 16x16 frame for all rotations, which is a good deal smaller than what I previously posted which were edging close to 24x24 frames for some rotations. I have not managed to rework those out yet, as creating the original ones took quite a lot of time. Visually it will not look as good in a static screenshot perhaps, but I think it helps it look good to the player relying on the graphics for spatial feedback in motion.

I am also making compromises on track graphics, though they should be significantly better than what I previously posted. R.C. Pro Am is very loosely an inspiration for this game, but I want to go places that game never did, nor the sequel, though the latter did manage to provide a lot more turn variety than the original. I am hacking, modifying, tiling and testing a lot so that tiles are versatile to meet up with lots of other tiles; this is opposed to many other racing games where certain tiles are designed to look good, but only mate with a few other tiles. So I basically took ideal lines and patterns, warped and distorted them back and forth to match what meets up best with more types of tiles. Any type of line element can tile indefinitely with at least itself, with few tiles, which allows very arbitrary shapes. Still heavily under construction in the early phases, but thought I would share something as an update(literally 6 hours of work just for what is shown, I am no artist!), since this largely shows what I am trying to go for(something I don't recall seeing any 2d racing game actually do). I would like a track designer to have lots of freedom to create hellish corners anywhere and in any way they wish, without any feeling of generic cookie cutter needed.

This is a bit of an annoying stage, since I cannot really test code until I have an editor to make test scenarios. I cannot make an editor until the graphics are at least close to final, as otherwise the tiles change so much that those tracks would be totally broken. Years back I copied R.C Pro Am graphics for an incomplete racer, which was much easier, but going forward I am going to attempt as much original content as I can for future games. I just need to force myself to keep at this, and not get side tracked.
Attachments
Screenshot from 2018-03-31 18-27-02.png
Screenshot from 2018-03-31 18-27-02.png (137.6 KiB) Viewed 12976 times
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Weber's Rants (tutorials)

Post by Artcfox »

Wow, that looks really sweet!
User avatar
Jubatian
Posts: 1560
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Weber's Rants (tutorials)

Post by Jubatian »

Nice! I checked out R.C. Pro Am, it has an useful feature of having road signs indicating curves, making it a little easier to follow the track. You could also implement a better camera system (something similar to what I did in FoaD) so the player sees more of the track ahead.

By the way Mode 74 would work quite well for R.C Pro Am's perspective. You may use a 192x192 viewport, so X and Y sizes match up, it is easier to plan your camera, while due to the 1.5:1 pixel aspect ratio, it asks for that kind of view like R.C Pro Am. The track graphics you produced would be fine for it, you only have to draw appropriate cars. In Mode 74 by the way you can have 2bpp sprites if you need a lot of sprite images (FoaD also exploits this: the recoloring feature can be tricked to allow for such compression too: the 3bpp dragon and the 1bpp human sprites are overlaid on each other).
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Weber's Rants (tutorials)

Post by D3thAdd3r »

Thanks guys, for sure I will do as much or potentially more arrows on the road as RCPM, as it is starting to look like a HUD is not realistic. The more "cookie cutter" corners make a minimap a lot easier to pull off, and now when I would be forced to generate something into an 8x8 tile representing something like the size of a screen, I am not sure how good such aliasing would work out automatically. One possibility would just be having pre-baked turns, but a lot more of them. Not sure on all that, just going to wing it and see what happens honestly; there is not tight plan here.

As for graphics, right now I plan to finish it out entirely as straight overhead view, but I could throw some ripped perspective cars to see if it indeed works out with the track graphics. I am not sure what it would look like. I managed to pull off semi-believable bridges now, and it took so few tiles to do, so I think this will be a good direction for now at least. I am leaning towards M74 still, but I am getting some sort of skeleton actually up and drawing graphics right now in M3. I would be interested to see how well the new SPI Ram stuff in M74 can cooperate with other things, as I do plan on vsync mixer. Probably what I want to do will not work out that well, but we will see how cycles play out.
Post Reply