Tag Info

New answers tagged

1

The usual way to do this in openGL 2.1 would be to draw each one like this (pseudocode): applyCameraTransformation(); for sprite in sprites: glPushMatrix(); glTranslate3f(sprite.x, sprite.y, sprite.z); sprite.draw(); glPopMatrix(); However, notice that you now have many more draw calls, and each one has to send ...


4

According to the documentation for glutDisplayFunc(): Before the callback, the current window is set to the window needing to be redisplayed This means that inside the display callback, you can call glutGetWindow() to find out which window is being drawn to. This means that you can use a static member function as the display callback; just have ...


2

Here is another way to connect rooms with three doors: Make sure the amount of doors in your level is even. Put all your rooms in the not-door'd set Pick two rooms from the not-door'd set Connect them through one of their doors If those rooms still have a door that has no corridor, put them in a partially-door'd set While the not-door'd set is not empty, ...


4

Imagine dots are doors and lines are corridors. This is how you can have three doors connected: There is no reason why you can't link a door to more than one other door. You can have corridors merge at some point. But oldskool roguelikes didn't even do this; they simply connected random pairs of rooms with corridors, and if they happen to cross into a ...



Top 50 recent answers are included