Hello all! I decided to publish pseudo 3d example with the camera rotating. First post updated.
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.
Thatās awesome! Iāve been watching your other videos with textures and it looks really nice!
Thank you! I also like how it looks 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
This is amazing.
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
ā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:
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.
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
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
(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.
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