So, what would be some cool features in a small, lightweight game engine?
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Game Engine
Started by Mads, 19 October 2012 - 05:46 PMPosted 19 October 2012 - 07:46 PM
I am currently planning a small game engine in C++. With support for entities, special properties and physics, of course. I will probably end up using Box2D. And I was thinking about XML for actually running the game.
So, what would be some cool features in a small, lightweight game engine?
So, what would be some cool features in a small, lightweight game engine?
Posted 19 October 2012 - 07:47 PM
What does this have to do with computercraft?
Posted 19 October 2012 - 07:49 PM
Nothing. It is in the General section.
"Discuss Anything and Everything Relating to Anything and Everything"
No one does any research before claiming anything these days…
"Discuss Anything and Everything Relating to Anything and Everything"
No one does any research before claiming anything these days…
Posted 19 October 2012 - 07:55 PM
True dat.No one does any research before claiming anything these days…
Maybe some… I can't think of anything :P/>/>
Posted 20 October 2012 - 10:21 AM
I assume its a 2d engine, in which case here are a couple of features:
Sprite/tile management and import
Scrolling background (parallax)
Collision detection, custom bounding box or polyon
Level loading and parsers
Gui interface
And if your feeling up for it: cut scenes
I cant think of any more atm, have fun and id love to see te result.
Sprite/tile management and import
Scrolling background (parallax)
Collision detection, custom bounding box or polyon
Level loading and parsers
Gui interface
And if your feeling up for it: cut scenes
I cant think of any more atm, have fun and id love to see te result.
Posted 20 October 2012 - 10:28 AM
On the polygon collision detecting, (unless there is a method for doing this already in C++), then I suggest doing it along these lines:
(requires a method to check if a line passes through another)
-on each loop through the second polygons lines
-if any of these lines collide, set a variable to false, or some other distinguishable value (like 1)
-check if the variable = 1 or whatever it will be set to.
-if it does then there was a collision, with this method you could even return the lines which hit.
This is how I did it when I was creating something along these lines for Java (theres probably some better ways, but this is one)
(requires a method to check if a line passes through another)
Spoiler
-loop through all the polygons lines-on each loop through the second polygons lines
-if any of these lines collide, set a variable to false, or some other distinguishable value (like 1)
-check if the variable = 1 or whatever it will be set to.
-if it does then there was a collision, with this method you could even return the lines which hit.
This is how I did it when I was creating something along these lines for Java (theres probably some better ways, but this is one)
Posted 20 October 2012 - 10:38 AM
Box2D already features collision detection, so I will probably just go with that, as it is probably more optimized than whatever I could cook up myself.
And it is indeed a 2D engine, so it will not require the best computers to run, or anything like that. On of the things, that I am a bit scared of, though, is shading, because I don't want to dive into OpenGL, if it cannot be done relatively easy with an alternative. I might use GLEW or GLUT, I just want an easy way to render Textures, because I don't want to write a couple of thousands of lines, just to render an image on the screen. My intial thuoght was SFML or SDL.
And it is indeed a 2D engine, so it will not require the best computers to run, or anything like that. On of the things, that I am a bit scared of, though, is shading, because I don't want to dive into OpenGL, if it cannot be done relatively easy with an alternative. I might use GLEW or GLUT, I just want an easy way to render Textures, because I don't want to write a couple of thousands of lines, just to render an image on the screen. My intial thuoght was SFML or SDL.
Posted 20 October 2012 - 10:48 AM
I've never dealt with advanced shaders; but if it's just 2D then surly when you draw each pixel you could check its distance from light sources and layer it with the appropriate shading?
Posted 20 October 2012 - 05:04 PM
Mod support :)/>/>.
Posted 21 October 2012 - 07:58 AM
Open-source = Mod support.