The logic tag has no wiki summary.
2
votes
1answer
137 views
Keeping everything within one Activity
Overview
My game is currently based on a single activity (rather than multiple activities) and I would like to keep it that way.
At the moment, it goes straight into the game at level 1. I will ...
0
votes
1answer
56 views
3D Position won't translate to 2D
My 3D Hero-Model is positioned at a certain point in 3D-Coordinates. Whenever he's colliding with a coin, I want to place an animated sprite sheet there. But my following implementation won't give me ...
2
votes
1answer
136 views
Moving sprites based on Delta time - consistent movement across all devices with different resolutions
This is the formula I am currently using to move my sprites across the screen:
Examples below only deal with X coordinates to keeps things as short as possible.
Initial variable declarations:
float ...
7
votes
8answers
460 views
Randomly spawning objects so they don't intersect [duplicate]
I've got this code for spawning enemy objects in random places:
for (int i = 0; i < 7; i++){
enemyObject = new Enemy((r.nextInt(Main.WINDOW_WIDTH), r.nextInt(Main.WINDOW_HEIGHT));
}
The ...
0
votes
3answers
129 views
Where to run logic update in openGL ES?
Using Canvas with Surfaceview I had a run() method where I would essentially do the following:
onDraw();
update();
Where onDraw method would do the rendering and update would update all my game ...
6
votes
4answers
478 views
Machine Learning in AI for benefit analysis round to round in a rummy like game
For fun I am building the game 5 crowns. Well I've gotten to the point where I am implementing the rules for the computer players.
I've found that my decision tree has so many nodes on it that I ...
2
votes
1answer
141 views
Pausing and resuming in Unity
I've been writing this code quite late so please bear with me.
I'm trying to pause the game and show a menu when I'm inside a collider and then when i press a key it should unpause the game and ...
2
votes
3answers
240 views
How To Export Blender Game Logic for Controlling Actor Actions?
Question:
How does one export Game Logic ("Sensors") that Unity references for controlling actions from Blender's "Action Editor" or "Dope Sheet"?
Problem Statement:
I have a Blender model that has ...
2
votes
4answers
395 views
Entity/Component based engine rendering separation from logic
I noticed in Unity3D that each gameObject(entity) have its own renderer component, as far I understand, such component handle rendering logic.
I wonder if it is a common practice in entity/component ...
1
vote
1answer
214 views
In 2d game logic, should I use pixels or world coordinates?
Currently in my game I handle the logic (collisions, movement) using pixels but I find it very limiting espiecially when thinking about variable speed.
For example Box2D requires you to use ...
1
vote
4answers
342 views
3-in-a-row or more logic
This is a bit more difficult than it seems and the one other post on here isn't sufficient. You have a row of n items, and each item could be any one of 5 colors. You need to find if there are any ...
1
vote
2answers
357 views
How to handle “weapon slots”?
I'm working on implementing an RPG engine, and I'm trying to figure out the best way to implement equipment. The really tricky part is the hand slots.
It would be easy to give a character one hand ...
3
votes
2answers
315 views
Derive a algorithm to match best position
I have pieces in my game which have stats and cost assigned to them and they can only be placed at a certain location.
Lets say I have 50 pieces.
e.g.
Piece1 = 100 stats, 10 cost, Position A.
Piece2 ...
3
votes
0answers
110 views
Is there a logic game engine to be used in OS game?
Ludocore is a paper where a research on a logic game engine is presented.
For game I cooperate on -- Opendungeons -- it would seem fine to have separate abstract layer of code which would deal only ...
0
votes
1answer
150 views
Logic For camera Movement
Every time I move the hero on my screen I increment a screenOffsetX and a screenOffsetY.
These add 1 if you move right, -1 if left to the sceenOffsetX. Add the screenOffestY +=1 if down, -=1 if up.
I ...
5
votes
1answer
135 views
Physics/Logic behind self-bounce
I have a game that I am currently working on and I have a problem.
What would a ball look like when it makes itself bounce. Say, for example that the ball had its own "inner power", was made out of ...
-3
votes
2answers
165 views
Safe zone implementation in Asteroids [closed]
I would like to implement a safe zone for asteroids so that when the ship gets destroyed, it shouldn't be there unless it is safe from other asteroids.
I tried to check the distance between each ...
6
votes
4answers
906 views
What is the logic behind dialog trees?
How do dialog trees actually work? What is connected to what and how to move between lines of speech when a sub-conversation ends?
If you have any examples of a basic dialog tree in C#, please post ...
0
votes
2answers
348 views
Logic behind a checkers game? [closed]
I'm starting to make a checkers game and I've got all my graphics + the board drawn. Before I moved on to creating the pieces I was wondering what an easy way to tackle the logic side of the movement ...
0
votes
0answers
114 views
If and else condition not working properly in xna [closed]
I am developing chess like game and i wanted to show error message if user try to place any player inside the box which is not empty. For example in certain place if there is empty then the object(2d ...
10
votes
6answers
504 views
What forms of non-interactive RPG battle systems exist?
I am interested in systems that allow players to develop a battle plan or setup strategy for the party or characters prior to entering battle. During the battle the player either cannot input commands ...
12
votes
3answers
395 views
Technique for objects following each other in complete movement?
I'm wondering how objects follow each other where they move over the previous position of the object in front of them. When the leading object stops, all that are following should stop at their ...
1
vote
5answers
1k views
Snake game logic
So I'm thinking about making snake game. I started thinking about it. I figured out almost everything, but I have found one fundamental problem I can not fix myself and I need your help. The logic ...
0
votes
2answers
212 views
Logic / Render phases with a single thread
The question I have may generate different opinions from different developers, but I'd still like to have an answer on this.
Its all about the updating and rendering steps of the game loop, and their ...
0
votes
1answer
136 views
Java: Standing Animation
I've been working on a top-down, and the player already has animations for moving left and right. However, if I move a certain distance and stop, it will stop on the walking animation, which isn't ...
4
votes
1answer
833 views
Synchronization between game logic thread and rendering thread
How does one separate game logic and rendering? I know there seem to already be questions on here asking exactly that but the answers are not satisfactory to me.
From what I understand so far the ...
1
vote
1answer
233 views
rotating an object on an arc
I am trying to get a turret to rotate on a 90 degree arc (rotating about 2 orientations about the y-axis), and have hit a wall.
I have 8 possible starting orientations (multiples of 45 degrees about ...
3
votes
2answers
352 views
Opponent car logic in race games
I'm developing a race game in Andengine. I have created a car which player is controlling. But since this is a race game, there should be 3 or 4 car which snatch with the player's car. My question is: ...
5
votes
5answers
517 views
C++: Game State Logic other than switch statement?
Executive summary
Are there any good tutorials on Game State FSMs, particularly OOP/OOD-based and not switch-statement-based?
Summary
Is there a practical process for creating a game state engine ...
0
votes
2answers
559 views
Game Logic - Tree Based Game Design
I'm trying to write an easy to use and extremely modifiable game engine in C++. I was thinking about using a tree to store game data. All objects would inherit a from the Node class and would have ...
0
votes
3answers
183 views
Logic to path finding checking
I'm a little stuck on the logic to how i use my path finder efficiently in my game.
This is basically how the game works:
Building generates goods "Factory" > AI transports goods to "Warehouse" ...
7
votes
2answers
843 views
How to implement the logic of a trading card game's “special effects cards”?
I am trying to write a kind of a trading card game here, in some way, it is similar to Magic The Gathering, or the Yu-Gi-Oh! card game.
For those of you who are not familiar with it, basically, in ...
0
votes
3answers
87 views
initialising units' properties & upgrades
I'm making a RTS in which units can get several cyber-upgrades (individual, not as a global tech-tree upgrade like in most RTS games) before they're created. Now, I'm trying to decide how to do this, ...
3
votes
1answer
472 views
Best way to separate display and game logic (threads)
What is the best way to separate render and game logic threads?
I'd like to make logic-heavy game (ai, machine learning, and network) in which world updates 50-60 times per second.
I want to ...
16
votes
5answers
2k views
Game logic on the server! Good or bad?
I'm currently planning a simple online multiplayer game. And here is the question. Does it make sense to make the whole game logic on the server and just send the input from the client to the server? ...
1
vote
1answer
260 views
How to decide who wins a race?
I'im thinking of building a text-based browser game.
A racing game.like F1 or rally.
users can set-up a car.
thinks like tyres, fuel, driver,brakes.
every attribute gets a value.
the part where i ...
3
votes
1answer
703 views
Stuck on development of turn-based-strategy game
I am developing a turn based political/military strategy game similar to the DOS game Conflict. I have my game design document completed, but I'm having trouble actually putting together the logic of ...
13
votes
6answers
653 views
Moving players simultaneously?
Consider a 2 x 2 grid of squares. A player can move onto a square if:
no other player wants to move into the square next turn
no other player has waited and is still occupying the square ...
6
votes
1answer
546 views
Linking nodes algoritm for Visual Design
I'm developing an editor for my game, and now it's time to make a visual scripting system to let designer modify behaviours.
This video shows what i have done and the problem
to resolve the link ...
6
votes
2answers
314 views
Is it possible to have concurrent collision detection where every entity acts at exactly the same time?
There are many algorithms that can be used for collision detection. In many cases we check for an overlap in coordinates of an entity.
If we make a triangle a,b and c. We have 2 entities at a and b ...
6
votes
5answers
594 views
Whats the most efficient method for controlling entities?
I'm creating a tower defense game and I'm having logistical issues trying to figure out how to best have all of the enitites do their apporiate task.
I have considered just constantly looping through ...
8
votes
1answer
766 views
Separating logic/update from render/drawing code in a single thread using sleep
I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update/draw code to maximize performance without limiting the drawing ...
7
votes
1answer
715 views
Scrolling a WriteableBitmap
I need to simulate my background scrolling but I want to avoid moving my actual image control. Instead, I'd like to use a WriteableBitmap and use a blitting method. What would be the way to simulate ...
6
votes
4answers
1k views
How does an Engine like Source process entities?
[background information]
On the Source engine (and it's antecessor, goldsrc, quake's) the game objects are divided on two types, world and entities. The world is the map geometry and the entities are ...
3
votes
1answer
288 views
rotating an object from sourceAngle to destAngle, both 0-359, clockwise or counter clockwise?
I've got a game object i need to rotate. It's current angle is player.rotation, the destination is targetAngle, both in degress, 0 to 359. I've got a function named rotateDirection(float sourceAngle, ...
1
vote
1answer
166 views
Can you share some URLs for tutorials that demonstrate programming basic game logic?
I'm really looking for some of the basic concepts to get started, like decision trees and some discussion around aspects of AI and what to consider. A tower defense game would be a good example (but ...
4
votes
2answers
646 views
Question about separating game core engine from game graphics engine
Suppose I have a SquareObject class, which implements IDrawable, an interface which contains the method void Draw(). I want to separate drawing logic itself from the game core engine.
My main idea ...
5
votes
3answers
573 views
Save Security with MD5 Hash
I'm working on a flash game that saves your progress locally. These saves can easily be hacked. My solution is to add an md5 hash of all the variables saved into the save file itself. When loading the ...
10
votes
2answers
4k views
How to implement turn-based game engine?
Let's imagine game like Heroes of Might and Magic, or Master of Orion, or your turn-based game of choice. What is the game logic behind making next turn? Are there any materials or books to read about ...
9
votes
1answer
1k views
Separating physics and game logic from UI code
I'm working on a simple block-based puzzle game.
The game play consists pretty much of moving blocks around in the game area, so it's a trivial physics simulation. My implementation, however, is in ...