### 3D Flight Simulator - Musical Trade Route

#### ceosol

• Posts: 2196
I feel like a starfox would be easier to make than Doom

#### ceosol

• Posts: 2196
Today, I played around with projecting 3D movement. All you have to do is move your mouse around and the box will angle itself.

flash

« Last Edit: February 09, 2017, 11:34:14 am by ceosol »

#### iii

• Posts: 184
I think it should be in reversed.
Hard to explained.
Take a box, or a book, and hold it up in front of you.

#### ceosol

• Posts: 2196
I think it should be in reversed.
Hard to explained.
Take a box, or a book, and hold it up in front of you.

I was thinking of it in curved space. More similar to it always being the same distance from you as you change your view angle. I had it as 2.8 + the perspective calculations at first but changed it to 3.4 - the calcs. The part where I failed was getting the size calculation to further indicate a curved path. I wanted to do 80% height/width in the center of the screen. However, one of the faces was not hitting the correct x,y coordinates when doing that so I took it out.

That does bring up a good point, though. If I have the ability to turn and strafe, I will need to have both perspectives happening at the same time. The book in front of you would be strafing. And turning would need curved projections.

#### ceosol

• Posts: 2196
I tested out some collision calculations. Friction will be a little tough. I tried it with 100% friction and it didn't look too hot. So this one has zero friction.

Also, at the request of iii, I switched to the reverse perspective.

<a href="http://static.stencyl.com/games/35903-0.swf" target="_blank" class="new_win">http://static.stencyl.com/games/35903-0.swf</a>

#### iii

• Posts: 184
Looks much better.
With this you can create some 2.5D games.
Such as top-down Racing Game, or a Platformer with a bit more depth.

Maybe you can use it with your Jacbil-Gobbet game?

#### ceosol

• Posts: 2196
Looks much better.
With this you can create some 2.5D games.
Such as top-down Racing Game, or a Platformer with a bit more depth.

Maybe you can use it with your Jacbil-Gobbet game?

Those are some really awesome ideas. Both the racecar and platformer with 3D perspective blocks would look incredible. I don't know about doing it for jacbil. The art style has changed so much already, I don't want to take even more time incorporating this.

#### merrak

• Posts: 1935
My experience so far has been you can expect to be able to render about 300 to 500 images (Flash) or 1,500 images (Desktop) before performance becomes an issue. A top-down racing game could be easy to make within those limits. A platformer, on the other hand, could easily push the limits depending on how many tiles you have and how deep they go.

For real 3D, those limits are probably lower. My numbers came from isometric projection, which has simpler math.

It'd be interesting to see how far into the world of 3D Stencyl can be pushed.

#### airman4

• Posts: 843
Nice idea and render for me
Sometimes when i move there is like a tiny lag , it feels bizarre but overall good

#### ceosol

• Posts: 2196
Such as top-down Racing Game, or a Platformer with a bit more depth.

It doesn't work quite as well as you had hoped. The matrix transformation cannot skew one side of the square without skewing the other. The dimensions must be constrained between the faces. If someone knows of another code for skewing one side of a square and not the others, I can try to play around with that. The way I envisioned multiple polyhedral shapes was altering the image itself and then performing new calculations based on the alternate 3D structure you are trying to construct. I am not quite there for getting it to work (as seen in the pyramid test) because I do not know the mathematics.

As you can see in the attached screenshots, you need to keep either x or y constant. Otherwise, you get massive seams showing.

#### ceosol

• Posts: 2196
squeeb mentioned making 3D shadows to me. I thought it would be fun

Math almost won the battle, but then out of no where the solution appeared.

#### merrak

• Posts: 1935
Neat! I just saw you got it shortly after I left.

#### ceosol

• Posts: 2196
Yeah, it really just required me to pull apart the equation. Once I separate m and b, I was easily able to solve for x (and back calculate y).

In this you can spin the die with Z and X. Move around the light source with arrow keys.

flash

« Last Edit: February 09, 2017, 11:35:06 am by ceosol »

#### ceosol

• Posts: 2196
New update. I decided to try oscillating the light. You can move it up and down some using up/down arrows. You can still spin the die with z and x. I got a little lazy with tinting the sides of the die

<a href="http://static.stencyl.com/games/35988-0.swf" target="_blank" class="new_win">http://static.stencyl.com/games/35988-0.swf</a>