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 »

christianclavet wrote: Right now I can't use the console when I build the application or I get this linker error:
1>LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Recently code was added to the SVN version of Sirrf to regulate this behaviour. By default Sirrf MSVC projects only display a console when build as a debug build. At least, that is the expected behaviour. See if building a debug build helps.
christianclavet wrote: For the dependancy, I found out about it. FuzzYspo0N use a method I'm not used to:
He put the information directly in the project settings for having the libs in the linker editor option.

I'm doing it like this:
In the code I put this (dependancies.h)

Code: Select all

// Irrlicht
#include <irrlicht.h>
#pragma comment(lib, "Irrlicht.lib") 
With this I don't have to check the project setting to specify library dependancy. (Would be useful to at least do it this way for the Angelscrip library, since it could be removed from the compilation.
I've done it this way in dependancies.h

Code: Select all

// Angelscript
#ifdef __COMPILE_WITH_ANGELSCRIPT__
#include <angelscript.h>
#pragma comment(lib, "angelscript.lib")
#endif
#pragma comment(lib, "foo.lib") is a Microsoft extension and thus isn't a cross-platform solution.
christianclavet wrote: For the error and warnings:
sirrf project - 15 error(s), 12 warning(s)

Here are some basic descriptions:
Warning: asGameState.cpp -> Line 82 convert from irr:f32 to asDword possible loss of data
Warnings in IRRlicht includes?! (vector3d.h, with asVector3d.cpp)
Warnings in IRRlicht includes?! (line2d.h with asLine2d.cpp)
Warnings in IRRlicht includes?! (dimension2d.h with asAabbox3d.cpp)
Detail is: conversion from 'irr:: F32' to 'const irr:: s32' possible loss of data.

Error c2668 'fabs' in IRRlicht includes?! (aabbox3d.h with (VS9 includes)math.h and asAabbox3d.cpp):
Detail: ambiguous call to overloaded function
I've seen these errors and warnings before. FuzzYspo0N actually reported them when building his MSVC build. I thought we had fixed them. Are you using the latest SVN revision (81)?
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi.

I have effectively have gotten revision 81 or SirrF

I got even more errors and warning in DEBUG mode: (I have the french version of MSVC). Here tried to compile in debug mode without the AUDIO and SCRIPTING. It compile and build in release. But the application look like it's stalled (no display at all, only a 1024x768 window)
1>LINK : warning LNK4098: conflit entre la bibliothèque par défaut 'LIBCMT' et les autres bibliothèques ; utilisez /NODEFAULTLIB:library
1>GameState.obj : error LNK2019: symbole externe non résolu __CrtDbgReportW référencé dans la fonction "public: void __thiscall std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> >::`vbase destructor'(void)" (??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ)
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>libcpmtd.lib(cout.obj) : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>EntityComponent.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>EntityManager.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>EventManager.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>GameManager.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>AssetManager.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>DataStack.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>DataStore.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>Entity.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>components.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>ImageComponent.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>SceneComponent.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>AssetGroup.obj : error LNK2001: symbole externe non résolu __CrtDbgReportW
1>libcpmtd.lib(xdebug.obj) : error LNK2019: symbole externe non résolu __malloc_dbg référencé dans la fonction "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: symbole externe non résolu __malloc_dbg
1>libcpmtd.lib(xdebug.obj) : error LNK2019: symbole externe non résolu __free_dbg référencé dans la fonction "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: symbole externe non résolu __free_dbg
1>libcpmtd.lib(_tolower.obj) : error LNK2019: symbole externe non résolu __calloc_dbg référencé dans la fonction __Getctype
1>C:\Users\Public\IRRlicht\SirrF\trunk\build\msvc2008\Debug\sirrf project.exe : fatal error LNK1120: 4 externes non résolus
1>Le journal de génération a été enregistré à l'emplacement "file://c:\Users\Public\IRRlicht\SirrF\trunk\build\msvc2008\Debug\BuildLog.htm"
1>sirrf project - 22 erreur(s), 1 avertissement(s)
EDIT: Thanks for the info about the thing you've do for this (console)
Found out the line of code that caused the error:

Code: Select all

#if (defined(WIN32) && (!defined(_DEBUG)))
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
Commented it out and I have to console now.
When I lauch the application now, I have the console, an empty 1024x768 windows (not even a background, I see the desktop inside it)

The console give me:
Irrlicht Engine version 1.6-SVN
Microsoft Windows Vista Personal Service Pack 1 (Build 6001)
Using renderer: OpenGL 3.0.0
GeForce 9800 GX2/PCI/SSE2: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
But nothing else.
I've checked more since I have the console now, and there something wrong with the game states. It look like it's empty, and not doing this in GameManager.cpp
Line 105 -> if(!mGameStates.empty()) so it's skipping the screen refresh.
Last edited by christianclavet on Mon Jul 20, 2009 9:18 pm, edited 2 times in total.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:Hi.But the application look like it's stalled (no display at all, only a 1024x768 window)
That is expected behaviour. The framework is instructed not to draw when no state has been loaded. So it's working fine. :)

As for the rest, you'll have to wait for FuzzYSpo0N. I've already notified him of your problems. He's quite busy at the moment, but I'm sure he'll help you when he has time.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Ok. Cool. Found out your tutorial page. The link seem to have changed
Here are the links:
http://sourceforge.net/apps/trac/sirrf/ ... als/v0.1.x

So the framework is working (without scripting at the moment) but it's working. I just have to define my "gamestate" for my project in the "game" folder and it should display something.

I'll continue on this. Thanks. Tell me if you have updates on the scripting engine...
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

I know whats caused it christian, i missed the SUBSYSTEM setting in the project in release mode. Thanks for finding that!

Also, i noticed i left some paths in there too, lol. I've committed a new one that should work better. Sorry for the silly mistakes :)

Also, there was a problem in the aabbox3d scripting stuff, iv removed the aabbox3di for now (as thats the cause of the problem) but im pretty sure i can fix that later.

everything should work now
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Thanks FuzzYspo0N

There are no errors in the compilation now. Only the compiler warnings.
(Added IRRlicht paths, AngelScript paths (build)

Got some linker errors that fail the build as:
1>ScriptManager.obj : error LNK2001: unresolved external symbol _asCreateScriptEngine
1>scriptstdstring.obj : error LNK2001:unresolved external symbol _asGetLibraryOptions
1>scriptstdstring.obj : error LNK2001: unresolved external symbol _asGetActiveContext
1>../../bin/sirrf project.exe : fatal error LNK1120: 3 unresolved external symbols
Very near to have the scripting engine working inside the framework.

I've also tried to activate the audio part SFML. Downloaded the developper portion of SMFL 1.5 and set the path into the include and LIB paths. Result is this: (Should we set the LIB statement as we have done with the Scripting engine?)
1>SoundListenerComponent.obj : error LNK2001: symbole externe non résolu "public: static void __cdecl sf::Listener::SetTarget(float,float,float)" (?SetTarget@Listener@sf@@SAXMMM@Z)
1>SoundListenerComponent.obj : error LNK2001: symbole externe non résolu "public: static void __cdecl sf::Listener::SetPosition(float,float,float)" (?SetPosition@Listener@sf@@SAXMMM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::SoundStream::SetLoop(bool)" (?SetLoop@SoundStream@sf@@QAEX_N@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: enum sf::Sound::Status __thiscall sf::SoundStream::GetStatus(void)const " (?GetStatus@SoundStream@sf@@QBE?AW4Status@Sound@2@XZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::SoundStream::Stop(void)" (?Stop@SoundStream@sf@@QAEXXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::SoundStream::Play(void)" (?Play@SoundStream@sf@@QAEXXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: float __thiscall sf::Sound::GetPlayingOffset(void)const " (?GetPlayingOffset@Sound@sf@@QBEMXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: enum sf::Sound::Status __thiscall sf::Sound::GetStatus(void)const " (?GetStatus@Sound@sf@@QBE?AW4Status@12@XZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: class sf::SoundBuffer const * __thiscall sf::Sound::GetBuffer(void)const " (?GetBuffer@Sound@sf@@QBEPBVSoundBuffer@2@XZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetPlayingOffset(float)" (?SetPlayingOffset@Sound@sf@@QAEXM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetAttenuation(float)" (?SetAttenuation@Sound@sf@@QAEXM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetMinDistance(float)" (?SetMinDistance@Sound@sf@@QAEXM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetPosition(float,float,float)" (?SetPosition@Sound@sf@@QAEXMMM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetVolume(float)" (?SetVolume@Sound@sf@@QAEXM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetPitch(float)" (?SetPitch@Sound@sf@@QAEXM@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetLoop(bool)" (?SetLoop@Sound@sf@@QAEX_N@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::SetBuffer(class sf::SoundBuffer const &)" (?SetBuffer@Sound@sf@@QAEXABVSoundBuffer@2@@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::Stop(void)" (?Stop@Sound@sf@@QAEXXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::Pause(void)" (?Pause@Sound@sf@@QAEXXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: void __thiscall sf::Sound::Play(void)" (?Play@Sound@sf@@QAEXXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: __thiscall sf::Sound::Sound(void)" (??0Sound@sf@@QAE@XZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: float __thiscall sf::SoundBuffer::GetDuration(void)const " (?GetDuration@SoundBuffer@sf@@QBEMXZ)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: bool __thiscall sf::Music::OpenFromMemory(char const *,unsigned int)" (?OpenFromMemory@Music@sf@@QAE_NPBDI@Z)
1>SoundSourceComponent.obj : error LNK2001: symbole externe non résolu "public: __thiscall sf::Music::Music(unsigned int)" (??0Music@sf@@QAE@I@Z)
1>ScriptManager.obj : error LNK2001: symbole externe non résolu _asCreateScriptEngine
1>scriptstdstring.obj : error LNK2001: symbole externe non résolu _asGetLibraryOptions
1>scriptstdstring.obj : error LNK2001: symbole externe non résolu _asGetActiveContext
1>SoundManager.obj : error LNK2001: symbole externe non résolu "public: static float __cdecl sf::Listener::GetGlobalVolume(void)" (?GetGlobalVolume@Listener@sf@@SAMXZ)
1>SoundManager.obj : error LNK2001: symbole externe non résolu "public: static void __cdecl sf::Listener::SetGlobalVolume(float)" (?SetGlobalVolume@Listener@sf@@SAXM@Z)
1>SoundManager.obj : error LNK2001: symbole externe non résolu "public: bool __thiscall sf::SoundBuffer::LoadFromMemory(char const *,unsigned int)" (?LoadFromMemory@SoundBuffer@sf@@QAE_NPBDI@Z)
1>SoundManager.obj : error LNK2001: symbole externe non résolu "public: __thiscall sf::SoundBuffer::SoundBuffer(void)" (??0SoundBuffer@sf@@QAE@XZ)
1>../../bin/sirrf project.exe : fatal error LNK1120: 31 externes non résolus

1>sirrf project - 32 erreur(s), 15 warning(s)
========== Régénération globale : 0 a réussi, 1 a échoué, 0 a été ignoré ==========
But right now, anyone should be able to download SirrF, set the path to it's IRRlicht distribution and compile it (without scripting and audio). It worked fine for me.

Would be really nice to have a "test" gamestate, telling the user that the framework is working (displayed onscren) instead of having nothing. Also it could serve as an example like the "Hello World" Irrlicht example.

EDIT:
By adding the .LIB in the project setting in:
LINKER EDITOR - Supplementary dependancies
Was written:
irrlicht.lib
Changed for
irrlicht.lib angelscript.lib sfml-audio.lib sfml-system.lib

Tried to compile, compilation when ok (still the warning messages), the linking process when without any error and the build was a success!!

Is there a way to have a conditionnal activation of this if we activate audio or/and scripting?

I'm really happy that it worked. Now, to check more you example and learn to have something visible on the screen... :)
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

Yea sure christian, thanks for testing these things. i compiled with scriping without audio, with audio without scripting, with both, without both.

adding the libraries is a "common" thing that happens with any sdk in a vs project, thats why i assumed it would be fine. Ill change the project to be smart enough to read the defines, and to add the libs when needed.

Ill post back when i commit :

Edit.

I changed dependancies.h to use the pragma only on windows. This is only for now, as i dont think its hard to add the libs to the project yourself.

a) you have to add the paths to the libs ANYWAY,
b) if it throws the error that "cannot find something.lib" you immediately know that your paths are missing.

The pragmas i added now are temporary (imo) and are added as a convenience for new users. ZCCdark203 will be offline for a while, so i can really ask what he thinks. But in the meantime, remember where to put library paths and add library dependancies in msvc ;)
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Thanks FuzzYspo0N. I was using only IRRlicht before, and I think I was spoiled! :D Never used that setting in any project because I used those Pragma from day one.

I'm thinking that we should perhaps put the Includes and the compiled libs inside the vendor folder and link them permanently in the project. The user (noob, or not) could then decide to compile with or without the other dependancies only by commenting out the config.h file. (As easy it is in IRRlicht)

Anyway, it's just a suggestion. I've decided to do it on my setup here. This will increase the project size, but will make it ultra easy to compile (I'll even add IRRlicht in it)
EDIT:
Done it. Added all that was needed to compile SirrF. To compile it, now the only thing that is needed is to have Visual Studio 2008 (Express). All the dependancies are in the vendor folder and the path in the project are relative to it. I've also changed that in release mode, that the MSVC multithread be linked directly in the executable so it should run without having to install the MSVC "runtime library"

It contain theses:

AngelScript 2.16.3
IRRlicht 1.6 SVN rev 2485
SFML 1.5
SigSlots (was already included)

EDIT2:

I started to learn how the framework is working. Very nice Micheal!
I've implemented the tutorial from your site and created the gamestate
MYSTATE as a "hello world" example. (Fixed some typo at the same time :) )

Image

It look like nothing now, but the Camera and the mesh(Sydney) are defined as Entities, we can attach defined "components" to entities very, very easy. Like for example, I could create a custom component named "health" or "inventory" and attach it to theses entities. So it really speed up a game development process.

The archive is 14Mb and I've put it on my server.
http://www.clavet.org/forum/download/file.php?id=91

It contain a compiled executable so you can check it out without compiling. (It's more interesting to check the source :lol: )
It use OPENAL for music (playing the IRRlicht music as a test)
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

Finally got an internet connection, again. :)

Great to hear that you finally got everything up and running, Christian. It's also nice to hear that you like how the framework deals with entities and components. It will become better with the next release, though, as we're adding support for reading entity data from XML-files.

As for your suggestion regarding the permanent inclusion of header files and precompiled binaries of used SDKs. We decided to dismiss the suggestion. Adding all necessary SDKs would significantly increase the size of the project. Not only would that increase the time to download the framework, but we would also have to maintain (for all supported platforms) the separate branches in the vendor directory. And there is a chance that not everyone would want to use the included SDKs. Nothing is stopping you for using the suggested project set-up yourself, though. ;)

Anyway, I'm looking forward to see what you'll do with the framework.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Micheal.

Do you know if the Framework could handle more than one "pDevice"?

In your code in GameManager.cpp line (69-70)

Code: Select all

// Initialise the Irrlicht engine.
    pDevice = createDevice(EDT_OPENGL, dimension2d<u32>(1024, 768), 32, false, false, false, pEventManager);
I would like to define this as a "NULL" device.

Then in my first gamestate, I would able to define the screen opening (as reading from a XML config file or opening a window asking for the screen size (Like the Quake III Explorer or the Demo, but with SirrF). I would prefer having the "final" device as the pDevice and use the other as "temporary/initilisation". I would need to access both of them, especially when I close the application (Would not like to have a NULL device opened since the user would not know it's still open)

I have also requests as it would be great to have a demo of the scripting (would like to see a source or an example gamestate that show how a script can do something. I would like to use it for the AI engine much later and would like to see a simple script), I don't know how work the databank, when a gamestate is switched to another (edit - play - settings for examples) how are maintained the entities/nodes? Can we access all that was created in any gamestate?

EDIT: I've updated to the last SVN ( SVN88 ). For a strange reason, the character move forward (or the camera). I'm using the demo code that you provided on your tutorial site. (Worked before updated, the character mesh was not moving forward)
EDIT2: Confirmed again for me. Checked and the "Entity" that I created and named "sydney" (As your example) is moving forward in the X vector. And I've not set anything to do that. In the refresh loop, I sent the entity position to the console to be sure.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:Do you know if the Framework could handle more than one "pDevice"?
I didn't design the framework with multiple devices in mind. It's probably possible, but you'll probably need to change some things.
christianclavet wrote:I have also requests as it would be great to have a demo of the scripting (would like to see a source or an example gamestate that show how a script can do something. I would like to use it for the AI engine much later and would like to see a simple script), I don't know how work the databank, when a gamestate is switched to another (edit - play - settings for examples) how are maintained the entities/nodes? Can we access all that was created in any gamestate?
I don't have any further plans for a tutorial about scripting yet, but I'll think about it. That being said, I'm considering to launch some new tutorials when Sirrf 0.20 is released. ;)

The DataStore works pretty simple:

Code: Select all

DataStack *stack = GameManager::Instance()->createDataStack("stack");
stack->setVar<s32>("foo", 10);
stack->setVar<bool>("bar", true);

stack->saveXML("stack.xml"); // Or: stack->saveBencode("stack.ben");

stack->removeVars();

stack->loadXML("stack.xml"); // Or: stack->loadBencode("stack.ben");

cout << stack->getVar<s32>("foo") << "\n";
cout << stack->getVar<s32>("bar") << "\n"; // This is also possible.
...
It's possible to access all entities created in any game state. If an entity has been created through the global EntityManager you can access that entity from anywhere within the framework. Alternatively you could decide not to add the entity to the global EntityManager, but only to the base entity of a game state. In that case you could access the entities of a state through that base entity.
christianclavet wrote: EDIT: I've updated to the last SVN ( SVN88 ). For a strange reason, the character move forward (or the camera). I'm using the demo code that you provided on your tutorial site. (Worked before updated, the character mesh was not moving forward)
EDIT2: Confirmed again for me. Checked and the "Entity" that I created and named "sydney" (As your example) is moving forward in the X vector. And I've not set anything to do that. In the refresh loop, I sent the entity position to the console to be sure.
It looks like I attached the onPositionChange method of the Entity class to the onUpdate event slot. That obviously didn't work. It has been fixed in revision 89.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Thanks Micheal!

I wanted to use the datastore/datastack for a lot of frequent tasks but did not have a clear idea how to use it. Thanks for giving me an example!

For the device thing, I can do something on my own application here, but it would not be as clean.

For the tutorial about scripting, I think you had something on your wiki, I could try to create another gamestate to try it. The objective would be to redo your demo gamestate, but from a script file. So the new gamestate would load the script from a file. This would be really interesting for everybody if examples were done as gamestates, that could be downloaded separately (Since it's simple, putting info on the wiki will be sufficient)

Humm , Im a little confused about the global Entity manager and the gamestate entity manager... What I have in mind is to create entities in the editor gamestate then switch to a playtest gamestate, to try the game. (Some game engine editors provide this, other force you to save and reload in the game directly.)

Now I will have to look at how you process the mouse, keyboard and GUI events inside a gamestate. I've been putting back a part of my editor GUI yesterday (My code is really horrible BTW :D , but I put the GUI part into a class, only need to clean up the variables names so it look cleaner, your example helped in designing the class)

Edit: Hi, I was able to retrieve the status of a key easily, but I have a hard time figuring out how to retrieve a GUI event. I saw that a group "eventmanager" and a slot named "onguievent" is defined, but how can I can check for thoses events? (menu events, buttons, etc).

I don't understant all of it, but it look really neat (I think we can retrieve event by "instances" of gamestates.)

For the problem with the entity moving, you fixed it with the new SVN.
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

christianclavet wrote:For the tutorial about scripting, I think you had something on your wiki, I could try to create another gamestate to try it. The objective would be to redo your demo gamestate, but from a script file. So the new gamestate would load the script from a file. This would be really interesting for everybody if examples were done as gamestates, that could be downloaded separately (Since it's simple, putting info on the wiki will be sufficient).
I think I'll do that. Thank you for the suggestion.
christianclavet wrote: Humm , Im a little confused about the global Entity manager and the gamestate entity manager... What I have in mind is to create entities in the editor gamestate then switch to a playtest gamestate, to try the game. (Some game engine editors provide this, other force you to save and reload in the game directly.)
That is perfectly possible within Sirrf. Remember that the base entities of game states have a name too: "GameState#<id>". The entities of the appropriate game state can be accessed through that base entity.
christianclavet wrote: Now I will have to look at how you process the mouse, keyboard and GUI events inside a gamestate. I've been putting back a part of my editor GUI yesterday (My code is really horrible BTW :D , but I put the GUI part into a class, only need to clean up the variables names so it look cleaner, your example helped in designing the class)

Edit: Hi, I was able to retrieve the status of a key easily, but I have a hard time figuring out how to retrieve a GUI event. I saw that a group "eventmanager" and a slot named "onguievent" is defined, but how can I can check for thoses events? (menu events, buttons, etc).

I don't understant all of it, but it look really neat (I think we can retrieve event by "instances" of gamestates.)
The event slot "onGUIEvent" was actually not defined properly. I fixed that in the latest SVN. As for dealing with GUI events, you could do this:

Code: Select all

MyState::init()
{
   ...

   GameManager::Instance()->getEventManager()->connectEventSignal("EventManager", "onGUIEvent", this, &MyState::onGUIEvent);

   ...
}

...

MyState::onGUIEvent(void *p)
{
   SEvent event = reinterpret_cast<SEvent*>(p)[0];

   // Do your event handling here.
}
ZCCdark203
Posts: 47
Joined: Fri May 15, 2009 3:26 pm
Contact:

Post by ZCCdark203 »

Sirrf version 0.2.0 has been released!

---
Sirrf - Simple Irrlicht Framework - version 0.2.0 released!

The latest release of Sirrf, the Simple Irrlicht Framework, version 0.2.0, is now available for download. In the two months since the previous release a lot of changes have taken place. These changes range from small API changes to major feature additions. The most noticeable changes include:
  • Asset Management
    The biggest new feature is asset management. Assets are managed by the AssetManager class. This manager manages so-called asset groups, which represent a collection of assets (meshes, textures, etc). These assets are retrieved from a directory with the appropriate directory structure. In turn the found assets are processed by asset processors. And at the end of the road, the user can use these assets without having to deal with paths. Furthermore asset management makes it possible to reload all assets in realtime, with direct results on the current scene. Reloading assets is as simple as one function call.

    XML-based Entity files
    It is now possible to load data concerning entities and their components from XML-files. This means that you can now define a scene through XML-files.

    Local Event System
    As of version 0.2.0 a HasEvents class, which provides the base for a local event system, is available. The availability of local event systems makes the entire framework more performant. Currently the HasEvents class is used by entities and asset groups.

    Microsoft Visual C++ 2008 support
    Version 0.2.0 is the first release that officialy supports Microsoft Visual C++ 2008. This should make it easier to set up Sirrf-based projects accros multiple platforms.
See the change log for more information regarding the changes in Sirrf version 0.2.0.

This is not the end of Sirrf's development, though. Sirrf's development will continue and Sirrf will undoubtely become even better in the future. And you, as a Sirrf user, as a member of the Irrlicht community, can help us improve the framework. This can be done by contributing code to the project, but also by testing the framework. Either way, we hope that Sirrf will be of use.


Useful links
SourceForge.net page - http://sourceforge.net/projects/sirrf
Downloads - http://sourceforge.net/projects/sirrf/files/ | http://www.ohloh.net/p/sirrf/download?package=Sirrf
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Post by d3jake »

I've been looking into this framework, and have even compiled it with AngelScript and it looks very promising. Fuzzyspoon has said that in upcoming versions many many more features will be added and I look forward to them.

He was saying that phyiscs and networking are good suggestions but many other things must be in place first. When the framework gains its additional features I will certainly look at this framework again. It seems that this could save my project loads of time. Also, with the inclusion of AngelScript not everyone will need to know C++ and have to set up a compiler, etc. to use it. I was looking for scripting for multiplayer gametypes and level scripting (i.e. switch X turns off forcefield Y).

Also, I suggested that you allow multiple audio libraries\engines to be used with the framework, this way a user has an option. Again, he said this would be tons of work, but I think many people would be interested in having such a feature,
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
Post Reply