Jump to content

Photo

New Prototype - Driving thing


128 replies to this topic

#51 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 7:06 AM

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

 

 

Attached Files

  • Attached File  road.abs   304.64KB   13 downloads


#52 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Thu Aug 27, 2015 8:02 AM

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

#53 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 8:09 AM

Bummer :(

 

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.



#54 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Thu Aug 27, 2015 8:21 AM

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?

#55 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Thu Aug 27, 2015 8:26 AM

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:

#56 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 8:28 AM

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.



#57 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 8:29 AM

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, Thu Aug 27, 2015 8:30 AM.


#58 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Thu Aug 27, 2015 8:43 AM

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.

#59 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 3:03 PM

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:

Attached Files


Edited by Sporadic, Thu Aug 27, 2015 3:08 PM.


#60 CyranoJ OFFLINE  

CyranoJ

    Quadrunner

  • 5,242 posts
  • RAPTOR in LOCAL
  • Location:Adelaide, SA

Posted Thu Aug 27, 2015 3:19 PM

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.



#61 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 3:29 PM

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, Thu Aug 27, 2015 3:31 PM.


#62 CyranoJ OFFLINE  

CyranoJ

    Quadrunner

  • 5,242 posts
  • RAPTOR in LOCAL
  • Location:Adelaide, SA

Posted Thu Aug 27, 2015 4:23 PM

Well, POWASET is just a write. POWADIFF is a read/add/write.



#63 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Aug 27, 2015 4:27 PM

Yep, was thinking that. ;)



#64 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Fri Aug 28, 2015 1:23 AM

No tearing, seems as fast as ever, good work!

#65 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Tue Nov 10, 2015 11:30 AM

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)

 

 

 

Attached Files



#66 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Tue Nov 10, 2015 11:43 AM

To be honest I didn't believe rb+ could even come close to doing something like this!

#67 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Tue Nov 10, 2015 11:51 AM

To be honest I didn't believe rb+ could even come close to doing something like this!

Might need to revisit the powa scaling request (scale in place, not to the right). We'll see what happens once I chuck in some scenery :)



#68 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Tue Nov 10, 2015 3:45 PM

You mean this?

#69 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Tue Nov 10, 2015 4:00 PM

Yes that nightmare conversation lol 

 

I will try that formula you linked to there and see what happens. 



#70 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Tue Nov 10, 2015 4:11 PM

Although thinking about it. For this particular game, I could probably precompute all the sizes and offsets.  I havent got to that yet so will try that I guess. :) 



#71 CyranoJ OFFLINE  

CyranoJ

    Quadrunner

  • 5,242 posts
  • RAPTOR in LOCAL
  • Location:Adelaide, SA

Posted Tue Nov 10, 2015 4:57 PM

Although thinking about it. For this particular game, I could probably precompute all the sizes and offsets.  I havent got to that yet so will try that I guess. :)

 

That might be for the best, because then you can pre-compute the hitbox sizes as well



#72 sh3-rg OFFLINE  

sh3-rg

    River Patroller

  • 3,379 posts
  • doge + tie = dothemath
  • Location:BOLTON, England

Posted Wed Nov 11, 2015 1:27 AM

Love how this is looking, Rik - nice one!



#73 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Wed Nov 11, 2015 12:10 PM

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

Attached Files


Edited by Sporadic, Wed Nov 11, 2015 12:11 PM.


#74 ggn OFFLINE  

ggn

    Stargunner

  • 1,340 posts
  • Location:Athens, Greece

Posted Wed Nov 11, 2015 12:52 PM

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


wedding-cake-moar.jpg

#75 Sporadic OFFLINE  

Sporadic

    Moonsweeper

  • Topic Starter
  • 487 posts
  • Probably RB+ing
  • Location:UK

Posted Thu Nov 12, 2015 12:28 PM

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.

Attached Files





Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users