The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
51 views

Having a hard time having consecutive animations for an attack [closed]

So I've been trying to figure this out for about 8 hours now...It's driving me nuts because I am pretty sure that it is something dead simple that I am just not understanding. I had everything working ...
0
votes
1answer
99 views

How to have an event occur after x seconds?

I want a method to run after every 10 or 15 seconds. My timer is set to: timer = (double) gameTime.ElapsedGameTime.TotalSeconds; What would be the logic to check for every 10 or 15 seconds?
1
vote
1answer
58 views

Timer.schedule(task, 0, 100) never fires

I added some code using java.util.Timer to execute my spawnMonster function every 100ms. It worked, until I tried instantiating images in it -- since it doesn't run on the libGDX core thread, there's ...
0
votes
1answer
55 views

Can't consistently add to TimeSpan for Unity Game

I'm making a game that has a timer showing how long the player has survived from being crushed by pessimism. (Long story) I'm trying to use TimeSpan in Unity to accomplish this but it seems that I'm ...
1
vote
1answer
110 views

Fire Delay Timers

I currently have a turret that can fire projectiles. I can control the delay between shots (fireDelay), and I can control the time needed to reload the magazine of the gun(reloadDelay). I do the ...
2
votes
3answers
136 views

How to display a GUI Texture for a certain amount of time

Is it possible to make a gui Texture display for a certain amount of Time.
0
votes
1answer
35 views

How to use setInterval and clearInterval

I have a game that I am making and cannot seem to get the setInterval and clearInterval methods to work. When I debug it in the browser console it shows that the method is still being called over and ...
0
votes
2answers
116 views

Creating A TickRate Class

I need to implement tickrate into my engine to handle timed events such as pushing out entity updates and I don't know where to start. I have access to a timer which allows me get the time in ...
0
votes
1answer
166 views

C++ timer function acts as if time limit is instantly reached if it is less than 1 second [closed]

I'm trying to make a Snake clone with C++ and OpenGL/GLUT, but I've been having trouble with programming the timed input. I made a timer class, as you'll see below, to be used for the short time ...
0
votes
0answers
97 views

LibGDX stops drawing if I create a lot of Timer Tasks, but only in Android. Why is this?

I'm working on a few small games using LibGDX, and today I just started testing the first one on android rather than the desktop. A few seconds into the game, it stopped drawing. All my print ...
0
votes
1answer
71 views

Slick and Timers?

I'm making a game where I need events to happen in a precise amount of time. Explanation : I want that event A happens at 12000ms, and event B happens every 10000ms. So "if"s should looks like this. ...
0
votes
1answer
72 views

How do I Draw Text at the End of a Countdown?

I am using the program GameMaker and I created a countdown with a variable of time. The countdown works properly and is displayed at the proper coordinates. The issue is when the countdown reaches ...
1
vote
1answer
97 views

How can I play an animation in response to an event?

I've written a script to play an animation, but it starts immediately as my level loads. Instead, I want it only to start when triggered by some event or after a given timeout. How can I do this?
0
votes
1answer
174 views

How to accurately count 1 second within my logic update?

I have the following method: long time = system.nanoTime(); public void count(){ if (System.nanoTime() > (time+1000000000)){ //Output something or perform action here ...
2
votes
2answers
204 views

How can I create delays for sprite animations that work correctly when the application is killed and restored?

Please see my original question here: How should I use system time to compute delay times without stutters? In summary, I am attempting to to introduce a delay (say of 5 seconds or so) before a ...
0
votes
1answer
564 views

Java High-Resolution Timer for a simple game

I want to work on a model of some kind of simple shape shooter game I would develop for either the desktop or the Android, using the libGDX library. There's something I want to incorporate into the ...
0
votes
2answers
426 views

Using System Time to compute delay times that correctly deal with app pauses?

In my Android app I have the requirement to introduce small (for slowing down animation) and larger delays (for the purpose of delaying the appearance of a character for example). I've experimented ...
7
votes
3answers
768 views

How to make something happen every N seconds in game?

I want to have something happen every N seconds, how would I do that? Maybe use a timer but how?
2
votes
1answer
131 views

Timestamps as ids in an entity manager?

I've built my own entity manager, as I found out some days ago, it is very similar to the Artemis framework. For now, I just use integers as entity ids. Behind the scenes, there is a simple integer ...
2
votes
3answers
258 views

Let a time counter working when an app is closed?

Can we let a time counter working even if an app is closed? I would like to add a timer so that we have to wait XX seconds/minutes before a building is created in a game. I don't want to use an ...
1
vote
1answer
133 views

how to calculate sky color hue in a specific way?

I have a day cicle in my game. I want to add a bluish hue to my terrain in the early morning and evening-night. I want to start transitioning from 0 hue color to the full hue color at 20 PM and reach ...
1
vote
2answers
1k views

Should I accumulate state time based on a global or a parameter?

Generally, we associate a "state time" with our sprites. Libgdx provides a method to do so: float deltaTime = Gdx.graphics.getDeltaTime(); However, in the main game loop, we have a delta time as a ...
4
votes
1answer
145 views

Time critical events based on framerate

Problem Description Basically, I've made a "programming game" in which I've made my own scripting language. It is a completely standard Lunar Lander game, though instead of directly controlling the ...
3
votes
3answers
1k views

Will running cron jobs every minute a good practice?

I'm trying to create a browser-based game (made in PHP, MySQL, Js, HTML, and CSS) that is heavily dependent on user's actions being carried out after a certain amount of time passed whether online or ...
3
votes
1answer
241 views

How to sync game tick in peer to peer game?

I am making a 2-player iphone action game using a synchronization service (in this case Firebase). The service allows state syncing through the internet, but I have to execute all game logic on the ...
1
vote
1answer
181 views

What tech will enable a script to run after a certain amount of time elapsed following a user's action?

I'm trying to experiment in creating an MMO browser-based game using PHP, MySQL, Javascript, HTML5, and CSS. There is this certain functionality that I want in my game that I'm having trouble with. ...
0
votes
1answer
80 views

Repeating Sound with Timer in Actionscript 3

I'm working on a Flash game and am trying to figure out how to repeat a sound periodically every 17 seconds. Instead, of having the sound repeat once the .mp3, .wav, finishes. The problem I'm running ...
-1
votes
2answers
219 views

Start timer in two clients the same time

I want to create a client/server turned-based game where each player will have 5 seconds in order to play. If extends this time will be other player's turn to play. In order to do this, I have created ...
8
votes
2answers
2k views

Java 2D game programming: Different approaches to make a game loop

I am new to Java game programming, but the more I read the more I'm confused, because I've seen several different approaches to make a game loop: 1. The standard approach, that uses the Timer class ...
1
vote
1answer
101 views

Can't call method out of a timer. Why? [closed]

I have another problem i can't solve by myselve. My situation: I have four FrameLayouts in LinearLayouts. I color them, set Layout hight and width at wrap content and just change the minwidth to ...
-1
votes
1answer
103 views

GameTimer too fast, Objects staying intersected and rand not returning value inbetweem min and max [closed]

So I'm developing a game called PongBreakout in c++ using a game engine i got from uni (when i was there..) I've got a few problems with my game that i'm struggling to fix and need some help to figure ...
2
votes
2answers
348 views

Lockstep Game Loop

I have an XNA game using a basic lockstep update loop. The client sends all commands to the server, and updates only if it has received the next turn's commands from the server. When does a turn end? ...
4
votes
2answers
516 views

C++/OpenGL Game - How to Make it Compatible with Screen Recorders?

I'm developing a 3D tower defense-like game in C++/OpenGL on Windows. The problem I'm having isn't about the game itself (the game runs fine), but it's about using screen recording software to record ...
0
votes
2answers
311 views

Using timer to reverse enemy movement in Flash game made with Flixel

I am creating a 2d flash game using Flixel 2.5 in Flash Builder. I am trying to reverse enemy movement on an interval so that they will move back and forth over a set space. I felt that a timer would ...
1
vote
1answer
226 views

C++ Using clock() with IsKeyDown

I am trying to replicate the game Asteroids as a class project. I am having trouble measuring the time elapsed while the "W" key is pressed. This code is supposed to increase the force applied to the ...
2
votes
1answer
153 views

Could the delta frame time be negative?

I'm following a tutorial about the time management and, the tutorial shows this function: double GetFrameTime() { LARGE_INTEGER currentTime; __int64 tickCount; ...
1
vote
5answers
2k views

Game Timer In C++

I need to be able to find out how many milliseconds since that last update. Is there any way I can find it out with time rather then a thread that counts like I did below? #include <iostream> ...
-1
votes
1answer
492 views

Animation Trouble with Java Swing Timer - Also, JFrame Will Not Exit_On_Close [closed]

So, I am using a Java Swing Timer because putting the animation code in a run() method of a Thread subclass caused an insane amount of flickering that is really a terrible experience for any video ...
-1
votes
3answers
509 views

How to rotate to a target position over time

I know how to do rotations to vectors, but how do I rotate over time? For instance say I made a function RotateTo(vec2 iPosition, float iTime); so it rotates to iPosition over iTime - how would ...
1
vote
3answers
4k views

How can I make a C++ countdown timer that doesn't freeze user input?

I'm planning to use the Sleep() function to implement a countdown timer. But this freezes the input of the user at the same time. Thus I wanted to ask if it is possible to have the countdown still ...
2
votes
1answer
86 views

How to apply effects that occur (or change) over time to characters in a game?

So assume that I have a system that applies Effects to Characters like so: public class Character { private Collection<Effect> _effects; public void AddEffect (Effect e) { ...
1
vote
1answer
262 views

random spike in delta time

The title pretty much sums it up. I'm using delta time to move my objects and every few seconds the delta time will spike and all the objects will jump forward. Should I just Interpolate the delta ...
4
votes
4answers
506 views

Game programming and quantity of timers

I've made a simple 2D game engine using C# and DirectX and it's fully functional for the demo I made to test it. I have a Timer object that uses QueryPerformanceCounter and I don't know what's the ...
-2
votes
5answers
937 views

Best C++ Portable time library for game development [closed]

I'm venturing into the dark world of portable development and I'm looking for a nice library to keep track of system time for all game events. So far I've turned to trust boost and found: This boost ...
0
votes
1answer
872 views

How can you run events after a set amount of time in SFML 2.0?

I've been using SFML 1.6 for a while and recently upgraded to 2.0, apparently there's a new sf::Time type however I'm clueless as to how I can achieve running of a certain function after a set amount ...
5
votes
2answers
257 views

Game resource timers - general implementation

I'm interested in understanding how resource generation timers work on many of the mmorts type games out there. I can't wrap my head exactly around how the timers are synched with servers, especially ...
6
votes
4answers
764 views

Game Clock Precision

I'm reading a fantastic article about game timer precision and here is a quote about 2/3 of the way into the article: If you start your game clock at about 4 billion (more precisely 2^32, or any ...
1
vote
3answers
530 views

Will having many timers affect my game performance?

I'm making a game for android, and earlier today I was trying to add some cool stuff to my game. The problem is this thing needs like 5 timers. I build my timers like this: timer += deltaTime; ...
4
votes
4answers
322 views

Playing a death anim on an enemy that I want to remove

I've been trying to find a tutorial on how to best make animations in Android. I already have some animations for my enemies and my character that are controlled by rectangles and changing ...
4
votes
1answer
330 views

Android Java: Way to effectively pause system time while debugging?

In my project, I call nanoTime and use that to get a deltaTime which I pass to my entities and animations. However, while debugging (for example, stepping through my code), the system time on my ...