Pseudo 3D Examples


#21

Can I know the method of importing the obj and can I have the file?


#22

The project is downloadable in the javascript channel of GDevelop’s discord.

To load a 3d model, scroll down the first JS event and at the end uncomment the loading method you need, comment the cube loading and save the project before starting the preview.

Make sure to modify the Z position in the second JS event to make the object far enough to not clip into the camera.


#23

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


#24

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.


Panoramic Filter?
#25

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


#26

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


#27

This is amazing. :sunglasses:


#28

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?


#29

black magic :exploding_head:


#30

@Unluccy I’m sure that with these you can do it:


#31

“Camera” rotation is controlled by changing the angle of the player’s sprite, so mouse control is possible. Use conditions as advised @ars_creativa .


#32

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!


#33

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.


#34

This is a problem… Сentering the camera on the cursor may help? Although I’m not sure


#35

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.


#36

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.


#37

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


Pseudo fps games
#38

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.


#39

What about fullscreen?

Your mouse can’t leave the window if the window takes up the whole screen taps head


#40

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 @Mikhail_Pomaskin 's (https://forum.gdevelop-app.com/u/Mikhail_Pomaskin) 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.