The code-structure tag has no wiki summary.
0
votes
0answers
21 views
Class Pointers vs Reference [migrated]
I understand the basics of pointers and references, but the biggest issue I have is in deciding when they should be used (and which). The main example I will give is one of a basic game. Assume the ...
1
vote
1answer
66 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
106 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
81 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
178 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
151 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
105 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
279 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
900 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
1k 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 ...
5
votes
3answers
242 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
830 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
173 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
830 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
574 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
527 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
227 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
477 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
511 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
897 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
1k 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 ...