The timer tag has no wiki summary.
-1
votes
2answers
56 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 ...
-1
votes
1answer
37 views
On occasion game fails to catch end of screen transitions [closed]
When the player hits the edge of a screen the old screen slides down, and the new screen slides in with them landing on the opposite side from where the transition started. On occasion the bottom of ...
5
votes
2answers
315 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
73 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
84 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
151 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
290 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
123 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
120 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
84 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
494 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
312 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 ...
-2
votes
3answers
240 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 ...
0
votes
3answers
667 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
65 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
193 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
360 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
386 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
245 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
180 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
614 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
358 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
256 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
226 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 ...
3
votes
1answer
301 views
android game performance regarding timers
Im new to the game-dev world and I have a tendancy to over-simplify my code, and sometimes this costs me alot fo memory.
Im using a custom TimerTask that looks like this:
public class Task ...
2
votes
1answer
164 views
What are the factors that determine the default frequency of a shader call?
After i have been played for some days with various vertex and fragments shaders seems clear to me that this programs are called by the GPU at every and each rendering cycle, the problem is that I ...
1
vote
1answer
339 views
High Resolution Timer Options in Windows
I'd like to know what are my options for high resolution timer in Window. I want a timer with at least 1ms precision since I need it for a rhythm game. I'm using QueryPerformanceCounter now, but I ...
0
votes
1answer
190 views
Periodic updates of an object in Unity
I'm trying to make a collider appear every 1 second. But I can't get the code right. I tried enabling the collider in the Update function and putting a yield to make it update every second or so. ...
3
votes
3answers
698 views
HTML5 Canvas Game Timer
How to create good timer for HTML5 Canvas games?
I am using RequestAnimationFrame( http://paulirish.com/2011/requestanimationframe-for-smart-animating/ )
But object's move too fast.
Something like ...
0
votes
2answers
661 views
Timer for pop up text in XNA
I am making an xna game which contains turn-based RPG battle elements. Any good game that features turn-based battle has to have a good feedback to the user.
For example, When my guy attacks, there ...
1
vote
0answers
319 views
Countdown Timer for Racing Game
I want to make a countdown timer for my racing game such as "3... 2... 1... GO!" I'm using GLUT, OpenGL, and C++. I was wondering what the most appropriate method to handle this in C++. clock()? ...
4
votes
5answers
330 views
Game Loop Problem - Growth and Recharge as Integer Values
I have a question about game loops. I understand that you shouldn't have a static loop, say 100ms and set something's speed to 1px/frame so it moves 10px/sec. You should have a speed and multiple that ...
0
votes
2answers
1k views
As3 Random movieclips from an array to the stage
For a game with orders and clients I was trying to create the following situation:
Every half minute, a client should appear at the counter. In this case I have an array with 4 movieclips (4 ...
2
votes
2answers
239 views
How can I animate a recursive algorithm?
Say I have a recursive algorithm, for example one that generates a random tree:
// Pseudocode, just a simple algorithm: it isn't perfect.
function generate_branch(angle, length, current_depth, ...
2
votes
1answer
177 views
Gameserver travel time checks
I'm making a little RPG multiplayer game where each player can travel long distances. Traveling from point A to B can take up to 10 minutes and – once initiated – is an automatic process. Now, I am ...
2
votes
2answers
253 views
For timed levels, how do you determine time steps that are less than 1/(frames per second)?
I have made a simple HTML5 racing game. The laps are timed. I am running the game are 40 frames per second, each frame represents 40 milliseconds. There for my timer will increase in 0.025 ...
3
votes
2answers
281 views
Variable-step update() in game loop is falling behind, how can I get around this?
I'm working on a minimal game engine for my next game. I'm using the delta update method like shown:
void update(double delta) {
// Update code that uses `delta` goes here
}
I have a deep ...
1
vote
1answer
334 views
Time calculation between openGL update calls
In XNA, the system calls update and draw function with the time information. This contains information such as how much time has passed since last update was called. This makes easy to integrate time ...
4
votes
2answers
693 views
Execute code at specific intervals, only once?
I am having an issue with XNA, where I want to execute some code in my Update method, but only at a given interval, and only once. I would like to avoid booleans to check if I've already called it ...
4
votes
3answers
559 views
Determine animation frame from interval
I have an array of sprites that are displayed in-order to make an animation. There is code in an update loop that has access to a value 'time' indicating how far along the animation is. Time is a ...
1
vote
1answer
1k views
C++ OpenGL Game Timer [duplicate]
Possible Duplicate:
Tips for writing the main game loop?
I am attempting to make a game using OpenGL and C++ but i haven't been able to find any good tutorials..or anything that could ...
7
votes
3answers
694 views
Effective methods to continuously update movement in a tower defense game?
We are four guys making a Tower Defense game as a project in first grade on a university. The game is going to be really simple!
Three different towers
Three different monsters
One map (maybe add ...
4
votes
2answers
929 views
C# Timers for game development
I want to find out the best way of creating time based events in games. Lets talk for example about Texas Holdem Poker. Server can handle thousands of tables and in every table we have timers: turn ...
4
votes
4answers
899 views
Creating the concept of Time
So I've reached the point in my exploration of gaming where I'd like to impliment the concept of time into my little demo I've been building.
What are some common methodologies for creating the ...
4
votes
2answers
338 views
Checkpoints in a racing game?
The game would be a race from A to B through several checkpoints. I think there are two approaches for the concept of time.
The game starts with some time and player has to make it to the finish ...
5
votes
3answers
816 views
Thread runs faster on a faster processor… how to control Thread speed
I have a thread that uses TimeUnit.MILLISECONDS.sleep(5);
Problem is when I load my app on a faster phone say with a snapdragon, it runs at lightning speed.
Is there a way to control this speed so ...
