342 reputation
18
bio website
location
age 27
visits member for 4 years, 4 months
seen Dec 17 at 4:47

Aug
25
comment Game state management (Game, Menu, Titlescreen, etc)
How so? He asked how to set up his various game states, and my solution isn't to use a state machine like he has now, but to instead split up the bits into various systems which are not a state machine but rather a DAG.
Aug
25
answered Game state management (Game, Menu, Titlescreen, etc)
Jul
3
comment What are some good (retro) symbols for magic/mana/energy?
Using blue for magic is not a hard and fast rule, it very much depends on the color scheme of the game. Generally you can use any color as long as it makes sense in the given context and you're consistent.
Apr
5
awarded  Citizen Patrol
Mar
29
revised Stencil buffer appears to not be decrementing values correctly
deleted 14 characters in body
Mar
28
asked Stencil buffer appears to not be decrementing values correctly
Mar
26
accepted Can't use the hardware scissor any more, should I use the stencil buffer or manually clip sprites?
Mar
25
asked Can't use the hardware scissor any more, should I use the stencil buffer or manually clip sprites?
Mar
3
awarded  Yearling
Mar
3
comment Scripting language with class instance support
Yes, you can do that with Lua even without my wrapper library. I used a global function in my example for convenience, but you can call any function that Lua knows about.
Mar
3
awarded  Commentator
Mar
3
comment Scripting language with class instance support
If you're not familiar with the Lua API (either the C API or the language itself) I suggest you read through Programming In Lua. You should be able to get through the whole tutorial in a weekend or so. There's also the Lua Reference Manual. To answer your question, Lua works with stack. 1 is the bottom of the stack. If you want to count from the top down, you can use negative numbers. For exmaple, -1 is the value at the top of the stack. It'll make more sense if you read the tutorial.
Mar
3
awarded  Editor
Mar
3
revised Scripting language with class instance support
added 377 characters in body
Mar
3
comment Scripting language with class instance support
Are you familiar with how to call Lua functions from the C API? If you know how to do that, just do a nil check before calling your function. It's super easy. I'll update my answer with an example momentarily
Mar
3
answered Scripting language with class instance support
Dec
16
comment Calling C++ functions in Lua
Depends on what you mean. If you're talking about C/C++ functions, generally you load those into a table, like my Style table in the example. If you wanted, you could use the lua API to get to those values, and nil them out (or you could do that in Lua directly as well) but I'm not sure why you'd want to do that. IF you're talking about Lua functions, then yes. You can push and pop and move lua functions just like any other value. If you haven't already, I suggest reading through the whole Lua manual. It's really not that long (It just took me one weekend) and it's got lots of good info.
Dec
15
answered Calling C++ functions in Lua
Aug
21
answered How do I identify mouse clicks versus mouse down in games?
Aug
4
comment What popular/famous games are written in C?
Neverwinter is definitely in C too.