Tag Info

New answers tagged

0

here is the alpha-beta algorithm definition: Alpha–beta pruning is a search algorithm that seeks to decrease the number of nodes that are evaluated by the minimax algorithm in its search tree. It is an adversarial search algorithm used commonly for machine playing of two-player games (Tic-tac-toe, Chess, Go, etc.). It stops completely evaluating a move when ...


0

SDL can build in many Platform. If you are ussing C++, all STL library work on g++ and windows compilers. fopen, and others is the same. EDIT: You can see this: https://wiki.libsdl.org/CategoryIO and others SDL Functions.


3

SDL is a cross-platform library, so as long as your code is cross-platform(i.e. no OS specific calls, use '/' in directories instead of '\', etc.), yes you should be able to copy and paste without too many issues. If you end up using a different compiler, it might be more or less lenient about certain things, but they are probably minor.


0

ochi12 you asked this question opengl my triangle is always the same color? they closed your thread, but I understand the question. You asked why the color does not change, you need to send the vertex and color to the vertex shader then from there to the fragment shader, you try to send the vertex to one shader and the color to the other, the color must ...


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