Pseudo 3D Examples

Hello all! I decided to publish pseudo 3d example with the camera rotating. First post updated.

8 Likes

Maybe someone will be interested - raycasting test 3, I was able to improve the emission of rays using the condition ā€œRaycastā€, it works instantly, but so far it is impossible to make walls with textures without bugs. But this pseudo 3D method works faster than the non-ray method and I will try to develop it further.

11 Likes

Thatā€™s awesome! Iā€™ve been watching your other videos with textures and it looks really nice! :+1::+1::+1:

1 Like

Thank you! I also like how it looks :grin: It is a pity that so far it will not work to make a full-fledged game, a lot of things still need to be finalized

2 Likes

This is amazing. :sunglasses:

1 Like

Hi everyone, a gdevelop newbie here, although Iā€™ve dabbled in amateur game development for about 20 years, starting with, among other things, Klik & Play. So Iā€™m pretty used to gdevelopā€™s even system.
I downloaded Mikhailā€™s work from his comments on YouTube (I go by the handle elveede there) and have experimented with it a lot.

My question: Does anyone have an idea how to integrate mouse look (only horizontal) into this pseudo-raycasting ā€œengineā€? Iā€™m not sure gdevelop can catch the mouse although HTML5 can do it via ā€œPointer Lock APIā€. Anyone have any ideas?

black magic :exploding_head:

1 Like

@Unluccy Iā€™m sure that with these you can do it:

ā€œCameraā€ rotation is controlled by changing the angle of the playerā€™s sprite, so mouse control is possible. Use conditions as advised @ars_creativa .

Thanks for the quick replies!

I will try that out asap. The issue usually was that the mouse cursor can still leave the game window making it impractical. But I will see whether I just did something wrong! Thanks!

Okay, I give up. Itā€™s easy enough to get the player sprite to move based on the mouse input (by using MouseX instead of of the Cursor X position) but itā€™s all useless if the cursor can move around freely on the screen?

How do I lock the cursor to the center of the window? I could not find a variable to do this, as compared to (for example) Construct Classic.

This is a problemā€¦ Š”entering the camera on the cursor may help? Although Iā€™m not sure

It occurs to me that you can hide the cursor, and make two variables for X and Y that copy and caps the mouse position to the windowā€™s dimensions. Then you can calculate the difference between these variables to the mouse position each frame to calculate the difference of the angle and change the view accordly.

That sounds good but how do you even cap the mouse position? So far I have not found a way to interact with the mouse cursor in any way from inside the program. Itā€™s position can only be read, it can be hidden, etc. but there is no way to cap it that I have found so far.

You donā€™t need to cap the mouse position, just the variables that copy the mouse position.
In pseudo code could be as is:
variable Xcapped = clamp (MouseX, 0 , WindowWidth)
variable Ycapped = clamp (MouseY, 0 , WindowHeight)

You might calculate the difference between the center of the camera and the mouse position to find the angle of movement.

And there is an action to hide the cursor:
imagen

Thanks! However, that means the mouse cursor can still leave the window, making it impossible to use it in-game. As far as my research goes GDevelop simply doesnā€™t support keeping the mouse cursor within the window.

1 Like

What about fullscreen?

Your mouse canā€™t leave the window if the window takes up the whole screen taps head

Another 3d exampleā€¦ mine is not nearly as nice as the ones mentioned in this thread, but itā€™s much simpler and easy to duplicate. Think of this as a way to do 3d for people that arenā€™t very good at math :slight_smile:

This is a very rough example. I used denziā€™s graphics as a base and free music from freemusicarchive to set the mood, and sound effects from kenney.nl

play online at gdevelop

download

(edit)
Iā€™ve been playing with @Jump 's (Profile - Mikhail_Pomaskin - GDevelop Forum) example and manage to generate an error. It really didnā€™t like the light objects with the walls having light obstacle behavior.

Iā€™ve managed some success but havenā€™t got everything figured out yet. Object that I create arenā€™t displayed exactly right - they appear slightly below ground for a reason I havenā€™t found yet.

1 Like

@FlokiTV if you havenā€™t yet seen this work!

1 Like

Nice! Any plans to make a sci fi one? I made a 3-level ā€œfake 3Dā€ demo of my sci fi concept in GDevelop, after I finally figured out that it takes a team of skilled individuals to make a real 3D game in Unity or Unreal. Seed: The Game