Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 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 1 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted August 27, 2015 Share Posted August 27, 2015 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). Quote Link to comment Share on other sites More sharing options...
Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 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. Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted August 27, 2015 Share Posted August 27, 2015 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? Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted August 27, 2015 Share Posted August 27, 2015 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? Quote Link to comment Share on other sites More sharing options...
Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 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. Quote Link to comment Share on other sites More sharing options...
Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 (edited) 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? 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 August 27, 2015 by Sporadic 1 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted August 27, 2015 Share Posted August 27, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 (edited) 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 road.abs Edited August 27, 2015 by Sporadic 4 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted August 27, 2015 Share Posted August 27, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 (edited) 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 August 27, 2015 by Sporadic 2 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted August 27, 2015 Share Posted August 27, 2015 Well, POWASET is just a write. POWADIFF is a read/add/write. Quote Link to comment Share on other sites More sharing options...
Sporadic Posted August 27, 2015 Author Share Posted August 27, 2015 Yep, was thinking that. Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted August 28, 2015 Share Posted August 28, 2015 No tearing, seems as fast as ever, good work! 1 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 10, 2015 Author Share Posted November 10, 2015 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 5 Quote Link to comment Share on other sites More sharing options...
ggn Posted November 10, 2015 Share Posted November 10, 2015 To be honest I didn't believe rb+ could even come close to doing something like this! Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 10, 2015 Author Share Posted November 10, 2015 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 Quote Link to comment Share on other sites More sharing options...
ggn Posted November 10, 2015 Share Posted November 10, 2015 You mean this? Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 10, 2015 Author Share Posted November 10, 2015 Yes that nightmare conversation lol I will try that formula you linked to there and see what happens. Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 10, 2015 Author Share Posted November 10, 2015 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. Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted November 10, 2015 Share Posted November 10, 2015 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 1 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted November 11, 2015 Share Posted November 11, 2015 Love how this is looking, Rik - nice one! 1 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 11, 2015 Author Share Posted November 11, 2015 (edited) The road movement as it approaches corners is a little jumpy Yeah...... not any more. smooth corner movement now. 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 November 11, 2015 by Sporadic 4 Quote Link to comment Share on other sites More sharing options...
ggn Posted November 11, 2015 Share Posted November 11, 2015 You wouldn't believe how many DIM xxxxx[150] I have in this already lmao 4 Quote Link to comment Share on other sites More sharing options...
Sporadic Posted November 12, 2015 Author Share Posted November 12, 2015 Time for another update; Smooth hills 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 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.