10h
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.)
16h
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.
16h
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
15
revised Organising levels / rooms in a MUD-style text based world
Fixed TADS code to be Tads3-legal. Improved Inform code. Because I'm OCD, apparently. Also, screenshots
Dec
14
reviewed Leave Closed libGDX - TextField takes over my multiplexer on android
Dec
9
comment What should we do for the 2014 Winter Refactor?
While it received upvotes and some interesting answers, people didn't feel that it served as a viable replacement for the "please just tell me what to do"-style "what engine should I use for my project" questions. Coming up with canonical questions that people will accept as canonical is tricky. Particularly when they redirect responsibility for picking a final answer for their specific circumstances back to the questioner.
Dec
9
comment What should we do for the 2014 Winter Refactor?
A few years ago, in response to a rash of questions in the form of "What engine should I use to make <Game X>?" (which are explicitly off-topic for reasons that I agree with), I posted a proof-of-concept question: What to consider when evaluating libraries and engines for making a game?, as an attempt to reframe the question in a generic way.
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
2
revised Organising levels / rooms in a MUD-style text based world
Updated samples to be complete implementations of the example XML
Dec
2
revised Organising levels / rooms in a MUD-style text based world
Updated Inform sample to be a complete implementation of the example XML, which can trivially be pasted into Inform and run.
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.
Dec
1
awarded Enlightened
Dec
1
awarded Nice Answer
Oct
29
awarded Notable Question
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.
1 2 3 4 5