Jbox2d simulation runs slowly
Game Development Stack Exchange
by Ziv the fire
21h ago
I wanted to use jbox2d for my project but I have a issue the physics simulation is running very slowly I tried to change game loops and it did not run any faster the best solution I found is still like half the speed it should be game loop code (FPS = 60): double drawInterval = 1000000000/FPS; double delta = 0; long lastTime = System.nanoTime(); long currentTime; while(thread != null) { currentTime = System.nanoTime(); delta+= (currentTime-lastTime)/drawInterval; float md = (float) (delta/1000000.0); lastTime = currentTime; if ..read more
Visit website
Godot on signal trigger external animation
Game Development Stack Exchange
by depperm
21h ago
It may not matter, but I'm following How to make a Video Game - Godot Beginner Tutorial. I want to implement the dying animation instead of removing CollisionShape2D from the body (parameter passed to Area2D's _on_body_entered signal). The player: The player animations: The code to remove the CollisionShape2D (player falls off the screen before restarting, based on tutorial) that works: func _on_body_entered(body): print("You die") Engine.time_scale = 0.5 body.get_node("CollisionShape2D").queue_free() timer.start() What I've tried to get dying animation to play: func _on_b ..read more
Visit website
Regarding with pixel arrays and textures in SDL2
Game Development Stack Exchange
by Scene
21h ago
Currently, the way I render my frames is as follows. I have two arrays of pixels (in SDL_PIXELFORMAT_ABGR8888) called frame_pixels (which represents the pixel data for the current frame) and clear_frame_pixels (which is a constant array of black pixels). First I clear the renderer and reset frame_pixels by copying clear_frame_pixels to it. During my draw calls, I write to frame_pixels and then copy the data into a texture called frame_texture (with access SDL_TEXTUREACCESS_STREAMING), which is then copied onto the renderer and presented. SDL_RenderClear(renderer) memcpy(frame_pixels, clear_fr ..read more
Visit website
How to put animation correctly from one character into another in Unreal Engine 5 using retargeting? Root problem
Game Development Stack Exchange
by Sven Petrović
21h ago
So I imported animation from Maximo into Unreal Engine 5 but my character is not moving properly in running slide animation. I used retarget Root option and now my character's animation is good but I had to retarget Root on character pelvis to make it work. Right now the problem is that when character is finished with slide animation he is going back to his root position while I want him to stay on the place where animation is over. Here are the pictures to make it easier for you ..read more
Visit website
Implicitly ray traced cone texture mapping -- Trying to avoid atan
Game Development Stack Exchange
by Steven Lu
21h ago
I am kinda looking for some ways out of this little rabbit hole. I wanted to experiment with high fidelity per pixel cone drawing and shading. I have an application (radar) that really only needs cone 3D geometry and I figured it would be cool if I could render them implicitly and get sharp pixel perfect geometry by deriving the geometry in addition to the shading within the fragment shader. This all works and I got quite far embedding the z-picking and occlusion logic such that now I finally am able to ignore parts of the cone that intersect my pixel rays behind the camera and to always show ..read more
Visit website
Use DirectX 11 & HLSL in SDL
Game Development Stack Exchange
by M 027
21h ago
I saw Lazy Foo using OpenGL & GLSL in SDL, but I want to use DirectX 11 & HLSL in SDL. Is there a way to do this, and how ..read more
Visit website
How can I efficiently make a delta snapshot that accounts for entities/components that have been added/removed?
Game Development Stack Exchange
by Adrian
21h ago
In reference to the snapshot and delta compression approach popularized by Quake 3, but with ECS. Understand the delta should only contain changes — makes sense. However, if a snapshot delta no longer contains some component x, how does the client know if it’s because there is no state change or because the server removed the component? Same for entities, an entity may just not have any state change over the last few ticks, or, it may have been destroyed on the server, perhaps it was killed but we missed that state update. Now, I could: Encode this into the actual diff as proposed in the comm ..read more
Visit website
How do I connect city centers in a realistic way
Game Development Stack Exchange
by YANNTASTIC5915
21h ago
I am making a FPS/RPG exploration game (first person shooter RPG, think first person Zelda with guns), and one of the main focuses is a large city. Due to the fact that I am an indie dev, and don't have the time to make an entire city, and also the fact that I have previous experience with procedural generation (not cities though), I've decided that I'd like to use it to save time. I was reading this post, and it said to make a city you need: City centers: Pick some points of the still empty map as main traffic nodes. They should be evenly distributed around the map Highways: Connect the mai ..read more
Visit website
Mouse coordinates to world space offsetting?
Game Development Stack Exchange
by Valtsuh
21h ago
so i'm trying to make a mouse to world space function, and I seem to always end up with the rays cast offsetting. I've looked at numerous tutorials, tried numerous examples. Tried with glm, gluUnProject, but what ever I try I always seem to get similar results to what my function gets. Which looks like something below: Not sure which part of code to paste, so, The function itself: drx::util::V3 MTW(double z) { double w = drx::gfx::canvas.w; // 640.0; double h = drx::gfx::canvas.h; // 480.0; double mx = drx::view::window.mouse.x; double my = drx::view::window.mouse.y; doub ..read more
Visit website
Deleting components via OnValidate script while in editor
Game Development Stack Exchange
by CheckerT
21h ago
I want to create different types of platforms for my game, and they are currently all in different prefabs. This works fine, but it is just taking so long to search for the prefab, dragging it in, and maybe if I dragged the wrong one into the scene, I would need to create a new platform from scratch. My idea is that you have a custom inspector for a script that sits on an example platform, and have an enum to choose what kind of platform is placed. This idea worked until I tried to delete / add components that are not needed for the platform (A spike platform does not need a script to destroy ..read more
Visit website

Follow Game Development Stack Exchange on FeedSpot

Continue with Google
Continue with Apple
OR