Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

I believe the shadow COULD solve it because every bike has its own shadow. In fact the shadow is the bike projection to xz plane so the convert formula is something like that:

- Input: bike 2d position: bx0, by0 ; shadow 2d position: sx, sy

- Output: bike 3d position bx1, by1, bz1

Convert formula: 

bx1 = bx0;

by1 = by0 - sy;

bz1 = sy

That's the idea. In detail it's a little more complex because there are multiple bikes and shadows in a scene so we have to match/ pair a shadow with a bike. But that's just implementation detail.  

Ah, I see! That might work as intended... While wouldn't  work while going up ramps, that would just be something rather minor, I believe... (Or you could also try linking that to specific instances of the bike's motion, seeing as when going up a ramp, it needs to switch over to different sprites... Implementing this would be the difficult part though. 




Here are a few images in two instances, where they go up a hill and change a sprite while also moving along y. The second one shows the shadow sprite, and how it moves sideways along the sprite. Will that script help solve this? And if so, how will I implement it...? (I wish I had more experience with scripting, but stuff tends to blow up in my face when I attempt it...)

(1 edit)

You should regroup all ramp tiles into a pattern.

In script we could detect if a 2d bike  intersect with a ramp shape or not, from that intersection we could estimate its 3d y and z. It's still a trial and error process though.

Other things will complicate the situation for example: 

- two bikes one on ground, one in the air have the same x  and a shadow, how to matching? 

- the bike goes through and intersect with two consecutive small ramps, how to interpret?

In principle it's doable but it's still very big challenge scripting wise at least for me.

Just  pass me your wip  3dn, i will see what can i do with it.

It certainly sounds doable, but I agree, very very complicated...

And yeah, I will adjust the ramps to do that, I haven't even started messing with those yet though, I am focused on making sure this works for the most part, before I pu t more work into it.

And sure, I can pass that along! Just know that like in the screenshots, it is rather messy, as I haven't gotten that far into the process yet!

- 3dn Excitebike File -

I said you should regroup the ramp with the meaning that later on we can detect intersection between a bike and a ramp :D

I will give it a try tomorrow. Gonna take a sleep now.

Good night to all of you!

Ooohhh... Alright, I getcha! x3 I should have done that before sending it in... Hmm... There are also a lot of ramps and hills in the game, will that need to be done to all of them? But sure, go get some rest, goodnight!