Jump to content
IGNORED

New Prototype - Driving thing


Sporadic

Recommended Posts

little update. Resized some stuff and removed transparencies from everything.

 

Hopefully it will perform smoother now on the Jag.

 

Included some really bad horizon scrolling in this. (Hopefully patches will help here) If you turn to the left then it's nearly correct. If you turn right then the sprite vanishes forever and you see into a black hole.

 

I need to slow it down as it moves way too fast at slow speeds and small corners but hey ho.

 

You also need to be moving for the horizon to move (realism here people).

 

 

road.abs

  • Like 1
Link to comment
Share on other sites

unfortunately it's tearing again, a bit differently to last time, seems even more epic at full height tbh! It's all happening around the overlaps with that horizon object (objects?) - when it's off screen, the tearing vanishes.

 

From here I think modifiable branch objects is going to be the way to handle the road. It's murky stuff though as it's not 100% (hence why there's no info put out for it yet).

Link to comment
Share on other sites

I might get chance tonight to have a look. I wonder if I can clip the horizon mountain graphic at the road height or animate it up/down rather than have it sit behind the road lines.

It looks like it'll help, you can mess with making y-values smaller no problem iirc, it's x-values where things would get messy (probably requiring you to fiddle with g_width as well). I can't make my button presses small enough to tell how many possibilities you have, but it shouldn't be many, maybe 8 or so?

 

BTW, is there also a separate sky object as well with the rock over it?

 

And you deactivate road scanline objects when they are not needed, or put them off screen or something? Or do they end up drawing on top of each other?

Link to comment
Share on other sites

Included some really bad horizon scrolling in this.

was thinking, as we're still moving the road and not moving a car to match a generated road as we meet it, maybe it'd be OK to just weld the horizon x-pos to that of the furthest road segment and explore the physics stuff once you have a car to play with? :lolblue:

Link to comment
Share on other sites

It looks like it'll help, you can mess with making y-values smaller no problem iirc, it's x-values where things would get messy (probably requiring you to fiddle with g_width as well). I can't make my button presses small enough to tell how many possibilities you have, but it shouldn't be many, maybe 8 or so?

 

BTW, is there also a separate sky object as well with the rock over it?

 

And you deactivate road scanline objects when they are not needed, or put them off screen or something? Or do they end up drawing on top of each other?

 

Yeah there is a sky object behind the mountains. But the mountains aren't transparent yet. But in the future I would want the mountains transparent so they can fly around on top of the sky. Maybe even another layer of parallax would look cool too.

 

I haven't bothered deactivating the road lines yet. when you are going "uphill" when they are all visible there is no overlap. However, they do start overlapping as you go level and then downhill.

Unfortunately isn't not going to be very performant to check if each line is below a y value to disable/move it as i'd have to iterate all the lines (although only the top 30 probably overlap the most).

 

Originally I did allow the downhill to go further, but there was far too many lines overlapping then and half of them disappeared - so I restricted the downhill movement.

Link to comment
Share on other sites

was thinking, as we're still moving the road and not moving a car to match a generated road as we meet it, maybe it'd be OK to just weld the horizon x-pos to that of the furthest road segment and explore the physics stuff once you have a car to play with? :lolblue:

I started with that and it looked pants. I thought I might as well go all in

 

EDIT: Plus I wanna get the car moving next, once I fix the horizon and stop the barfing

Edited by Sporadic
  • Like 1
Link to comment
Share on other sites

OK, so do you have pre-generated tables for the y-positions? Or do you calculate them at runtime? If so, you could rip through them and any that have the same value consecutively, you could set the previous ones to 255 or whatever and be off out of the way, rather than having the OP deal with them and the one/s that go over. If it's only 30 or so maybe it won't make much difference.

 

I'll PM you re: branches.

  • Like 1
Link to comment
Share on other sites

Ok, on my PAL Jaguar this is now f*%cking fast. I can't see any tearing or missing road lines etc. I didn't see the previous version to compare this against though.

 

I really hope this is the case for you NTSC chaps too. If someone could test on a real one that would be appreciated.

 

Main changes made were;

 

- Changed the BG colour to the same green as the road sprites and remove the "Grass background sprite".

- Clip the height of the horizon mountain sprite so it never overlaps the road. I do this by setting R_sprite_height when the player presses up/down

- Move the sky sprite up with the mountains so that also doesnt overlap anything.

- Awesome Raptor patch applied to help/fix sprite wrapping. Sooooo, now the horizon moves correctly both directions and the speed changes according to turn angle and car speed.

- By default the horizon bobs and clips with the road height, however you can make it move with the road by pressing 2. Press 1 to go back to the default bobbing effect.

I prefer the default, this was just to test performance diffs.

- Changed the speed up/down code so it doesn't look so screwy now.

 

I really wanna get back to Astrostorm now and finish it off and iron out the last things so i'm happy so leave this as is for now (more so if NTSC is ok)

 

Next things to do though will be;

- Add a way to 'map' out tracks

- Have the road follow that map.

- Add a car graphic and have the player control that instead of the road.

- Other cars and scenery that all scale 90's style.

- A shitton of other stuff to make it into something playable etc etc etc

 

:waving:

road.abs

Edited by Sporadic
  • Like 4
Link to comment
Share on other sites

That looks great! No tearing in NTSC.

 

I'd go with what sh3 said above though, while calculating the Y, if its on a same line, take the last one, and set all the previous same ones to disabled - that'll give you a much faster object list.

Excellent, thanks for testing.

 

Something else I did, that I forgot to mention was to slow down the inputs from the dpad. This is because when you moved, it spammed the powadiff commands. It still didn't feel right, so I changed the powadiffs to powasets to set the xadd and clear that each frame. That looked faster on screen. But yeah, spamming the powa commands is most definitely not recommended lol. Well actually, the powaset seems ok getting called every frame, so perhaps its just the powadiff that effects performance if spamming. Bit like me now, rambling on .....

 

I'll look at the Y position stuff too. But i'm going to leave this here for now and finish the other game. Otherwise it'll never get done ;)

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

  • 2 months later...

It's more PowaRoad time!

 

Started playing with getting the road to follow a path and giving the player something else to do.

 

The road movement as it approaches corners is a little jumpy but i've thought of a better way to handle that now which i'll try next. I also had it changing height too but that was even more jumpy.

It's not jumpy because of the framerate but rather how I coded it lol

 

The "track" it follows loops too so there is currently no finish line...

 

Use the DPad to change speed and turn and look at the awesome car physics!!!!11!1!111

 

(Graphics shamefully ripped off for now)

 

 

 

PowaRoad.abs

  • Like 5
Link to comment
Share on other sites

The road movement as it approaches corners is a little jumpy

 

 

Yeah...... not any more. smooth corner movement now. :-D All adapts with your speed too.

 

Just need to think how to apply a similar fix to the hills now.

 

That guy is getting tired always driving uphill.

 

 

You wouldn't believe how many DIM xxxxx[150] I have in this already lmao

PowaRoad111115.abs

Edited by Sporadic
  • Like 4
Link to comment
Share on other sites

Time for another update;

 

Smooth hills :D

 

Might need to tweak some constants to get things correct but i think it looks about right.

 

Your speed will effect how fast the corners and hills move left/right up/down.

 

Currently pushing about 50 DIM xxx%[150] vars hehe. That's all so I can powaset the xadd and yadd of the "scanlines" for the different speeds.

 

Will probably have a go at scenery next!! Things might fall down here with too much for the OP to handle (overlapping stuff) but we'll see.

Here's the latest binary, enjoy.

PowaRoad121115.abs

  • Like 3
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...