Sirrf version 0.2.1 released! (30/08/2009)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

xDan wrote:Sounds pretty interesting.

But it would be nice to have an online doxygen (even without comments) just to quickly and easily look over the API.

(same for all you guys developing frameworks and libraries :) )
Your wish has been granted: Sirrf Doxygen Documentation. It took a little longer than I thought to upload the files, but that's because I made a stupid mistake. Ah well, they're online now. ;)
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Wow. This is really nice. Is it easy to create custom components?
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

ZCCdark203 wrote:Your wish has been granted: Sirrf Doxygen Documentation. It took a little longer than I thought to upload the files, but that's because I made a stupid mistake. Ah well, they're online now. ;)
yay. Now I can evaluate it without the commitment of a download. :lol:
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:Wow. This is really nice. Is it easy to create custom components?
It should be pretty easy to add new entity components. You only have to derive from the EntityComponent class in /src/core/EntityComponent.h. A quick example:

Code: Select all

#ifndef __MYCOMPONENT_H__
#define __MYCOMPONENT_H__

#include "../core/EntityComponent.h" // I assume we're in /src/components directory.


class MyComponent : public EntityComponent
{
public:

     MyComponent();
     ~MyComponent();

     void foo();
     int bar();
};

#endif
And you can let components communicate with each other through the EventManager class.

If you want to get a better idea of the system, then please look at the components in the /src/components directory (or alternatively, look here). SoundListenerComponent is probably the easiest component to understand.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

How angelscript is binded? Can we create for example a function and expose it to angelscript so we can create a script that would do something with a specific entity? (example a trigger object). Is there a MSVC++ port of this or is it Linux only at the moment? Also another question, is there anything needed in the download or we must download other component so the compilation work.

The more I look on this, the more i'm interested to use it. Good job!
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:How angelscript is binded? Can we create for example a function and expose it to angelscript so we can create a script that would do something with a specific entity? (example a trigger object).
You might have noticed that nearly each class implementation is followed by the implementation of a function called bind<class name>. These functions are responsible for binding the respective class to AngelScript. The functions self are called when the ScriptManager class is initialised. So, if you would want to bind custom classes, you could use a similar pattern.

Binding global functions shouldn't be a problem either. That can be done through AngelScript's API:

Code: Select all

r = engine->RegisterGlobalFunction("void foo()", asFUNCTION(foo), asCALL_CDECL); assert( r >= 0 );
I should add that it's currently only possible to create event functions natively. The reason for this is that AngelScript doesn't support function pointers (yet). There is a work around for this problem, though. The solution didn't make it into v0.1.0 as I wasn't sure if anyone would use it. If you need it, though, feel free to ask. ;)
christianclavet wrote:Is there a MSVC++ port of this or is it Linux only at the moment?
No, Sirrf is absolutely not Linux only. FuzzYspo0N actually already compiled it with MSVC. So, if you need pre-configured MSVC project files, you could ask him.

Alternatively you could use CMake to generate the appropriate MSVC project files:

Code: Select all

cmake -G"Visual Studio 9 2008" -D CMAKE_BUILD_TYPE=Debug ../../src
or
cmake -G"Visual Studio 9 2008" -D CMAKE_BUILD_TYPE=Release ../../src
More information about project file generators can be found in the CMake documentation.
christianclavet wrote:Also another question, is there anything needed in the download or we must download other component so the compilation work.
You'll need to download Irrlicht SVN, AngelScript 2.16.2 and SFML-1.5. Refer to this page for more information regarding dependencies. Again, if you need help, feel free to ask.
christianclavet wrote:The more I look on this, the more i'm interested to use it. Good job!
I'm glad to hear that. :)
Arcoroc
Posts: 51
Joined: Wed Oct 01, 2008 11:40 pm
Location: Canada

Post by Arcoroc »

I have taken a look, very nice work indeed.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

Arcoroc wrote:I have taken a look, very nice work indeed.
Thank you for the nice words; I'm glad to hear that. :)


Also, a general notice for everyone. I'm currently planning what I'm going to do add to Sirrf 0.1.1. With Sirrf 0.1.0 it was quite easy as I knew exactly what I needed. Now it's a bit harder, though. So I'm wondering what you, the community, want to see. If you have an idea for Sirrf, then please go to Sirrf's IdeaTorrent and submit your idea. Please remember that bugs should be reported here.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Thanks for the information.

I would not use your audio library. Is there a compilation flag that I could set to disable that feature? (As you could disable the video drivers or/and file formats in IRRlicht)

I think I would use IRRKLang since the project I'm on is not commercial and (even so the license cost is not that bad). I need 2D and 3D sound. I would surely ask Niko if there would be a possibility of audio occlusion (walls) that would dampen the sound. That is one problem I had in my first demo with the MetroStation and buses. When the player got underground we could still hear the bus engine.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:I would not use your audio library. Is there a compilation flag that I could set to disable that feature? (As you could disable the video drivers or/and file formats in IRRlicht)
Sirrf was created as an application, not as a library. That means that if you want to create a new project based on Sirrf, you'll have to copy Sirrf's sources. In that light a compilation flag would seem strange as that would result in unused source and header files for the new project. And I think that we all strive to clean source codes.

That doesn't mean that removal is hard, though. You'll just need to remove the /src/sound and /src/components/sound directories. And you'll need to delete all references to the sound classes (SoundManager, SoundListenerComponent and SoundSourceComponent) in /src/core/GameManager.* and /src/components/components.*. It shouldn't take much of your time.
christianclavet wrote:I think I would use IRRKLang since the project I'm on is not commercial and (even so the license cost is not that bad). I need 2D and 3D sound.
SFML-Audio does provide 3d sound, and so does Sirrf.

Code: Select all

// Sound source
Entity *source = GameManager::Instance()->getEntityManager()->createEntity("source");
source->setPosition(vector3df(0,10,0));

SoundSourceComponent *sourceComp = new SoundSourceComponent(source);
sourceComp->loadSound("../share/IrrlichtTheme.ogg");
sourceComp->play();

// Player entity
Entity *player = GameManager::Instance()->getEntityManager()->createEntity("player");

CameraComponent *playerCam = new CameraComponent(player, vector3df(0,5,0));
playerCam->setFPSMode();
playerCam->setCanAffectParent(true);

SoundListenerComponent *playerListener = new SoundListenerComponent(player);
playerListener->setIsMainListener();   // Use this function when you've multiple sound listeners.
That should do it. And 2d sound can be accomplished by adding SoundListenerComponent and SourceSourceComponent to the same entity.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Superb! Thanks.

I really think I'll try to incorportate part of SirrF inside my project. I really like what you've done with the entities and components, also the way you seem to use the events is really nice.

The only thing I'll change is this:
- audio will be IRRKlang.
- Scripting will be Squirrel. (could perhaps keep AngelScript, I'll discuss it with the team)
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:Superb! Thanks.

I really think I'll try to incorportate part of SirrF inside my project. I really like what you've done with the entities and components, also the way you seem to use the events is really nice.

The only thing I'll change is this:
- audio will be IRRKlang.
- Scripting will be Squirrel. (could perhaps keep AngelScript, I'll discuss it with the team)
That's great to hear. If you're indeed going to use Sirrf and you need more help, feel free to ask. ;)

Also, some help in advance. If you want to remove AngelScript, you'll need to remove the /src/scripting/ directory and all bind<class name> functions.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

ZCCdark203 wrote:Sirrf was created as an application, not as a library. That means that if you want to create a new project based on Sirrf, you'll have to copy Sirrf's sources. In that light a compilation flag would seem strange as that would result in unused source and header files for the new project. And I think that we all strive to clean source codes.
I want to suggest two things that I think would only benefit the project:
1. I believe making your Framework a static library would be easier for the user to use (or DLL whatever you like, but a library as the code shouldn't be touched).
2. Making using #ifndefs an easy way to not compile parts of the FW (framework). Because FW are basically APIs that does all the common things (setting up a system etc.) automatically but uses different tools (sometimes other libraries, sometimes as part of the FW own code) to achieve that it should let the user replace the tools in an easy manner.
Take Irrlicht for example, If you don't wanna use its GUI system why compiling it and the other GUI system you wanna use (which you coded by yourself or used another library, doesn't matter)? You just go to the compile configuration header and un\comment the right define.

This makes things much more easier for the user and I think would make your project much more better.

Besides that, Great Work! :D
I'm really looking forward to seeing what you're gonna add next :!:
Maybe AI? Physics? Graphic Effects?
What are your future plans?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Michael.

I've just finished looking your source. Everything is well written, I really think I will try to merge it in my project.

That look really good!
Regards,
Christian Clavet
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

MasterGod wrote:
ZCCdark203 wrote:Sirrf was created as an application, not as a library. That means that if you want to create a new project based on Sirrf, you'll have to copy Sirrf's sources. In that light a compilation flag would seem strange as that would result in unused source and header files for the new project. And I think that we all strive to clean source codes.
I want to suggest two things that I think would only benefit the project:
1. I believe making your Framework a static library would be easier for the user to use (or DLL whatever you like, but a library as the code shouldn't be touched).
2. Making using #ifndefs an easy way to not compile parts of the FW (framework). Because FW are basically APIs that does all the common things (setting up a system etc.) automatically but uses different tools (sometimes other libraries, sometimes as part of the FW own code) to achieve that it should let the user replace the tools in an easy manner.
Take Irrlicht for example, If you don't wanna use its GUI system why compiling it and the other GUI system you wanna use (which you coded by yourself or used another library, doesn't matter)? You just go to the compile configuration header and un\comment the right define.

This makes things much more easier for the user and I think would make your project much more better.
1. I'm not sure if Sirrf can be that easily converted into a library. Some things, i.e. scripting, are currently defined on compilation. These processes would somehow have to be converted into run-time processes. At least, if we would want to gain the advantage of libraries.

Furthermore I actually want to encourage people to "touch" the code. If the user has specific needs he can now directly modify the code to comply to these needs. Of course in both cases the code could be modified, but I think it's more attractive to do this when you've direct access to the code.

But maybe I can add it as an additional option.

2. Today's work was actually focused on increasing Sirrf's modularity. To be specific: I separated the AngelScript from the header and source files where Sirrf classes are declared and implemented. In the latest revision it should be a lot easier to remove scripting, if desired. Modularity was already high on my agenda, but it looks like the community considers it even more important than me. So, that is being fixed as we speak. And I'm sure defines will only help that cause even more.
MasterGod wrote:Besides that, Great Work! :D
I'm really looking forward to seeing what you're gonna add next :!:
Maybe AI? Physics? Graphic Effects?
What are your future plans?
Thanks for the kind words. :)

As for future plans. My main priority at the moment is to improve Sirrf based on the feedback from this thread.

As for a more long-term vision. Those three things that you mentioned all captured my attention. Unfortunately, I'm not the most experienced programmer in those three fields. So I'm first going to analyse those fields before I make a definitive decision. I do have a slight preference for "graphic effects", though. Mostly because it can be done with Irrlicht without the need of dependencies.

Also, I'm toying with the idea of an integrated editor.
Post Reply