Tagged Questions
0
votes
0answers
20 views
Design issue: World class only contains Rigidbodies but custom objects need further updating
BACKGROUND:
My World class that is responsible for updating the physics for each object in the game contains a std::vector of Rigidbody classes.
As Rigidbodies are added to the world, they are also ...
8
votes
5answers
361 views
How can I update Display settings from an Options screen without restarting?
I'm currently creating a 2D RPG in C++11 with Allegro 5 and boost.
My goal is to somehow update my game settings when an option is changed in the Options Menu. I don't want to force the user to ...
11
votes
4answers
779 views
Game architecture / design question - building an efficient engine while avoiding global instances (C++ game)
I had a question about game architecture: What is the best way to have different components communicate with each other?
I do really apologize if this question has already been asked a million times, ...
1
vote
1answer
252 views
CPU usage, game loop and sleep()
I've read about this topic on numerous discussion sites, but I can't seem to find a clear definitive (up-to-date) answer, and hopefully this will me some more insight:
I've read the excellent game ...
1
vote
1answer
291 views
UML Class Diagrams for 2D platformer Games? [closed]
I have to develop a small arcade game in C++ for a college assignment using a 2D Game Engine my teacher coded. What would be the best way to make a UML class diagram for it? It's very basic stuff but ...
1
vote
0answers
127 views
Game editor architecture
I'm looking in to developing a game editor - essentially a level editor for my game but a little more advanced i.e edit menus and loading screens and what not.
So far, I have come up with a ...
2
votes
1answer
116 views
Creating Input layouts for different vertex types
I'm still in the planning phase for a hobby abstract renderer, and i'm wondering how i should handle multiple vertex types and different shader inputs. (This is my first graphics project, so cut me ...
1
vote
1answer
156 views
How can you implement Lua into your game? [closed]
I am trying to implement Lua into my game, but am having trouble. Say I have a weapon class, which is just a hollow shell, lacking real functions. I was thinking of creating an onFire function, which ...
0
votes
0answers
64 views
Using boost function to wrap execution of a boost signals2 signal
I am considering using the boost library to design a simple yet effective callback event notification framework for my game application. The idea is that objects that can raise events would have a ...
4
votes
1answer
473 views
Implementing a camera / viewport to a 2D game
What is the most practical way to implement camera/viewport to a 2D-game?
I've read, that I should store the object world position instead of position relative to the screen?
Current situation:
I ...
1
vote
3answers
481 views
Question on the implementation of my Entity System
I am currently creating an Entity System, in C++, it is almost completed (I have all the code there, I just have to add a few things and test it). The only thing is, I can't figure out how to ...
2
votes
3answers
494 views
SceneManagers as systems in entity system or as a core class used by a system?
It seems entity systems are really popular here. Links posted by other users convinced me of the power of such system and I decided to try it. (Well, that and my original code getting messy)
In my ...
5
votes
1answer
338 views
Component based design, but components rely on each other
I've begun stabbing at a "Component Based" game system.
Basically, each entity holds a list of components to update (and render)
I inherit the "Component" class and break each game system into it.
...
8
votes
1answer
332 views
How can I cleanly and elegantly handle data and dependancies between classes
I'm working on 2d topdown game in SFML 2, and need to find an elegant way in which everything will work and fit together.
Allow me to explain. I have a number of classes that inherit from an abstract ...
1
vote
1answer
192 views
How can I refactor my code to use fewer singletons?
I started a component based, networked game (so far only working on the server). I know why singletons can be bad, but I can't think of another way to implement the same thing. So far I have:
A ...
14
votes
6answers
1k views
Should Vector3 inherit from Vector2?
I'm creating a couple of classes Vector2 (X & Y) and Vector3 (X, Y & Z), but I don't know whether to make Vector3 inherit from Vector2, or whether to re-implement the member variables m_x and ...
6
votes
4answers
533 views
Pros and cons of using dlls
I wonder about create every game engine module (render, input, sound, etc...) into dlls (renderer.dll, input.dll, etc...). What are pros and cons in your opinion of divide game into set of dlls ? I ...
-2
votes
3answers
999 views
C++ Game Engine Book/Tutorial/Anything recent? [closed]
Before I get flamed, please understand that I have been looking for a while now. Yes, I have found a good amount of game engine tutorials...except filled with errors, out of date syntax, missing ...
1
vote
4answers
695 views
SDL - Getting a single keypress event instead of a keystate?
Right now I'm working on a simple SDL project, but I've hit an issue when trying to get a single keypress event to skip past a splash screen. Right now, there are 4 start-up splash screens that I ...
2
votes
2answers
2k views
Entity System with C++
I'm working on a game engine using the Entity System and I have some questions.
How I see Entity System :
Components : A class with attributs, set and get.
Sprite
Physicbody
SpaceShip
...
System ...
1
vote
1answer
193 views
Adjusting server-side tickrate dynamically
I know nothing of game development/this site, so I apologise if this is completely foobar.
Today I experimented with building a small game loop for a network game (think MW3, CSGO etc). I was ...
9
votes
3answers
1k views
Component-based design: handling objects interaction
I'm not sure how exactly objects do things to other objects in a component based design.
Say I have an Obj class. I do:
Obj obj;
obj.add(new Position());
obj.add(new Physics());
How could I then ...
4
votes
4answers
2k views
Why has the industry switched from C to C++?
First of all i would like to have a real answer, i'm always trying to get more from various sources and articles, and when I read things like C++ is slow because it has virtual functions and because ...
2
votes
1answer
520 views
Managing the user input
I'm studying a good number of articles about this topic and seems to me that there is just one way to do this: a signal/slot design.
I was also looking at some more complex async examples but I don't ...
0
votes
4answers
1k views
What is the most efficient container to store dynamic game objects in? [closed]
I am making a first person shooter and I know about about a lot of different container types but I would like to find the container that is the most efficient for storing dynamic objects that will be ...
2
votes
1answer
441 views
C++ game architecture
I'm trying to make a game, but I'm not sure of the best way to set up the main loop and classes. For really small games, I could put everything in the main() loop, including event handling, collision ...
3
votes
1answer
555 views
Game editor integration with the engine?
What I am trying to figure out is what is the best way to integrate the editor(level, effects, model, etc...) in the most effective way?
Now the first thing I thought would be to create the game ...
9
votes
4answers
772 views
Circular class dependency
Is it bad design to have 2 classes which need each other?
I'm writing a small game in which I have a GameEngine class which has got a few GameState objects. To access several rendering methods, these ...
5
votes
1answer
1k views
Game programming: common methods and design patterns
I begun writing a very simple game engine so that I can learn OpenGL 3.x better but since my inexperience and my sparse knowledge of how a 3D game should be designed, I usually get into problems where ...
2
votes
3answers
341 views
C++ Namespace vs Reference passed around like crazy - Implement a quest journal
May sound funny, but that's what the question is about.
Suppose you have this situation:
http://i48.tinypic.com/whl6pk.jpg
Red squares are data types. Hexagons are methods and Journal is the main ...
0
votes
1answer
1k views
GameObject and Components
I am creating a relatively simple game engine in C++ and Qt. I am using Irrlicht for graphics, and as of now, I will not be using any physics or audio libraries. For time's sake, I am using ...
7
votes
1answer
1k views
Turn-based JRPG battle system architecture resources
The past months I've been busy programming a 2D JRPG (Japanese-style RPG) in C++ using the SDL library. The exploration mode is more or less done. Now I'm tackling the battle mode.
I have been unable ...
4
votes
2answers
1k views
What are the disadvantages of using multiple inheritance to implement components?
I've been doing research on component-based game engines and would like to use that model for future game projects. From what I gather, objects in a component-based system are just collections of ...
1
vote
1answer
488 views
Frustum culling code architecture
I'm adding frustum culling into my game engine, but I have some design issues regarding the frustum and the cameras.
Should the frustum be a member of the camera, or vice versa ? Should a camera be ...
3
votes
1answer
164 views
Using allocators for different systems
I am going over the memory architecture for my game and even though I know my memory budgets may not be final, I at the point where I can start using them in a general sense. I know that I will need ...
2
votes
4answers
652 views
Templates and game consoles
I have overhead in several times that templates should not be used on video game consoles, however, I never heard why or understood why. Why shouldn't templates be used on video game consoles, and if ...
8
votes
3answers
2k views
Custom allocators used in game development
I have been researching creating my own allocator methods (that will support things such as a memory pool and profiling), however, as I continue my research I have been looking for how this was done ...
5
votes
3answers
2k views
Object-Oriented OpenGL
I have been using OpenGL for a while and have read a large number of tutorials. Aside from the fact that a lot of them still use the fixed pipeline, they usually throw all the initialisation, state ...
7
votes
3answers
386 views
Profiling and containing memory per system
I have been interesting in profiling and keeping a managed memory pool for each subsystem, so I could get statistic on how much memory was being used in something such as sounds or graphics. However, ...
0
votes
0answers
117 views
Where should I put my drawing code [duplicate]
Possible Duplicate:
Should actors in a game be responsible for drawing themselves?
How can I refractor the following, to move my drawing functions from the h-file into a GraphicsManager ...
2
votes
2answers
176 views
Why does my win32 call, contained in a Class method, fail?
Using a Direct3D Tutorial, I took the knowledge and encapsulated it into a class. The code builds in MSVC 2010 fine, and I've handled all compiler warnings pertaining to my project with the highest ...
0
votes
3answers
864 views
For learning purposes only, is creating a game engine or using one such as Unity3D or UDK better?
Alright, let me start off by saying this: I've seen multiple threads comparing creating custom game engines to already created game engines such as Unity3D or UDK, but none of the threads I've found ...
8
votes
2answers
3k views
Interaction between engine parts
I want to ask a question about how the information exchange between game engine parts should be implemented.
The engine is separated in four parts: logic, data, UI, graphics.
In the beginning I made ...
8
votes
3answers
3k views
How to organize a game engine in C++? Is my use of inheritance a good idea?
I'm a beginner both in game developping and programming.
I'm trying to learn some principle in the building of a game engine.
I want to create a simple game, I'm at the point where I'm trying to ...
7
votes
1answer
747 views
Am I on the right track with this component architecture?
I've recently decided to revamp my game architecture to get rid of deep class hierarchies and replace them with configurable components. The first hierarchy I'm replacing is the Item hierarchy and I ...
4
votes
3answers
729 views
How would you structure a weapon class such that it works for many types of weapons?
How would you go around creating a reusable weapon class? I can't really wrap my head around creating a class, which will work for both melee and ranged weapons.
Example given, that you have a knife, ...
1
vote
2answers
402 views
3D game: is a spatial index necessary?
I'm working on a 3D space simulation game in C++.
I've read that in many cases games use spatial indexing (hashing) that allows to quickly detect collisions, find out what entities to draw and so ...
4
votes
2answers
807 views
Container classes in tile-based games.
I've recently begun working on a tile-based tactical game, and I have questions regarding a couple of key moments.
Is it feasible to organize the tilemap as an array of containers, which can hold the ...
0
votes
2answers
304 views
Obtaining a certain type of object with component based design
I'm trying to design my game to be component based rather than overly hierarchical. Essentially, every high level object in the game (like gun, or whatever) inherits and implements the interfaces that ...
2
votes
2answers
499 views
2D AI Engines/ Resources?
i'm wondering if there's any 2D AI source code or engines out there. I'm inspired by the Euphoria engine, and want to use whatever is already out there to make something like it in 2D, where the ...
