game-loop Questions

12

Solved

I find that most game development requires a main game loop, but I don't know why it's necessary. Couldn't we implement an event listener and respond to every user action? Animations (etc.) could t...
Absorber asked 2/4, 2010 at 8:12

1

Solved

I'm trying to make a simple 2D game in Java. As far as I know, my game should consist of two threads: "event dispatch thread" (for GUI operations) and "game thread" (for game lo...
Unrequited asked 26/1, 2021 at 18:25

1

Solved

So I've written the following function to show what i mean: use std::{thread, time}; const TARGET_FPS: u64 = 60; fn main() { let mut frames = 0; let target_ft = time::Duration::from_micros(1000...
Legg asked 27/7, 2020 at 8:6

7

Solved

Is there a simple way to make a game loop in JavaScript? something like... onTimerTick() { // update game state }
Nifty asked 23/12, 2009 at 22:32

1

Solved

If you're not familiar with the Gaffer on Games article "Fix your Timestep", you can find it here: https://gafferongames.com/post/fix_your_timestep/ I'm building a game engine, and in an effort to...
Willis asked 22/12, 2019 at 4:51

4

In the process of trying to work out a solid game loop in SFML I came across this issue which I can't seem to figure out. I was able to strip out all of the SFML code and still see the issue with c...
Prima asked 12/12, 2018 at 2:58

6

Solved

I'm developing an Android Game.In this game, There are tracks on which trains run. This is running thread. I want to show an alert dialog when there is a collision between. when I'm applying alert ...
Memoir asked 13/9, 2012 at 6:29

9

Solved

Call main.lua script at each game loop iteration - is it good or bad design? How does it affect on the performance (relatively)? Maintain game state from a. C++ host-program or b. from Lua script...
Suomi asked 21/4, 2010 at 18:41

1

im currently making a 2D game in Firemonkey for my Android phone using some TImage Controls and controling their positions and angles. Simple as that. I tried to use my normal way of looping, which...
Altigraph asked 17/10, 2016 at 9:12

7

I'm trying to figure out the best design pattern to use for managing a "competition" between two interacting objects. For example, if I want to have a Fox class that chases a Rabbit class through a...

1

For a while now I've experienced an intermittent 'stuttering' of the sprites that are in motion within my Android Game. It's a fiarly simple 2D OpenGL ES 2.0 game. (This is an ongoing problem which...
Croup asked 21/7, 2016 at 19:36

2

My setup is a multiplayer game, with sockets to async transfer data. Now because of the nature of a game, I have a game loop which should tick every 500ms to do player updating (e.g. position, app...
Torras asked 15/9, 2015 at 13:55

4

Solved

I'm implementing a game loop with constant FPS. I'm thinking about 25-30 FPS should be enough. Any ideas from your own experience? Should I even restrict FPS at all?
Basically asked 18/2, 2010 at 10:54

1

Solved

I'm new to JavaFX and am trying to write a game where an animated 2D character walks across the screen (for example like the original Legend of Zelda game). I had done this in Swing, by creating my...
Sawyor asked 15/3, 2015 at 6:23

3

Solved

I've been reading Koen Witters detailed article about different game loop solutions but I'm having some problems implementing the last one with GLUT, which is the recommended one. After reading a ...
Klink asked 18/3, 2011 at 19:50

5

I just started with game development in android, and I'm working on a super simple game. The game is basically like flappy bird. I managed to get everything to work, but I get a lot of stutters...
Shocker asked 17/2, 2014 at 20:19

2

Solved

Talking with some game developers, they suggested that a performant OpenGL ES based game engine does not handle everything on the main thread. This allows the game engine to perform better on devic...
Kantianism asked 2/12, 2013 at 11:6

2

Solved

I want to code a game in Haskell where every iteration of the loop computes the state of the world. I thought I should create a function: gameLoop :: World -> World -- ... and have main :: IO...
Tensible asked 10/10, 2013 at 1:41

1

I'm trying to write a python game loop that hopefully takes into account FPS. What is the correct way to call the loop? Some of the possibilities I've considered are below. I'm trying not to use a ...
Mimas asked 30/4, 2013 at 13:31

6

For stand alone games, the basic game loop is (source: wikipedia) while( user doesn't exit ) check for user input run AI move enemies resolve collisions draw graphics play sounds end while ...
Sexy asked 1/5, 2009 at 15:38

1

Solved

I recently tried to get into games programming. I am pretty experienced with Java, but not with game programming. I read http://www.koonsolo.com/news/dewitters-gameloop/ and implemented the game lo...
Streak asked 26/2, 2013 at 22:9

2

Solved

I'm making an android game and am currently not getting the performance I'd like. I have a game loop in its own thread which updates an object's position. The rendering thread will traverse these o...
Doenitz asked 29/12, 2012 at 0:13

7

I'm working on a simple game, this is my first game project. Most of the samples I find have a Render Loop where all the game logic is made too and I just don't like this. Let's say I have a ball ...
Calumny asked 6/5, 2010 at 20:18

1

Solved

From what I've seen, if I wanna make a NON-opengl game loop what I can do is have a game thread that during the loop will update the game state (or game physics) and also update the graphics by loc...
Pacifier asked 14/2, 2012 at 10:3

3

Solved

I could find a set of java 2D game tutorials and android game tutorials which uses only native graphics libraries. I'm looking for something similar in C# ( without DirectX or XNA) I found this gam...
Neuro asked 20/10, 2011 at 10:45

© 2022 - 2024 — McMap. All rights reserved.