The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
2answers
90 views

How to hit an enemy, or “how do entities interact with each other?”

The title might be a tad simple for the purpose, but bear with me. I'm a tad lost about how to do the interaction between game objects. I use an entity-component-system framework and I've got the ...
1
vote
1answer
133 views

Component-Entity Systems Code Generation [closed]

I'm really enjoying component entity approach (I'm currently using ASH haxe, but particular language/framework doesn't really matter). However the problem is - there're way too many elementary ...
40
votes
8answers
7k views

How can I avoid having many singletons in my game architecture?

I use cocos2d-x game engine for creating games. The engine already uses many singletons. If someone used it, then they should be familiar with some of them: Director SimpleAudioEngine ...
-1
votes
0answers
135 views

Parallelism and Functional programming

I have had a recent interest in functional programming and found it to be most appealing to me. However, coming from a OOP background i can't seem to wrap my head around some problems. The main ...
1
vote
2answers
402 views

Unity - Avoid using Find method by caching UnityObjects - Code review

I'm trying to avoid using GameObject.Find during runtime to find particular GameObject components when wanting to instantiate them. I have created a cache for the gameobjects from which I can either ...
5
votes
2answers
232 views

Is having a master builder object a bad idea?

I have wondered about using the following approach to creating Entity objects in a personal project. What I want is to be able to keep track of all Entity objects that get created, so whenever an ...
0
votes
1answer
225 views

Game Structure in depth [closed]

I've been curious about game structure for some time now. Does everyone who is a game programmer come up with there own approach to structure there game, or is there like some sort of defined layout. ...
2
votes
2answers
128 views

Events vs Pinging: How should I structure my HUD-updating code?

I'm starting to develop a 2D fighting game using C++ and SMFL. I'm relying (at least sort of) on a Entity Design Pattern. I'm struggling to see how my code should update and manage a ...
0
votes
1answer
486 views

Tower defense endless levels logic sprite kit [closed]

I am making a tower defense game for iOS using Sprite Kit. I would like for my game to support an endless number of levels, like in Bloons TD 5. What approach should I take to implement this?
4
votes
3answers
216 views

When should I load my resources?

I'm making a game, and right now I'm working on the user interface. I'm just wondering when I should be loading my resources. Should I do it in small pieces at a time? Load resources for part 1 of ...
0
votes
1answer
435 views

Roguelike Map Structure [duplicate]

I'm working on a roguelike and would like to know how to structure my map data. I suppose this question could also be extended to any sort of top down 2d game. Anyways! My game will contain object ...
0
votes
1answer
199 views

Collision Detection Code Structure with Sloped Tiles

Im making a 2D tile based game with slopes, and I need help on the collision detection. This question is not about determining the vertical position of the player given the horizontal position when on ...
1
vote
1answer
230 views

Handling multiplayer operations in C#

I would like to know how do experienced c# developers structure their multiplayer messages and operations. Basically , in my project every UDP message is translated into an operation and I have to ...
1
vote
1answer
178 views

Handling Multiple Items Interaction (in a 2-Players Game)

Back Story I'm working on a 2-Players 2D game that players play multiple rounds ,until one win. In each round, each player choose some items (1 or more) for his/her car ( e.g. shield, anti-shield, ...
2
votes
1answer
108 views

Separating data from model and successfully visualizing it

This is a bit of a design question that I'm struggling with. I have a data model and an entity model. The data model is, of course, what is (de)serialized to represent my levels and entities within ...
4
votes
3answers
224 views

How to understand huge code bases? [closed]

I read about game loops, read tutorials of simple games like Asteroids and programmed them by myself. Nevertheless if I try to start reading code of a game with many many thousand lines of code, I ...
-2
votes
1answer
220 views

Game code structure using openGL / Android [closed]

My game will have 3 activities (splashscreen, options menu and main game). As it stands, each is a separate activity with it's own activity class and GLSurfaceview class. Is this structure the right ...
3
votes
1answer
226 views

LWJGL Eclipse Resource Deployment

I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now ...
1
vote
1answer
436 views

How do I store multiple bullets' coordinates?

My game is a 2D game(or tries to be) in pure C using SDL(no OpenGL at all). No specific goal in it, it's pretty much boilerplate code. I decided I want to make my character/player shoot "something", ...
-2
votes
1answer
2k views

The best way to structure/design game code [closed]

My question is quite broad and related to the 2D game code design/architecture/structure. Usually the main game consists of the main loop where you update & render your world states. However, ...
2
votes
1answer
2k views

HTML5 point and click adventure game code structure with CreateJS

I'm a programming beginner. I made a tiny one scene point and click adventure game to try to understand simple game logic and came up with this: CreateJS features prototypes for creating bitmap ...
9
votes
4answers
1k views

How does 20Q work internally?

Ever since childhood, I've wondered how the 20Q electronic game worked. You think of an object, thing, or animal (e.g. potato or donkey). The device then asks you a series of questions such as: Is ...
5
votes
3answers
315 views

Deleting a game object causing an access violation

I tried doing this but it cause an access violation. void GameObjectFactory::Update() { for( std::list<GameObject*>::iterator it=gameObjectList.begin() ..... (*it)->Update(); ...
7
votes
6answers
2k views

Game state management (Game, Menu, Titlescreen, etc)

Basically, in every single game I've made so far, I always have a variable like "current_state", which can be "game", "titlescreen", "gameoverscreen", etc. And then on my Update function I have a ...
0
votes
1answer
276 views

Structuring various game states and unique levels

I have a game design 'structure' question that I'd like to throw out there. This question is about various ways of designing game 'states', and specifically a system of 'levels'. Specifically, what is ...
0
votes
1answer
2k views

Interactions between game objects

I'm programming a basic Pacman clone to teach myself game programming. However, I'm struggling with the best way to have the game objects communicate/interact without my code becoming a huge mess. ...
6
votes
2answers
871 views

Observer Pattern Implementation

To teach myself basic game programming, I am going to program a clone of Pong. I will use the Observer design pattern, with an interface between the input and the game engine. However, I'm not sure ...
4
votes
3answers
638 views

How do I do a game loop in c99?

I'm having trouble with how to structure a game using c99. I've seen a few tutorials on making a game loop, but they are all done with c++ and classes. My main problem seems to be moving data around ...
9
votes
1answer
252 views

Efficient solution for multiplayer space partioning?

This question is a little tricky, but I will try to make it clear. Lets say I am building an online game (not MMO-scale), but that supports as many players as possible, in a authoritative server ...
3
votes
1answer
607 views

Open trading card game rulesets?

Got pitched a project where we need to make a trading card game to promote a clients project. I don't have any brilliant ideas for rules, but was pondering if any "open-source" rulesets existed, or if ...
6
votes
2answers
576 views

How tightly should I stick to entities in a component based game?

I apologize if the question is a little vague, It was hard to explain it in a short sentence. I'm currently writing a component based game, it's getting along great but I'm starting to wonder how ...
5
votes
2answers
1k views

Brick Breaker Game Structure

I am working on a brick breaker style game (i.e., like Arkanoid) in C#/XNA. As I add more features such as powerups, special brick types, etc I am running into problems figuring out how the whole game ...
10
votes
1answer
2k views

To scene graph or not to scene graph?

I've been struggling with a decision regarding whether or not to implement a scene graph in my game. I have some use cases that call for such a tool, but I haven't been able to get through some of the ...