A way of measuring time intervals for the purposes of triggering an action after some elapsed time.

learn more… | top users | synonyms

1
vote
1answer
33 views

DrawString and Render graphics after custom time

I want to draw String after some second like "Boss is incoming",and after the string is disappeared i want to draw the Boss.I have the graphics and the string so my question is how to add timer for ...
4
votes
1answer
108 views

synchronizing client-server actions

What's the usual way to handle events that are checked both on server and the client, like attacking? There's a cooldown timer to an attack of which the client is aware (so to prevent spamming server ...
0
votes
1answer
35 views

How to kill a fired bullet sprite after certain amount of time in Phaser?

The bullet should be killed after it was shot from the player, and after a certain amount of time. function create() { bullets = game.add.group(); bullets.enableBody = true; bullets....
0
votes
0answers
45 views

Network turn managment issue due to animations

Me and my buddy are working on turn-based multiplayer game, and we encountered a problem that we don't see a nice solution to solve it. So there are two clients and a server, server keeps track of ...
2
votes
3answers
141 views

I want to delay 3 sec to load next level after the collision in C#

I need to delay the load new level by a few second. Please help.This is the script I need to use: void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "Enemy") { ...
7
votes
2answers
232 views

Good techniques for syncing gameplay actions to specific animation timings?

So I've come across an issue in the game I'm working on, but it seems to be a pretty fundamental thing that probably comes up in a lot of games. My game requires that some gameplay function occurs ...
0
votes
0answers
31 views

NodeJS timed update approach

My game has users building buildings, recruiting units, trading resources and sending attacks. All of this functionality takes a certain amount of time to happen and I'd like help with deciding on the ...
0
votes
1answer
203 views

AS3 random events using a timer

I'm making a game for an assignment at university. The game I am making requires random household appliances around a house to "turn on" at random times. The player must run around the house turning ...
0
votes
2answers
39 views

(Optimization) Efficiently discovering if a new day has been reached

I'm making an in-game clock/calendar system. In-game time is 12x real time. In addition, in-game events can fast-forward time. I also have in-game events that reset or trigger at the turn of each day. ...
2
votes
1answer
136 views

How should I implement a timer in a strategy game?

I'm developing a real strategy game for Android and want to implement timers. Those timers will represent the time remaining until some building is finished. Say that i have a building in ...
0
votes
3answers
224 views

Start Countdown on Resuming Game (Unity)

I am pausing game by setting Time.timeScale to 0. And When the Game resumes Time.timeScale is set to 1f again, and game resumes. Now I want to add timer before actually resuming game. It shows 3,2,1,...
0
votes
1answer
53 views

How can I check if the player clicks (or doesn't) on a target within a time limit?

In GameMaker, I'm trying to set up something like this: The player will need to click on some object within three seconds. If they click on it within the timeframe, I'll do one thing (call ...
0
votes
0answers
93 views

C++ timer for game loop(consistency across machines)

sorry I have been searching for ages and can't seem to get a good answer that I can understand, I am trying to make a game in my universities TL engine, and I can create a timer class fine, but I'm ...
0
votes
1answer
487 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
81 views

How to make Frame Independent Timer Clock

I want to make a frame Independent Timer that it work consistently across different computer configuration.
1
vote
1answer
202 views

Libgdx spawning enemies at random time

Hello I want to spawn enemies at certain location but at random time,like for example every 10 seconds. Atm I am spawning enemies whenever I click to spawn heroes but with delay, but I sure does not ...
2
votes
1answer
121 views

Unity 5 - Time Remaining displaying in scene but not in Game

I'm currently learning game development in Unity from this course on Lynda.com. Currently I'm trying to displaying the time remaining in the game after it has been set to 5 minutes initially. When I ...
0
votes
1answer
41 views

Checking spare time

What's the best way to check how much free time I have between the end of my Update procedure and the next Draw event? I want to keep a careful track of how much time my code is taking up.
5
votes
3answers
601 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 ...
0
votes
0answers
60 views

Interpolating positions between FixedUpdate frames in Unity?

Lockstep Framework uses FixedUpdate () in Unity to match an assumed fixed timestep. At higher rates, FixedUpdate doesn't at all run at a fixed rate but instead runs multiple times in a single frame to ...
1
vote
1answer
321 views

How can I compute delta time in a cross platform fashion in C++?

I need a way to get time for calculating the delta time. I see that OpenGL and GLFW have methods for it, but unfortunately I can't use them since I need to make server software too. What is the best ...
1
vote
1answer
90 views

How can I calculate when a spesific amount of time has passed [closed]

I am trying to get something to happen, when a spesific amount of time has passed(in my case it is in secounds). I have tried using this method: long elapsed = (System.nanoTime()-startTime)/...
3
votes
1answer
66 views

Can someone help me with my mario-inspired timer scoring system?

I am new to GameMaker's coding language or GML. I have learned and done a lot so far, but now i am having a problem. I have a countdown timer starting at 5 minutes counting down and I want the player ...
2
votes
2answers
206 views

Reconciling external events with the game loop

Is there any way I can program (in Java or Python, but open to other solutions) some game logic based on events, timed and sent by player input, without dealing with it inside the game loop, by having ...
3
votes
3answers
523 views

How to create a delay/timer and fire an action once it expires in C# Monogame? [duplicate]

First off I'm somewhat new to C# but I'm working on a game in C# Monogame and I'm trying to get timers working. There was a similar question answered around here a while back but I found that the ...
-1
votes
2answers
289 views

In Unity, how do I set up a delay before an action?

I want an object to rotate after a delay. I tried using StartCoroutine, yield and WaitForSeconds, but failed. How can I do it?
1
vote
2answers
446 views

How to PRECISELY measure execution time of a code?

In order to compare algorithms speed, I measure execution time of a code part with a method similar to the one described in this question. I am not operating on Windows, but on Linux, so I use ...
1
vote
1answer
490 views

Creating a GUI Countdown Timer Unity5

This was originally posted as a follow-up comment to http://stackoverflow.com/questions/30714357/guitext-in-unity-5-need-an-alternative , but I'm asking it here as a dedicated question as per the ...
0
votes
2answers
94 views

Choppy movement

So, I'm trying to write some code in C# XNA to make an enemy move in a random direction for 0.5 seconds, then switch direction and once again move for 0.5 seconds. However the problem I've discovered ...
1
vote
2answers
37 views

Redeeming an item on a periodic basis

I want to allow a user to redeem a token every X time (i.e. 24 hours). Once they redeem it, they must wait X time again before redeeming the next item. This ensures that users must visit the app daily ...
1
vote
0answers
52 views

How can I make a chronometer for an HL2: EP2 Mod?

I'm trying to make a chronometer for a mod I created. I looked on the web, but there are only countdown timers for TF2, nothing for HL2: EP2. In my case, it is an absolute necessity to use HL2: EP2. ...
5
votes
2answers
8k views

Creating a countdown Timer in Unity

I want to create a countdown timer in a Unity game I am creating. Up until now my game was running for a specific time but I was using InvokeRepeating to end the game after the set time. But now I ...
0
votes
1answer
89 views

What is a good clock implementation for a multiplayer game?

In cases where players need to send out their times for game state sync, can everyone send out their default timestamp implementation or should something like NTP be used? http://en.wikipedia.org/wiki/...
2
votes
1answer
562 views

Game Maker Studio - how do I disable mouse click for a duration of time?

I Have a button that starts in a rest state, and then after clicking on the button, it animates out. I want to disable the mouse click for around 30 steps after the button has been clicked, otherwise ...
0
votes
2answers
401 views

After sometime increase the speed of Instantiated object

This may look similar to "increase speed after every N seconds" type question but it's different because objects are being Instantiated and getting destroyed. In my start() method I'm calling a ...
-2
votes
1answer
125 views

How can I format the number of digits my stopwatch shows? [closed]

I have made a stopwatch that displays the time in seconds during my game in libgdx. At the moment it shows a bunch of digits after the decimal point as it runs. Does anyone know how to change it so it ...
0
votes
1answer
214 views

How to calculate a score algorithm based on elapsed time?

I'm trying to calculate an alogirthm based on elapsed time to calculate score based on a music beat. I have the music beat divided into 4 because that's the time measure of that beat. So If the user ...
1
vote
3answers
211 views

Should cooldown be time or tick based?

In the past I've done cooldowns as a specific time in ms, but I was thinking isn't having tick based cooldowns better. This would be more accurate and efficent(not sure). The bad side I can think ...
1
vote
1answer
7k views

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

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 ...
0
votes
3answers
1k views

Add a Countdown Timer that increments in JavaScript and resets per level(Resovled)

I am currently developing a Simon says type game using jquery and javascript. I have linked a fully copy of the game on github Github download and unzip to see the game fully https://github.com/...
0
votes
2answers
947 views

Unity yield WaitForSeconds() not working

I am new to Unity development. I started learning Unity by reading tutorials, demos, examples, and watching videos. And I am having some trouble with using this timer. Here is my code: void ...
0
votes
2answers
217 views

How to make a wait timer?

I am making a mining styled game and am looking to make variables that effect how fast you are able to mine the block. This is the idea I have currently got but it does not wait for the timer to ...
-3
votes
1answer
371 views

Move the Object in y-axis when the timer increases [closed]

I have a model(.Fbx object),I have placed a timer.When the timer starts increasing the model/object should move down(along y axis).
1
vote
1answer
123 views

How do I draw text once a countdown ends?

I created a countdown in Game Maker using a variable of time. The countdown works properly and is displayed at the proper coordinates. However, when the countdown reaches zero, I want to make the ...
4
votes
1answer
971 views

Converting time of day into a smooth day/night variable?

I'm trying to make a smooth day/night cycle for a game project that I've been working on. I've already set up a clock that adds deltaTime to seconds, wraps seconds to gameMinutes, etc. The issue that ...
1
vote
1answer
2k 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
2k 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
1k 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
3answers
885 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.
1
vote
1answer
322 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 ...