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.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 )
Sirrf version 0.2.1 released! (30/08/2009)
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
yay. Now I can evaluate it without the commitment of a download.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.
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
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:christianclavet wrote:Wow. This is really nice. Is it easy to create custom components?
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
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.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
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!
The more I look on this, the more i'm interested to use it. Good job!
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
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.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).
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 );
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.christianclavet wrote:Is there a MSVC++ port of this or is it Linux only at the moment?
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
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:Also another question, is there anything needed in the download or we must download other component so the compilation work.
I'm glad to hear that.christianclavet wrote:The more I look on this, the more i'm interested to use it. Good job!
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
Thank you for the nice words; I'm glad to hear that.Arcoroc wrote:I have taken a look, very nice work indeed.
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.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
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.
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.
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
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.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)
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.
SFML-Audio does provide 3d sound, and so does Sirrf.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.
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.
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
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)
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)
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
That's great to hear. If you're indeed going to use Sirrf and you need more help, feel free to ask.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)
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.
I want to suggest two things that I think would only benefit the project: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.
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!
I'm really looking forward to seeing what you're gonna add next
Maybe AI? Physics? Graphic Effects?
What are your future plans?
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
-
- Posts: 47
- Joined: Fri May 15, 2009 3:26 pm
- Contact:
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.MasterGod wrote:I want to suggest two things that I think would only benefit the project: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.
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.
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.
Thanks for the kind words.MasterGod wrote:Besides that, Great Work!
I'm really looking forward to seeing what you're gonna add next
Maybe AI? Physics? Graphic Effects?
What are your future plans?
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.