Questions tagged [logic]
The logic tag has no summary.
115 questions
1
vote
2
answers
136
views
Relation between an object and its renderer
Recently I decided to start optimizing code in the game development field.
I found this pacman project on github a good starting point:
https://github.com/LucaFeggi/PacMan_SDL/tree/main
I found a lot ...
0
votes
1
answer
148
views
Moving Multiple Objects With Vector2.MoveTowards Not Consistent
Good Afternoon,
I'm trying to move three objects from their current position to a shared target position based on speed. Once they reach the target position, they move to a shared respawn location and ...
1
vote
1
answer
213
views
How to implement NPC that reads player input and counters it?
input reading = NPC reads the input of the player and instantly reacts to counter everything the player does.
So, is it like :
...
1
vote
0
answers
748
views
grid(tetris) inventory system
I'm trying to adapt my current inventory so that the items can occupy more than one slots (cells) like in this image:
Any idea that might help me? My inventory is an Image that has grid layout and ...
1
vote
0
answers
35
views
Polling Behaviors with Geometry Based Collision System
This one's going to be interesting to explain. Let's say I'm making a geometry based collision system for a platformer, where polygons exist based on the lines that form them. I'm using some basic ...
0
votes
1
answer
154
views
Pygame Traffic signal logic
I am currently working on a traffic simulator with Pygame, however i am struggling with implementing the logic of the traffic signals.
Any help is welcome.
My traffic simulation is grid based. The ...
1
vote
2
answers
1k
views
Reorientation when rotating Transforms around another Transform without parenting
The functionality I am trying to implement, consists of rotating one Transform and appling this rotation to other relevant Transforms in the scene. To make it a bit more clear: I have several objects ...
1
vote
1
answer
77
views
Translating conditions ("If A has B, then true") into objects that satisfy them ("A has B")
I have a system where I'm sifting through a large number and variety of objects in my game, looking for objects that match an arbitrary search criteria that can be simple or complex.
For example, ...
0
votes
0
answers
245
views
Texas hold'em game logic loop
Ok, so I was thinking of making a Texas Hold'em game, and I wanted to write down the game logic loop before starting. Here's what I have. Tell me if I missed anything or if anything is wrong.
Game ...
0
votes
1
answer
89
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
...
1
vote
1
answer
149
views
How to correctly solve a procedurally generated puzzle?
I'm creating a puzzle game where the player must remove all colored blocks from a grid. When the player selects a block, all adjacent blocks of the same color are removed. Any blocks that have empty ...
0
votes
0
answers
97
views
AI for 1v1 snake
I've got a task for job application to create a snake AI that can defeat their basic AI. Searching in this topic I've found that it's very similar to Tron and it's solved mostly by minimax algorithm. ...
0
votes
1
answer
449
views
Multiplayer network architecture - why do we need to verify local movements?
I'm messing around with a 2D game using UDP. I've read some books and articles on the logic of a dedicated server to clients multiplayer game and I can't wrap my head around one thing:
What I've read:...
1
vote
1
answer
141
views
How do I initialise levels sequentially?
I have been learning opengl and I have made good progress over past few months. However I still struggle to understand game logic in C++, I am new to C++ too.
Say I have this program.
...
1
vote
1
answer
317
views
Should fields in components in an ECS use polymorphism?
I've just started to try and learn how to use ECS (Entity component systems), but I'm having trouble understanding the concepts behind components.
Should adding more types of components, or trying to ...