I am using LuaBind to embed Lua scripting into my C++ game engine. My question is how do variables persist in this situation. For example, a game object has the name of a Lua file associated with it. At the creation of the Game object in C++, I call the "OnCreate()" function in the lua script associated with the game object. It seems like I should tell lua what Lua file to look at, and then run the function for that specific file. What if last time I had that specific file open, I set a variable local to the whole script. When the file is reopened, does lua automatically know, and give me access to those variables again?
Sorry if this is a confusing question.
Thanks.
- Viewing Profile: Topics: Kurasu1415
Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics
Community Stats
- Group Members
- Active Posts 43
- Profile Views 1,187
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
139
Neutral
User Tools
Contacts
Kurasu1415 hasn't added any contacts yet.
Topics I've Started
How do variables and objects persist in Lua?
14 November 2012 - 03:02 PM
Physics Engine Timing Suggestions?
03 October 2012 - 05:39 PM
So, I am working on my own physics engine for a game that requires precise controls. The physics is handled in it's own thread separate from the rendering. My issue is making sure that my simulations run at the same speed on all systems. I have looked around and found a few posts relating to this, but as they use Box2D, some things aren't explained. I am particularly interested in the Semi-fixed timestep.
Related Posts :
http://gafferongames.com/game-physics/fix-your-timestep/
http://blog.allanbishop.com/box-2d-2-1a-tutorial-part-10-fixed-time-step/
Now, my system essentially works this way as of current. This is a pretty simplified explanation, but I have a list of Physical Objects, and a Queue of Pairs(or tuples) that have an objectID and a Vector (The mathematical vector). Each Pair represents a force. Then I have my collision handling code. (As I said, horribly oversimplified)
How have you guys solved this problem? Could you offer any clarification on what is explained in these posts?
Related Posts :
http://gafferongames.com/game-physics/fix-your-timestep/
http://blog.allanbishop.com/box-2d-2-1a-tutorial-part-10-fixed-time-step/
Now, my system essentially works this way as of current. This is a pretty simplified explanation, but I have a list of Physical Objects, and a Queue of Pairs(or tuples) that have an objectID and a Vector (The mathematical vector). Each Pair represents a force. Then I have my collision handling code. (As I said, horribly oversimplified)
How have you guys solved this problem? Could you offer any clarification on what is explained in these posts?
Using different shaders on objects, and multiple shaders on one object
11 August 2012 - 12:20 AM
Essentially I am trying to handle my shaders in the most dynamic way possible. I want to be able to associate certain objects with shaders, like a component-based system. So an object can have multiple shaders attached to it. The simplest way I can think of doing it is by having a map of shaders to objects.
I am targeting OpenGL 3.3 so that I can get decently modern code that works on the majority of systems owned by gamers.
My biggest issues revolve around two questions :
1) What is the best way to apply different shaders to different objects?
Thoughts : From what I have read, it seems like the best way is to designate what objects use what shaders, then begin using a shader, draw the corresponding objects, move to next shader.
2) What is the best way to apply multiple shaders to an object?
Thoughts : Should I just bind a shader program, draw what I need, get a texture back, then bind the next shader and pass it my texture? For example, if I had a shader that rendered one specific object in black and white, could I apply my normal shaders, then pass a resulting texture on to the new shaders to do the final processing? Is that too much overhead?
I apologize if my issues are hard to understand. Please ask any questions that can help make the issues more clear. Thanks in advance!
-Kreed
I am targeting OpenGL 3.3 so that I can get decently modern code that works on the majority of systems owned by gamers.
My biggest issues revolve around two questions :
1) What is the best way to apply different shaders to different objects?
Thoughts : From what I have read, it seems like the best way is to designate what objects use what shaders, then begin using a shader, draw the corresponding objects, move to next shader.
2) What is the best way to apply multiple shaders to an object?
Thoughts : Should I just bind a shader program, draw what I need, get a texture back, then bind the next shader and pass it my texture? For example, if I had a shader that rendered one specific object in black and white, could I apply my normal shaders, then pass a resulting texture on to the new shaders to do the final processing? Is that too much overhead?
I apologize if my issues are hard to understand. Please ask any questions that can help make the issues more clear. Thanks in advance!
-Kreed
I got a job offer, is it ok to finish school online?
09 February 2012 - 08:11 AM
So, I got offered a good-paying job developing 3D training Simulations for the military. I still have a year of college left. They picked me up based on my experience. If I go with them, will it look bad if my degree is completed online?
Thanks,
Charlie
Thanks,
Charlie
OpenGL and Open VG with Qt or SFML?
02 February 2012 - 03:00 PM
Hey Everyone,
I am developing a game that will utilize SVGs for all of the art. I am unsure on what collection of APIs/Frameworks I should use. I was thinking about using SFML, and just open up an OpenGL and OpenVG context and go from there. I have also been told that Qt has some decent Vector Graphics functionality built in, and was wondering what you guys thought of that. The graphics will need to be changed on the fly as well.
Are there any performance issues with Qt that anyone knows of? Please let me know if you have any other suggestions.
Thanks,
Kurasu1415
I am developing a game that will utilize SVGs for all of the art. I am unsure on what collection of APIs/Frameworks I should use. I was thinking about using SFML, and just open up an OpenGL and OpenVG context and go from there. I have also been told that Qt has some decent Vector Graphics functionality built in, and was wondering what you guys thought of that. The graphics will need to be changed on the fly as well.
Are there any performance issues with Qt that anyone knows of? Please let me know if you have any other suggestions.
Thanks,
Kurasu1415
- Home
- » Viewing Profile: Topics: Kurasu1415

Find content