Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Groogy's Game Engine  (Read 29295 times)

0 Members and 1 Guest are viewing this topic.

Alejandro

  • Newbie
  • *
  • Posts: 27
    • View Profile
Groogy's Game Engine
« Reply #45 on: July 07, 2011, 06:21:08 pm »
After changing the include and lib files for my Qt project to the newly compiled sfml2 static libs I'm getting some weird errors:
Code: [Select]

:-1: error: D:\GameLibs\SFML2\build-static\lib\libsfml-graphics-s.a(RenderWindow.cpp.obj): warning: duplicate section `.rdata$_ZTIN2sf6WindowE[typeinfo for sf::Window]' has different size

:-1: error: D:\GameLibs\SFML2\build-static\lib\libsfml-window-s.a(Window.cpp.obj): warning: duplicate section `.rdata$_ZTIN2sf6WindowE[typeinfo for sf::Window]' has different size


Unless something has changed from about a month ago that made the Qt SFML tutorial incompatible with the current branch I guess I won't be able to use the engine any time soon after all :/

Edit1: Got it working, seems like you need to clean and rebuild everything in your project when you use something new ...

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #46 on: July 08, 2011, 07:17:08 am »
Alright some more changes has been committed, check out the repo for details.

Next on my schedule is to add a heap structure to the utilities library, create a common rendering queue and use this for the rendering queue and add a mechanism for the developer to specify the graphics priority for drawing.

Some time in the future I will also allow the developer to create separate layers with their own rendering queues. And of course with this changes to the context class will be made so that they can turn on and of z-buffer and etc. to get appropriate effects.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #47 on: July 08, 2011, 07:58:33 am »
On the rendering queue priority.... I'm thinking... Should I use z for that? So that for 3D objects the priority will be: camera.z - object.z and for 2D objects I also add a Z value that don't affect rendering but only it's order in the heap?

Or should I separate this entirely from positioning?

Anyone interested that can give me their opinion?

Issue: https://github.com/Groogy/GGE/issues/17
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #48 on: July 08, 2011, 09:38:13 am »
WARNING! Latest changes to SFML2 regarding mouse input has the engine freaking out. Will take me some time to sort it out. Will be fixed soon I hope.

Seems to be an error on SFML2's side so will just have to sit and wait until Laurent sorts it out.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #49 on: July 10, 2011, 07:06:57 pm »
Okay mouse input is working normally again and also the engine had some problems with MinGW, something about templates, static variables and DLL's. Apparently these 3 don't play nice together. But now it works =)

Thanks Alejandro for bearing with me. Hope you'll enjoy using the engine. As I've said, if something is missing tell me and I'll implement it as fast as I can. If I already have it planned then I will prioritize it if possible.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #50 on: July 12, 2011, 09:54:38 am »
Been up all night working on the engine. Got finally in Frustum and OOBB cull testing. Though the Frustum vs OOBB test can be optimized. Right now a new rotation matrix is created every time we do a call to BoxInside.

Not used yet by the engine but the classes are there to be used manually if you want to. I am first going to implement an octree for spatial partitioning to magically cull away so many objects as possible without actually doing any tests. Then both classes will be used on the graphical side of the engine so the user won't even need to do anything. All he has to do is enable a 3D object to be rendered and then the engine will handle the rest.

UPDATE: Also added an example now that shows how frustum works and how to cull objects. Though this will of course later on be handled internally in the engine. But those that want to do it in logics for some reason should use this as a reference point.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #51 on: July 15, 2011, 07:01:24 am »
Alright working on the Spatial partitioning optimization(Octree to be exact) for the engine. Though need a way to determine how big a model/an object is in order to put them in the right node. I'm interested in opinions if anyone are willing to give that.

I can't do per-vertex collision test for this as it must allow remove and adding of objects dynamically as the game world changes. What I can come up with that's reasonable is using a sphere or a bounding box. The bounding box would let us get the models as deep down as possible in the hierarchy letting us cut more objects away when doing an "in view" test or even collision tests. The other hand sphere's are simpler and faster and would let us add and remove objects much easier though an object might be on a level too high compared to the bounding box.

Also thinking that there might be possible to add a functionality where the developer can "attach" a collision test object themselves but that would remove a lot of optimizations I can do if it would be just simply spheres.

So I am torn between optimizing the actual partitioning or the dynamic change of the partitioning. Any suggestions or ideas are appreciated ^^
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Alejandro

  • Newbie
  • *
  • Posts: 27
    • View Profile
Groogy's Game Engine
« Reply #52 on: July 15, 2011, 04:24:21 pm »
Spheres and bounding boxes are both great ways to make the collision detections simpler, but the thing is that some objects might be suited for one rather than the other and if only one system is implemented, some objects might suffer from it.

Another option might be using ellipsoids as the combine the best parts of both primitives, if used for organic models, but for static scenery, which in most cases is constructed of blocks, it would be a waste of performance.

Allowing the developer to attach their own collision model is the best way in my opinion, but it would cut on the possible optimizations. Maybe you could add all options and use the specific optimizations for the different objects, making the performance cost lower a bit, if it isn't too much work to do.

What I would do in such a case (if I had the knowledge for optimizations and 3D drawing) is make 2 separate objects: 1 for scenery and 1 for moving objects. The scenery would use bounding box collision making it easy to do collision vs moving objects, since most of the time you won't want to do such smooth motions and paths, which can be achieved with pathfinding algorithms anyway. Objects which aren't static could use any of the 3 possible collision models, making it easier to make accurate collisions, but increasing the performance cost. Maybe you can give the objects which have used defined collision models, a simpler model, which will be used, when frame rate lowers drastically.

Hopefully I haven't confused you entirely and made nonsense offers  :lol:

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #53 on: July 15, 2011, 08:37:33 pm »
Just some background. Octree is made for optimizing a lot of stuff. The basic idea is to let us divide the world into several nodes which will let us cut away objects that are so far away that it would make no sense to do any test between them whatsoever. Let's say we do a frustum test to only call render to the objects in view. It is unnecessary to do the frustum check against every object, in fact it can turn out to actually hurt the performance instead. So instead we do a frustum test against the octree to find what nodes are in view and only do a frustum check against the objects inside those nodes. But don't worry you actually gave me some insight.

Quote from: "Alejandro"
Spheres and bounding boxes are both great ways to make the collision detections simpler, but the thing is that some objects might be suited for one rather than the other and if only one system is implemented, some objects might suffer from it.
That's what I am afraid of but it might be hard to support several different ones in the same system.

Quote from: "Alejandro"
Allowing the developer to attach their own collision model is the best way in my opinion, but it would cut on the possible optimizations. Maybe you could add all options and use the specific optimizations for the, making the performance cost lower a bit, if it isn't too much work to do.
So the default would be a sphere with the radius equal to the distance of the farthest vertex. Which is as simple as possible. But this means I must implement a generic collision system that still supports the sphere optimized for octree addition and removal.

Aight will soon be working on this. But thinking how would the developer describe the collision model? Should every model/object have it's own configuration file for stuff like this?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Groogy's Game Engine
« Reply #54 on: July 16, 2011, 12:03:02 am »
I don't have a lot of time to get to know this piece of work better, but it absolutely looks fantastic :D

Great work, this is to give all support so you continue to invest your time in such a great way, keep going friend!

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #55 on: July 17, 2011, 10:20:40 am »
Alright Spatial Partitioning system is in now and is pretty modular so that others can use it in logics to limit search algorithms and so on. The ManualCulling example has been updated to show how to use frustum together with the octree to cull away huge amounts of graphics that is not in view.

Next step is to add this to the graphics thread so that it works by itself without the user actually having to do any cull logic. Also there might be more stuff to add to the frustum and octree classes in the future but the basics are in now.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #56 on: July 18, 2011, 05:38:33 am »
Alright the Octree class is now expandable. If an object is inserted outside the extents of the octree it will try and expand it until it covers that object entirely. The function that does this is public so can also be done manually.

With that I've replaced the render queue for 3D objects in the graphics thread with an octree. So even though logically you have a million graphical objects placed out in the world the graphical thread will efficiently find those in view and render only those.

I've updated the original post and next up on my schedule is probably configuration and the like. The question is if a scripting language should be used for configuration or just something simple from a text file.

 I will probably be starting working on my own game as soon I figure out some more details in the game play.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

keyforge

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Groogy's Game Engine
« Reply #57 on: December 08, 2011, 05:17:13 pm »
Hello,

Is this project still active? I was wanting to use it for a game I've been wanting to make, but it hasn't been updated for a while. If it's not I could always build off of it for my own use, though.

By the way, I love the design of the interface. It's very elegant!
Need a place to upload your code, files or screenshots? Use SFML Uploads!

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Groogy's Game Engine
« Reply #58 on: December 09, 2011, 08:39:14 pm »
Thanks, well this version is not really active no. I'm more or less doing a remake on Github under a private repo called Ymir(The norse giant which was slained by the norse gods to create the world)

The new remake will take a lot of time and this time not released until I reach a certain milestone. So when I have my own game working in it.  :wink:

The new one will be more clean, especially at letting the developer both have it as a framework or just as a barestrap interface against 3D. Currently I use the engine to fake 3D with sprites and shapes but is going to change soon. It already support more stuff than GGE does. For instance it comes with a scripting language where you even can modify the rendering pipeline. Even the threading and interface against it is better.

But until it is released, you are free to use whatever part of GGE that you want. It's zlib licence so you are not limited in any way.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

 

anything