15,013 reputation
13570
bio website vectorstorm.org
location Melbourne, Australia
age
visits member for 3 years, 6 months
seen 2 hours ago

Mobygames Profile (not entirely accurate): http://www.mobygames.com/developer/sheet/view/developerId,80048/


2h
comment How to setup glOrtho and Viewport
possible duplicate of Can you help me solve the paradox that has confused me about the glViewport and glOrtho functions?
3h
comment How to setup glOrtho and Viewport
@AndonM.Coleman The precise question was how to "fill the display". I think it's pretty clear that they weren't asking how to fill only a small portion of a window.
14h
comment How to setup glOrtho and Viewport
Using these variables how can i configure glViewport to have the area defined by the dimX variables fill the display? The origin needs to be at 0,0 and the viewport needs to fill the entire window. That was the question being asked, as I read it.
14h
comment How to setup glOrtho and Viewport
Your glViewport call won't work if dimL doesn't equal zero, or if dimR doesn't equal windowWidth. Similarly, dimB must be zero, and dimT must equal windowHeight. I don't think the question implied that any of those conditions were necessarily the case.
15h
comment How to setup glOrtho and Viewport
I don't think this is right: glViewport (dimL, dimB, dimR - dimL, dimT - dimB). Those dimL, dimB, dimR, and dimT values are the values being passed to glOrtho() (according to the code provided by the OP); they don't necessarily have anything to do with the window dimensions.
2d
comment Problem getting mouse events while keys held down in SDL2
@sol_var You should post that as the answer and accept it. :)
Dec
18
comment Problem getting mouse events while keys held down in SDL2
No, in SDL2 you will receive SDL_KEYDOWN multiple times, at a frequency based on your OS's key repeat rate. (You can tell whether a SDL_KEYDOWN was generated by a true keydown or by the OS's key repeat by checking the value of event.key.repeat.)
Dec
18
comment Problem getting mouse events while keys held down in SDL2
For what it's worth, the code looks legal, and it works for me as-is under Linux, using SDL2 v2.0.2.
Dec
18
comment Problem getting mouse events while keys held down in SDL2
Note that if you're receiving mouse motion data via SDL_PollEvent, you can get the mouse's absolute position from event.motion.x and event.motion.y (and its motion from event.motion.xrel and event.motion.yrel) -- no need to call SDL_GetMouseState. (This doesn't answer your question -- it's just a side-note)
Dec
2
comment Organising levels / rooms in a MUD-style text based world
Also, I've actually been playing this game in another window. Granted it's been over three years since I originally wrote the answer, but it took me literally five minutes to download the latest version of Inform, install it, paste the code in, and now I can actually play it; wander around, pick up objects, check my inventory, save/load games, undo actions, etc. I could put it up on my web page right now, and anyone could play it. How much work do you reckon it'd take you to be able to do that with the XML version?
Dec
2
comment Organising levels / rooms in a MUD-style text based world
It's also worth noting that the XML version is baking the cupboards' contents into the cupboards' description. That is, there's a hardcoded message for what to print when opening or looking at the (open) cupboards, which tells you that there are batteries inside. But what if the player has already taken the batteries? The XML version will tell you that there are batteries inside (because that's the only string it has available to display), while the Inform and TADS versions will tell you that the cupboards are empty.
Dec
2
comment Organising levels / rooms in a MUD-style text based world
In addition to being much shorter, the Inform and TADS examples also support more features. For example, in both of them you can put the knife into the cupboards, which isn't supported at all in the XML version.
Dec
2
comment Organising levels / rooms in a MUD-style text based world
But since you asked about "pitfalls and weaknesses": The Inform implementation is 19 lines long. The TADS example is 40 lines long. The XML implementation requires 126 lines (and would be even longer if it was word-wrapped at 80 columns and contained whitespace for legibility, the way that the Inform and TADS implementations do).
Dec
1
comment Organising levels / rooms in a MUD-style text based world
@DLeh The question was "I'd like to know if this method has any downfalls, and if there's a "better" or more standard way of doing it" This answer provides the better-and-more-standard-way-of-doing-it.
Oct
27
comment In OpenGL, what is “zero state” rendering?
@usm It wasn't dismissive pedantry. Using attribute-less rendering you can load a mesh from a shader file instead of loading it from a model file. If you're really dead set on only ever loading models from model files for some reason, then you can even generate the attribute-less shader source yourself in code, at runtime, based on the model file's data, without ever putting the model data into a VBO. I'm not saying this is necessarily always the best way to do things, just that it's something that you can do and definitely not worthy of immediate scorn.
Oct
27
comment In OpenGL, what is “zero state” rendering?
@usm Vertex data from disk is also "only predefined geometric shapes". Not sure what your point is.
Oct
26
comment In OpenGL, what is “zero state” rendering?
Could it have been "zero attribute"? Zero-attribute rendering (often called "attributeless rendering") does replace VBOs.
Oct
14
comment Fighting Game Camera Positioning in SDL
src.x = midpoint.x - (src.w / 2) ?
Oct
7
comment How should IDs be assigned in an entity component system?
@PatrickHughes I agree; now, two years later, I have a better understanding of why guids work, and disagree with my quip that a large random number "is the same as a guid". Guids give you a lot more reliable uniqueness than a mere random number does. But at the same time, they use a lot of their space for uniqueness that we don't care about in this context (It's not useful that guids generated by my computer are different than those generated by your computer, for this scenario). Guids do tend to be more CPU-intensive to generate, but probably not enough so to matter.
Sep
29
comment GLSL- How to change a certain color of a sprite, to another color passed into the shader?
Your answer is also in the question; use an 'if' statement. So what's the real question, seeing as you've already answered the question that's in the title, yourself?