Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
i'm wondering how can i "sync" the speed (obviously, to the less fast) of different PC ?
My is a 2d racing game, written in C# + SDL.NET.
How to "move" object on screen at the "same" speed on all PCs sending "state" variable only 3 times per second (for instance) ?
Thanks
This is the friendliest article I've read on the matter. You should look at all the game physics articles from this guy (GafferOnGames)
Fix Your Timestep!
Even an RK4 integrator is sensitive to
the amount of time you step when
integrating. Decouple your physics
timestep from the display framerate so
that your simulation behaves exactly
the same way each time it is run.
...then continue with this one:
What every programmer needs to know
about game networking
A brief overview of the history of PC
multiplayer games. Discover how RTS
games were able to synchronize
thousands of units over a 28k modem,
and how first person shooters hide lag
with client side prediction and
latency compensation.
Hope you'll find it as eye-opening as I did.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 months ago.
Improve this question
I want to make a simple game where each player's score is stored in a database or server and you can see other player's scores and nicknames on the leaderboard.
It is not necessary that the score in the leaderboard be updated every second, I think an update every 10 minutes will be enough.
What is the simplest and cheapest solution to this problem?
You have multiple choices (all of these are in a way free)
Use a service like PlayFab or another backend platform for games
Use Firebase directly from unity
Use your own HTTP API with a database. For example
Go and Postgresql (I made a small API during a game jam, the quality of the code is bad but you can get the idea)
AWS Lambda and DynamoDB (without provisioned capacity)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Hey guys i have an issue and i need your help.I try to develop a mobile games.I have an animal in my games and it has 4 slider bar.Health Bar,thirst bar,hunger bar etc..I need a script that it is gonna reduce my health bar value %10 on per hour and it must be do it even if i close the game.I mean even if i dont play the game and my health bar is really low it must be send a notification to me like your health is really low,you should interested with your animal.How to i do, that thanks for your help.
You can start a foreground service, but that would drain the user's battery and is not a good solution in your case. A better solution would be to schedule your code to run (for example) each hour using the AlarmManager.
https://developer.android.com/training/scheduling/alarms
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm working on game similar to the mobile game "Tiny Wings".
Image of Tiny Wings
Like shown in the image you are supposed to land on the downhill part of a mountain. If you are fast and high enough you can fly past mountains without having to land and slide down. How can I create an AI that knows when to land and when to fly past the hill? (I'm using "AddForce" to push the "bird" down when the player decides he wants to land) Thanks!
This is not a simple problem that can be solved in a single answer.(At least I don't feel this to be the case.) But i can give a couple pointers as to how i would attack this problem. So it could get more complicated than this but this seems like a good place to start.
First I would have a range of optimal angles for landing the bird in the "butter zone"
Second you will have to keep track of the birds rotation/angle in relation to the ground
Third you will have to build a system based on the birds velocity to seek out a "target" landing spot
Fourth you will have to adjust the angle of the bird to be as close to parallel with the landing spot as possible.
Hopefully this will get you started, but this seems like it's going to be a somewhat hefty task. Good luck.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to code a project in which I track a tennis ball across a court after a serve and work out its speed. The user uploads a video of them serving and then the program works it out. Is it possible to track an object within an uploaded video using C#? And is it also possible to identify the lines of the court?
Its 18.29 meters from the baseline to the service line. If we assume a ball speed of 100 mph (slower than in Wimbledon and nowhere near what I see on hobby courts), the ball needs 0.4 seconds from the baseline to the service line (completely disregarding the drop in speed after it is hit by the racket).
If you film with 25fps, you will have a ball on circa 10 single pictures.
Filming from the top, I'd say motion blur will make it almost impossible to correctly track it and approximate the speed.
Filming from behind, thinking about motion blur, the net, the player, the racket... I'd say, it's near impossible.
Try one of these.
Do you know OPEN CV ? http://opencv.org/
I think you can use it with C#
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on an incremental game that runs on iOS and Android. The mechanic involves calculating the player's progress while the application is not actively open. With this comes the risk of the player changing the device's clock time to cheat. I would like to consult what approaches can be done to protect such time-dependent data?
The thing I'm considering is the use of server storage where the timestamps are recorded getting the correct value of time-elapsed after the application is restarted, but I'm curious for any alternatives. If it's of any help I'm using Unity 3D for my development. Looking forward to your suggestions.
You should look into Google Play Game Services cloud saving feature alot of apps use that for exactly what you are talking about, i use Prime31 Plugins but theres also some free ones out there you would have to search