Questions tagged [game-state]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
296 views

Unity Save System - is there a better way?

I've been trying to understand how best to approach carrying state over between scenes, and how to save/load game state. I've built an isolated project to focus on building out this approach. You can ...
Samuel Slade's user avatar
1 vote
0 answers
28 views

Creating an "Aim Mode" toggle button with virtual buttons

I'm trying to make an "Aim Mode" in Stride for a 3rd person, 2D platformer. The idea is that player presses (and releases) a button that activates Aim Mode, and Aim Mode stays on until ...
DusaWitch's user avatar
0 votes
0 answers
47 views

How do I handle multiple matches for a multiplayer game based on web?

In a multiplayer chess game based on web where the server must validate the plays, store the current game state and provide the gameboard info to be rendered on client side, among other things related ...
Yago Biermann's user avatar
0 votes
1 answer
48 views

How to generate reliable labels for game state using Python and Pygame

I've been looking into making a small game where you would walk around and do puzzles (perhaps do some combat if I can get the basic framework going). So far, Googling for general game patterns used ...
Oleg Pittman's user avatar
1 vote
2 answers
1k views

Disable input and score count in pause menu?

I need some sort of an if statement, which allows me to disable any input and increment score while I'm in the pause menu. The problem is that I don't really understand this kind of pausing code, I'm &...
imbruceter's user avatar
0 votes
1 answer
306 views

Networked game with physics and client side prediction and server reconsiliation causes lag

I'm trying to make a multiplayer platformer game. I can almost get client side prediction and server reconsiliation to work, but there is one issue that I just can't wrap my head around. Lets say that ...
Per Henrik Jakobsson's user avatar
1 vote
1 answer
154 views

How do I guarantee that important one-time events in my UDP network protocol get received?

I'm creating an online arena game server (moba) that players can play together. 2v2 or 3v3. The game is similar to Battlerite. I chose client/server architecture with deterministic server that tells ...
Mamad R's user avatar
  • 113
0 votes
0 answers
33 views

Multiplayer client has two GameStates

I'm having struggle with GameState. My custom GameState is child of Game State Base. GameMode (child of Game Mode Base) is updating some variables in my GameState. But my clients have two separate ...
hagier's user avatar
  • 101
0 votes
0 answers
162 views

How do I store card game states in a NodeJS app hosted on Heroku?

I have a turn based card game node app, and in development env I store all game states in memory (1 object per "game" in a big parent object) since these objects are constantly changing and ...
Roy's user avatar
  • 1
0 votes
1 answer
359 views

How to pass data between game states?

Lately I've been using game state stack implementation from a book SFML Game Development and I've stumbled upon a problem with passing data between states. In this implementation State constructors ...
wixy0's user avatar
  • 67
0 votes
1 answer
640 views

Play and Pause State

Problem i want to implement a pause state and with a simple conditional inside the update of PlayState is very very simple. However i think that the pause has to be another state in the StateMachine ...
WhySoBizarreCode's user avatar
0 votes
1 answer
263 views

How to deal with race conditions on a game server between network and physics update loops?

I am new to game networking. In various articles on the internet, I found that there are usually two loops on the server: one for physics updates and the other for sending snapshots to the client (...
Igor Sushencev's user avatar
0 votes
1 answer
70 views

How to disable pause() in game_loop() once game_over() function is called?

How can I disable pause() in game_loop() once game_over() function is called? game loop ...
Gayatri Rout's user avatar
1 vote
0 answers
133 views

Unique_ptr game state vs shared_ptr game state

I have this (typical) base class: ...
Battyhal's user avatar
0 votes
1 answer
313 views

Game states and events

I'm writting a game in C++ and I'm struggling with getting events and game states work together. By game states I mean something like this ...
Łysy's user avatar
  • 3
0 votes
1 answer
49 views

If online games use permalinks

I'm trying to figure out how to accurately capture the state of the web app by a URL, similar to something like https://jsfiddle.net/, where they create ...
Lance's user avatar
  • 177
1 vote
1 answer
149 views

How to protect save game data when saving game over the network?

Newbie question please - I am working on my own RPG, using Unreal Engine 4 and C++. Regarding data formats - I figured I would just make HTTP Post requests to store the data as JSON in AWS's ...
Amc_rtty's user avatar
  • 113
2 votes
1 answer
616 views

Overlaying Menus with a State Machine

I'm working on developing a game with C++, SDL, and OpenGL. I created the engine from scratch, and implemented my own state machine to handle menus and general gameplay. Each State gets pushed into a ...
MathPRG's user avatar
  • 23
2 votes
2 answers
501 views

How to avoid lots of booleans

This was probably asked somewhere but I can't google anything for some reason. So I'm making a puzzle game as a result I have lots of booleans which affect the game only once and become redundant. As ...
Argus Kos's user avatar
0 votes
2 answers
268 views

How ID's work in FPS games

I am wondering how games generate IDs/GUIDs for their entities (along these lines), and which entities specifically get them. To narrow the scope of the question down, I am just focusing on FPS games ...
Lance's user avatar
  • 177
0 votes
1 answer
374 views

The state that is synced when a window is broken in a FPS game

In order to better understand how state syncing works in games, I wanted to pose a specific example. Say you are in a FPS game with multiple players and someone breaks a window in some building. ...
Lance's user avatar
  • 177
1 vote
1 answer
171 views

How can I synchronize state in my Asteroids game with many networked players?

Wondering how state synchronization works in games with lots of players like MMOs. It seems like a hard problem to solve and I am not aware if there are standard solutions. Specifically, synchronizing ...
Lance's user avatar
  • 177
0 votes
1 answer
99 views

Let both clients know of complete game-state in turn-based game?

I'm writing a simple turn-based game for mobile, just to test the waters and I'm having doubts about the approach. Each player has 5 cards on hand. I want for both players to be able to replay ...
Whyser's user avatar
  • 103
3 votes
1 answer
2k views

Multiplayer client-server architecture sending input

I've got a 2D java game with an infinite generating world with a player and other entities. I wish to make this game multiplayer and have done my research. I read this article multiple times and is ...
Rien's user avatar
  • 135
0 votes
0 answers
346 views

How can I deal with different states in a multiplayer game?

I'm currently just making a concept for a MMORPG-like (much less massive) game, in which the player can do all the usual stuff (farming, talk to NPCs, accept quests, kill monsters etc.). An important ...
Namnodorel's user avatar
1 vote
1 answer
477 views

Problem with transitioning to previous state(State Stack)

I am using a state stack as the mechanism to transition through states in my game. Currently moving to a new state works correctly, but when I want to go back to a previous state(removing top state) ...
InversePalindrome's user avatar
4 votes
3 answers
742 views

Issues with events changing game state

I am currently experimenting with creating a turn based game using Unity and am trying to come up with a sensible architecture for structuring my game systems. So far I have decided to base ...
Jkh2's user avatar
  • 574
5 votes
3 answers
838 views

How do I handle Game Screens in LibGDX?

In my game the main screen is the playscreen. But because I want to draw the menu and the gameover screen on top of the playscreen, I don't create separate screens for them. But if I want to replay, I ...
Sharpirate's user avatar
1 vote
1 answer
839 views

Data Structures for Game State

I'm writing my first game. It's an adventure-RPG in the style of Starflight. I'm thinking about how to represent game state. There are three obvious parts of game state: dialog, combat, and story/...
MackTuesday's user avatar
0 votes
1 answer
258 views

Where to put SFML Window in GameStateManager

I have a Pong game using SFML organized after this tutorial. This is the UML diagram from the tutorial. Now I am not sure where I should put my SFML RenderWindow variable (and other things that ...
Philipp Löwen's user avatar
2 votes
1 answer
250 views

4-player arena game networking model : dedicated servers? [closed]

So my question is not technically limited to 4-player games, but there has been a lot of games on steam lately (brawlhalla, duck game etc) that seem to be quite popular lately. My question is, are ...
kamziro's user avatar
  • 1,427
1 vote
1 answer
1k views

InvalidOperationException when peeking from a stack within custom editor

I've got a simple state machine for handling game states which works using GameObjects that I enable/disable in order to switch the states. Since some states can be ...
artganify's user avatar
  • 459
2 votes
1 answer
3k views

Game states & passing data between scenes

I'm not entirely sure if I'm doing this right, but I always considered the scene system in Unity as some sort of state management (rather than e.g. a level system) which allows to group the contents (...
artganify's user avatar
  • 459
0 votes
1 answer
85 views

Ideas for refactoring regarding simple state management in entities and level

I'm actually developing a very simple 3D game, Arkanoid/Breakout style, with very simple mechanics, and it's progressing while I learn the game dev domain own concepts and techniques (My background is ...
Hernán's user avatar
  • 155
1 vote
1 answer
485 views

Managing game states (states flow, controlling the state machine...)

I am currently struggling really bad to make the game states management. Before we dig into the problem, I must point out that I do know about state machines, I do have both implemented (states and ...
Yves Calaci's user avatar
-1 votes
1 answer
76 views

Game State being skipped

One of my game states is being skipped (pressing space goes straight to the 'GameScreen' game state skipping the 'CharSelect' state). All help is appreciated. ...
TeaBelliedTich's user avatar
2 votes
1 answer
182 views

How to propagate component updates? (Changing components at runtime)

Whenever an entity is being added to an entity controller (which is essentially just a bag of entities), I scan through it's components to figure out if I need to register additional entity processors ...
artganify's user avatar
  • 459
1 vote
3 answers
6k views

libGDX best way to do Game States

I'm making a JRPG in libGDX, and I'm working with Screens. I have a main Screen called GameScreen, a screen for battles called BattleScreen and I want to make a screen for managing party members and ...
RayShawnOfNapalm's user avatar
3 votes
1 answer
124 views

Can USB device be aware of in-game death?

I intend to design a peripheral that changes state (in this case, LED color) in response to software state (ideally, player death in-game). I have adequate experience in manufacturing design, but not ...
Drew's user avatar
  • 139
1 vote
1 answer
151 views

States within a GameState?

I ended up coming up with having states within game states. For example: States splash menu tracks garage loading play What bothers me is that I now have states within the play state to handle it ...
Danny Watts's user avatar
2 votes
3 answers
1k views

How do I correctly make character sprite direction match player inputs?

In my top down game I can move the character around and the character will even face the direction he is moving. However, there is some weird behavior I'm having: when you hold down one direction and ...
zachdyer's user avatar
  • 249
3 votes
1 answer
968 views

SpriteKit Game State Management

I've created a SpriteKit Mac OS X app and I am using a simple finite state machine to manage the game states. I've seen some solutions, especially for C++ games, where a GameState class and a ...
02fentym's user avatar
  • 147
2 votes
1 answer
115 views

Game State query -- Are Game states and Game Phases the same thing?

I am currently writing a simple board game app. I have written some basic states which are more to do with global state of the game. Currently they are just enums, they don't really do anything nor ...
Atilla Jax's user avatar
0 votes
2 answers
1k views

Storing a block world

I've gotten a basic Minecraft clone working (thanks to gamedev.stackexchange's help! ^_^), but know I have no idea how to save the file. Minecraft itself uses a naive list of block ids as far as I ...
Shien's user avatar
  • 257
1 vote
2 answers
308 views

Client Tells Server What Gamestate Data to Send Back

I'm just stepping into the world of MMORPGs and how they function, so assume I know very little. in a game, a client doesn't see everything that the server does. For example, the client can't see ...
Mikey Musch's user avatar
3 votes
1 answer
695 views

Is there a pattern for handling multiple game states?

I'm experimenting with writing a multiplayer game, almost from scratch (I'm using C++, OpenGL, ENet, and platform-specific APIs) with a client/server networking model where the server is authoritative....
user253751's user avatar
13 votes
2 answers
3k views

How would a game-state snapshot system be implemented for networked real-time games?

I want to create a simple client-server real-time multiplayer game as a project for my networking class. I've read a lot about real-time multiplayer network models and I understand the relationships ...
Vittorio Romeo's user avatar
1 vote
3 answers
117 views

c - Starting an user defined function after the current one ends

The game I am creating displays a menu before starting, the user may select to start the game, or do some stuff. When the user selects an option, I need to call another function which actually does ...
user3195897's user avatar
1 vote
1 answer
1k views

Slick2d - state change problem

In my slick-based game, I have 4 states - introState, gameState, pauseState and menuState. From the gameState, I want player to go to either menuState or pauseState. To do that, I did this in ...
anonymous's user avatar
  • 504
3 votes
1 answer
125 views

Informing objects within a particular state of the world state

Following the State pattern, every state in my game is a derived object that reflects a particular segment of the game (MenuState, PlayingState, GameOverState, etc.) Each of those state objects holds ...
roymcclure's user avatar