• Content count

  • Joined

  • Last visited

Community Reputation

170 Neutral

About Kurasu1415

  • Rank
  1. Hey guys, I have my own engine written in C++ that uses Embedded Python as a scripting language. I know that every platform will likely require me to modify certain parts of my code, but I am trying to see how large those changes would be. So, I would appreciate any answers you can provide to the following questions : 1) Does the PS4, Vita, Xbox One, Wii U, or 3DS allow games to be written in C++? 2) Do they support C++11? 3) Could I use Embedded Python in my C++ Application? Thanks in advance for any answers you can provide.
  2. In the simplest terms, what is the common architecture that developers use to manage and persist script states in their games? Below is a better description of my issue. I've doing a lot of research lately regarding exposing my c++ classes to either LUA or Python. I'm still not sure on what language I want to go with, but that isn't the real question. Exposing a class in either language is no problem, but what I don't understand is where to go from here. What I don't understand is how people manage to get seemingly separate script states for every script instance in their game. For example, Every enemy in the game has a script, that defines a health variable for that enemy. So, if an enemy loses health, the next time I run his script, his health variable in the script should still show the health value it was previously. I can see two obvious solutions to this problem. #1. Have a different Lua interpreter for ever single instance. (This just seems needlessly expensive) #2. Save the state of your entire interpreter and load that up for each script run. The 2nd option seems like the best solution, but I have seen that this is a bad idea. Regardless, I did look into this, and it seems like using the Pickle library with Python would be a good solution. I have also seen that I could serialize parts of my Lua instance and store those. What do you guys recommend  as the best solution?  
  3. 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.
  4. Physics Engine Timing Suggestions?

    I have one last simple question, and I believe I know the answer. I assume the safest way to handle passing the data from Physics to Rendering would be all at once in a structure. For example, have a PhysicsFrame class that holds the ObjectID, its transformation, and the Matrix of every changed object in the physics frame. Then pass that to the Renderer, and have it apply the percentage of interpolation between the new matrix and the old matrix per object. Does that make sense? Thanks again for all the effort you guys have put into helping me.
  5. Physics Engine Timing Suggestions?

    Alright, taking it out of the thread is no problem. It really shouldn't be necessary anyway considering this is a 2D game using Shaders for all of my rendering, so rendering should be quick. So, I could essentially multiply my change in X by the percentage, and my change in Y by the percentage and that should be the translation that I actually apply to my geometry.
  6. Physics Engine Timing Suggestions?

    Ok, I see what you are saying. So basically I set each Physical step to simulate a fixed amount of in-game time, which in this case is 33.3 ms. and I run as many of them per frame that is necessary to make sure it is caught up to current time. Then I take the difference between real-time and the next step-time, and use that difference to interpolate between the last 2 simulated times, to get the final rendered time? Does that make sense?
  7. Physics Engine Timing Suggestions?

    I don't understand how that could work though. I thought the point of this was to make sure that physics ticks at an exact interval.
  8. Physics Engine Timing Suggestions?

    @L. Spiro Thanks for the links. I read through your post and I am still a bit confused. The interpolation part is where I get a little thrown off. How do we ensure that physics will update every 33.3 ms? From what I understand, looking at your graph we SHOULD be at 48.0 seconds, but we actually interpolate in between 0.0 and 33.3 in order to get our position at an exact 33.3 seconds of lag. If that is correct, then my only question is, how do we know that physics will run every 33.3 seconds? Also, when it comes time to render, who does the interpolation, the renderer, or the physics engine? I ask because my system is multi-threaded.
  9. 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 : [url="http://gafferongames.com/game-physics/fix-your-timestep/"]http://gafferongames.com/game-physics/fix-your-timestep/[/url] [url="http://blog.allanbishop.com/box-2d-2-1a-tutorial-part-10-fixed-time-step/"]http://blog.allanbishop.com/box-2d-2-1a-tutorial-part-10-fixed-time-step/[/url] 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?
  10. 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
  11. 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
  12. OpenGL OpenGL and Open VG with Qt or SFML?

    I was told that Cairo and librsvg are very slow. I need to load them and re-render on the fly for deformations and such. I supposed I will have to do some research of my own.
  13. 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
  14. I think I may have found a way to solve my issue. Basically, I just want users to be able to easily create new instances of an object from Lua. I think I misunderstood how Lua works because if I understand correctly Lua doesn't actually create an instance of a class. So the best way would be to have all the creation of new instances handled in the manager and just have the script look something like this: createNew("Enemy") That way Lua just sends a String to the C++ causing the creation to happen. Also, every object should have it's own Lua instance correct? Thanks again, Kurasu
  15. If you have a class that creates an instance of Lua and then you create a new instance of a class inside of Lua, is there a way to return a reference of the new class back to the class that creates the Lua instance? For example, I have a Manager class that manages enemies. The enemies are created via a Lua script. Each time an enemy is created in Lua, the Manager class needs a reference to the new enemy. Is this possible, and does anyone know how to do it? Thanks in advance.