Linked Questions

22 votes
4 answers
4k views

Architecture a for a central renderer rather than self-rendering [duplicate]

For the architectural side of rendering, there's two main ways: having each object render itself, and having a single renderer which renders everything. I'm currently aiming for the second idea, for ...
PrettyPrincessKitty FS's user avatar
5 votes
2 answers
4k views

Should game objects draw themselves? [duplicate]

Assuming you have classes like Player, Enemy, Map and ...
user42030's user avatar
8 votes
2 answers
2k views

Structuring game world entities and their rendering objects [duplicate]

I'm putting together a simple 2d tile-based game. I'm finding myself spinning circles on some design decisions, and I think I'm in danger of over-engineering. After all, the game is simple enough ...
keithjgrant's user avatar
0 votes
0 answers
131 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 class? I ...
Ben's user avatar
  • 487
2 votes
0 answers
51 views

With what structure do you manage the graphics of a game? [duplicate]

Im currently trying to program a little game (in Java - Libgdx; if thats necessary). I currently use a GameWorld and a ...
zebleckDAMM's user avatar
16 votes
6 answers
6k views

How do I correctly use singletons in C++ engine programming?

I know singletons are bad, my old game engine used a singleton 'Game' object that handles everything from holding all data to the actual game loop. Now I'm making a new one. The problem is, to draw ...
Accumulator's user avatar
16 votes
6 answers
7k views

Should an object in a 2D game render itself?

I'm making a 2D street fighter-like game that is not tile based. Usually people recommend that entities be given to a renderer that render them, not them render themselves, but it seems the inverse is ...
jmasterx's user avatar
  • 2,099
7 votes
2 answers
3k views

How can I make the switch from immediate mode to VBOs?

I've been using OpenGL for a short time now- and I'd like some clarification on VBOs. As I understand it, a VBO is an object stored on VRAM. In immediate mode, to apply a texture we simply bind it and ...
ultifinitus's user avatar
  • 1,912
0 votes
1 answer
6k views

Turn a single player game into multiplayer game

hobbyist / indie dev here and I was wondering about network programming and making a game capable of multiplayer. So basically I just haven't touched on network programming yet and really don't know ...
David Knight's user avatar
1 vote
1 answer
1k views

Is this an optimal way to architect an OpenGL Renderable object class?

I want to create a class which is a "Renderable class". Basically, world objects will use this as a Base class to create objects that can be drawn into an OpenGL window. This is what i 've got so far: ...
k_kaz's user avatar
  • 125
1 vote
1 answer
1k views

How to render in an entity component system?

I am currently working on a game in Java that uses an entity component system. The game currently has two separate update() and ...
user avatar
2 votes
2 answers
383 views

How can my "world" provide the information required to render itself?

I am writing a JavaScript game that provides a top down view of the player, to eventually create a ray caster that can render the view in faux 3D (the top down view will end up as the mini-map). A ...
alex's user avatar
  • 763
-2 votes
2 answers
439 views

Rendering structure [closed]

my question is "What is the best way to structure rendering code". Is it better to make a class with a render function that iterates through all game objects based on there name or type and have no ...
user389006's user avatar
1 vote
1 answer
115 views

How should I handle a modelview stack with multiple shader programs involved?

I'm building a framework where each object has an associated program and each object has a 'draw' method. What is the best choice, to have a single modelview stack handled by a Renderer class or to ...
JTulip's user avatar
  • 37
2 votes
0 answers
156 views

Moving Draw functions out of GameObjects

This is basically the issue as in Tactics for moving the render logic out of the GameObject class with the topic already discussed here and here However I'm not really satisfied with the given answers....
Flamefire's user avatar
  • 216