How code is structured. For questions on the internal design of a game engine.

learn more… | top users | synonyms (2)

-1
votes
0answers
24 views

How powerful is Unity, and is it fit for large-scale projects such as AAA games?

I've seen Unity been used in several indie games, however I haven't actually seen it been used in a large-scale project. Why is this? If it's due to the lack of power, what areas does it lack in? ...
3
votes
1answer
140 views

How do I let a game support different rule sets?

I'm making a MUD game engine that supports D&D , Pathfinder and other tabletop-RPG rule sets. I am starting to build out how characters interact with the world (e.g. dialog, battle, searching for ...
1
vote
0answers
25 views

How do I add scripting logic to my dialogue tree? [closed]

I'm creating 2D RPG game and I want to implement branching dialogue system which can also change player stats, add items and so on. Also I want to implement conditions for some answers so player ...
36
votes
7answers
18k views

Where can I find good (well organized) examples of game code? [closed]

Where can I find good (well organized) examples of game code? I'm hoping that I can pick up some organizational tips. Most examples in books are too short and leave out lots of detail for the sake of ...
0
votes
1answer
68 views

Solitaire Game: Transferring Cards Design in C++

So, I'm working on a Solitaire game. I already created a the classes: Card, Pile, Stock. Each work as expected on it's own. My question is: What possible design for managing moving card(s) between the ...
0
votes
1answer
80 views

Double buffer - Managing Collision

I'm thinking about how I should manage collisions in my game. I'm thinking about having a "Collision" class that checks for collision, and in case takes actions to resolve them. My problem is this: ...
8
votes
3answers
953 views

Grouping entities of the same component set into linear memory

We start from the basic systems-components-entities approach. Let's create assemblages (term derived from this article) merely out of information about types of components. It is done dynamically at ...
4
votes
3answers
198 views

Sphere to plane collision never rearching resting contact

I have been trying to have a sphere to plane eventually lead to the sphere coming to a resting contact, but my sphere will end up always bouncing forever. It will bounce correctly for the first few ...
0
votes
1answer
103 views

Client/Server best way of telling client which player it is

I'm making a client/server, everything works grand its very simple, a simple login system, ID, empty variable and the X and Y positions of the player. Should my server tell my client who it is? and ...
1
vote
2answers
134 views

Implementing monte-carlo tree search in a tile based game with units

I have this simple risk-like game I would like to develop an AI for. Players move their Units on the map and a simple fight resolution is done. There is a time constraint of 100ms for each round, the ...
0
votes
4answers
409 views

Entity Component Architecture and Scripting without using threads

I am working on a small game engine for practicing purpose and also for putting some of my ideas into action. What I have so far is a couple of systems for rendering, sound etc. The next step is to ...
1
vote
1answer
101 views

Property replication vs RPC notifications

I'm not talking about something such as an object position, which changes very often. I'm talking about some object state that may be changed infrequently, such as a door opening and closing. Would ...
58
votes
8answers
24k views

Why don't more games use vector art? [closed]

It would seem to me that vector art is more efficient in terms of resources/scalability; however, in most cases I have seen artists using bitmap/rasterized art. Is this a limitation put on the artists ...
1
vote
1answer
45 views

How to setup animation based events without depending on an animation?

How can I have events based off animations without relying on them? Take for example reloading in a FPS game. You'd hit a button to reload your weapon, the animation will play, then animation will hit ...
4
votes
2answers
191 views

How does Unity's Entity-Component System Work In Practice? [closed]

On the surface Entity-Component seems like a good way to program games. Everything is a game object and those game objects are made up of components. The attraction is components are very flexible, ...
3
votes
2answers
75 views

Best way to deal with a large variety of items?

I am currently working on my first java game and I am having trouble figuring out how I should implement my classes that will have heavy variety. For example, I am considering having an abstract item ...
1
vote
2answers
106 views

Bubble shooter clone, structure for storing/adding of bubbles

Im having a few issues trying to figure out what the best data structure to use for storing bubbles on the grid, and how to connect new bubbles to the grid when a moving ball collides with a ball on ...
0
votes
0answers
32 views

Browser Game - Model or not Model

I'm planing on making a browser game just for fun and to improve my skills, but I have an issue regarding the Software Architecture of the game: I will be using an ORM to communicate with my ...
9
votes
6answers
813 views

Networking Pong Clone

I have the fundamentals of TCP sockets, UDP communication etc, but can't find much on how to apply these to a real time game environment. I have a Pong clone, with 4 players, and need to synchronise ...
11
votes
3answers
3k views

How to implement 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 ...
4
votes
2answers
286 views

How should entities in a game reference each other?

I've been reading a lot about design patterns, but in using these patterns there's one question that I keep coming back to. How should my entities access information about each other? Let's say I'm ...
0
votes
2answers
156 views

Good Configuration Manager System Design for medium-large sized projects?

I've create smaller games which simply needed a class which basically opens an INI file (with feather-ini-parser library) with config values for the whole game (rendering ops, music, bindings). But I ...
0
votes
1answer
36 views

Client code handling its own generics when returned by an engine

I'm writing a game engine in Java 8, and have prototype client code written in Groovy. New Game objects can be created with a builder which defines everything which fills in the blanks. To simplify ...
0
votes
0answers
27 views

Deal with double coordinates and graphics

I want to draw some vectors and few sprites in a 2D world.Problem is that they should be precise. For example a vector has position (5000000.65,556666). That depends on user. He might want to add ...
0
votes
0answers
59 views

Hiding actual IP of a Game Server [closed]

I've developed a game server which has 3 layers Login Server(That connects AI Server) AI Server(That connects game logic server) Game Server I want to prevent DDOS attacks as much as possible and ...
0
votes
0answers
67 views

Manage map like The sims game

I'm trying to create a (light) tool to create houses like in the Sims game but I don't know how to manage data/make a valid architecture. For now, I think about something like that: Map: Player's ...
2
votes
1answer
178 views

How should my game characters store their abilities/spells?

I'm new to game development and a bit confused about how to effectively store an object's access to certain spells/abilities. The player and mob objects are all generated from the same class. ...
0
votes
2answers
52 views

Custom key binding/mapping

Currently I am starting to develop my first serious game. Before the games are all training, and learning how to do things in a good way. Unfortunatly, I've missed a big part in my preparation: Key ...
0
votes
2answers
48 views

Questions about property-centric game object runtime

I was reading Game Engine Architecture by Jason Gregory So according to him, I should use an array of entities, and arrays for each property, such as an array gameObjectsPosition, ...
2
votes
2answers
487 views

How do I write a wave-spawning system for a shoot-em-up?

I recently played Knightmare Tower and was amazed by the way how different monsters are beign spawned. I'm aware of time-based and count-based spawing systems in shoot-em-ups. Count-based systems ...
0
votes
0answers
59 views

2D Drawing architecture

I want to create something like a game but I am going to use Direct2D and GDI for drawing API.My problem is that I want to separate drawing code from objects. For example lets say I have conduit ...
0
votes
1answer
62 views

Resetting scene state

i was wondering what are the best practices for restarting the game, say for example in a platformer game when you die the game restarts and you have to reposition all the characters or reset the ...
3
votes
5answers
1k views

How do I prevent memory-modification cheats?

There are many memory-altering programs out there nowadays (Cheat Engine & co). Is there an efficient way to keep a constant variable actually constant? I had two ideas: Make a separate thread ...
1
vote
2answers
184 views

Elegant ways to handle rendering with DirectX 11

I'm looking for a design pattern that's going to help me to elegantly handle the rendering of my game objects. Lots of game development guides talk about how to handle the game objects themselves, ...
44
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 ...
0
votes
0answers
17 views

How to draw borders onto a map in Unity? [duplicate]

I am trying to design a map for my strategy game and Unity seems to have a lot of very helpful tools that simplify the process. I am trying to make a territory system in Unity (using the C# language) ...
21
votes
3answers
2k views

Command Ordering Architecture of Dwarf Fortress

What is the most elegant way to implement a command ordering system for AI? for example in dwarf fortress when you mark a forested area for wood cutting, the dwarfs then would do the following ...
40
votes
3answers
3k views

Why do tutorials use different approaches to OpenGL rendering?

http://www.sdltutorials.com/sdl-opengl-tutorial-basics http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/ These two tutorials use completely different approaches to ...
0
votes
1answer
51 views

Application components dependancy and decoupling

In my client application I have two major components: GameCore - wrapper that handles everything about running the actual game NetworkClient - A layer that takes care of ...
0
votes
2answers
119 views

Do I really need a render() method in the game loop if the view subscribes to the models?

For a game that I'm working on, we've followed the MVC paradigm. However, in classic MVC, the view subscribes to the model and when the model updates it informs the view. We've implemented this as an ...
2
votes
3answers
302 views

How do you filter entities in an Entitiy Component System?

I am currently writing my own ECS in C++ and I am using std::bitset. I register a component at compile time and give it an ID. Position has ID 1 Direction has ID 2 .. ...
0
votes
1answer
294 views

Organising data of a turn-based strategy

I'm intermediate in Java but novice in everything which is on the server-side. I've set myself a task to rewrite an old game, so learning Java is more fun. It is a space turn-based strategy. The ...
5
votes
1answer
788 views

How do particle systems work?

I want to implement a particle system in my game, but I've never programmed a particle system and don't know where to start. I only want to display pixels (GL_POINTs) with different sizes in ...
0
votes
1answer
75 views

In lockstep networking game, how to handle sudden lags and disconnection?

I am trying to implement a game similar to "Street Fighter" by using lockstep networking model so that two players can play remotely via Internet. I have read a lot of articles about lockstep ...
4
votes
3answers
212 views

Decoupling AI from game logic

Imagine a game with different types of characters or "actors" which can perform actions like walking and shooting. They are implemented using the state pattern to reduce the amount of coupling: each ...
6
votes
2answers
184 views

Decoupling assets, instances and the rendering module [closed]

I am trying to redesign a home-grown hobby engine. It became apparent that it was far too tightly coupled and so I'm trying to redesign it in a more modular way. Unfortunately, I'm baffled by the ...
9
votes
2answers
274 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 ...
2
votes
3answers
121 views

Is this a viable architecture for lag compensation?

In some games/engines (such as Source), the server compensates for latency by applying player inputs in the past. Whenever the server receives a player's input for a frame, it rewinds the game to the ...
0
votes
0answers
49 views

Is there such thing as a design pattern for game character attributes? [duplicate]

I'm toying with the idea of a character based game. The characters, robots, monsters, heroes (and weapons I suppose) will all have various attributes as per a D&D game for example. They player ...
0
votes
2answers
103 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 ...