Port wiki's Game State Manager to usable with Eihort

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
huydotnet
Kobold
Posts: 34
Joined: Fri Oct 05, 2007 5:22 am
Location: Danang, Vietnam

Port wiki's Game State Manager to usable with Eihort

Post by huydotnet »

Hi :lol:
Few day ago, i'm trying to compile wiki's game state manager demo but i can't. It don't work with my SDK (1.4.8 ). Then, i port it to usable with my 1.4.8, i have some problem with OIS, but now, it's ok! (i use InputManager class from here: http://www.ogre3d.org/phpBB2/viewtopic. ... highlight=)
You can download it here:
http://ogre-game-state-manager.googleco ... pleted.rar
and homepage :)
http://code.google.com/p/ogre-game-state-manager/
User avatar
almondega
Halfling
Posts: 67
Joined: Mon Jun 23, 2008 7:34 pm
Location: Brazil

Post by almondega »

very good !
i tested the sample
and took a look at the code
its perfect

tomorrow i'll test the game state change
if works, i'll use in my little project x)

(i downloaded a lot of game state frameworks.. but are all problematics..)

tks tks :P
User avatar
westpointer
Halfling
Posts: 62
Joined: Fri May 23, 2008 9:29 am

Post by westpointer »

I downloaded your code and compiled successfully under SDK 1.49.
But when I run the exe it is just white blank. Is it alright or do I lack
any resources you use?
User avatar
huydotnet
Kobold
Posts: 34
Joined: Fri Oct 05, 2007 5:22 am
Location: Danang, Vietnam

Post by huydotnet »

It is 2 state, one is blank white, you press enter then it show 2nd state which have 1 ogre head mesh.
:)
User avatar
westpointer
Halfling
Posts: 62
Joined: Fri May 23, 2008 9:29 am

Post by westpointer »

I press enter but it doesn't show 2nd state which have 1 ogre head mesh.
It seem no line of code in this programme deal with the Enter key :(
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Post by DanielSefton »

westpointer wrote:I press enter but it doesn't show 2nd state which have 1 ogre head mesh.
It seem no line of code in this programme deal with the Enter key :(
Well... You'll need to add it. :)

Find the keyPressed() function of the state you want the enter key to trigger, then add:

Code: Select all

if (e.key == OIS::KC_RETURN)
{
	// Change state here
}
User avatar
westpointer
Halfling
Posts: 62
Joined: Fri May 23, 2008 9:29 am

Post by westpointer »

I meet another problem. I made my class a signleton just like GameManager. But I failed:

Code: Select all

Assertion failed!

Program: ...
File: d:\program files\ogresdk\include\ogresingleton.h
Line: 66

Expression: !ms_Singleton
What I have done is in .h:

Code: Select all

class Simulator : public Ogre::Singleton<Simulator>
{
public:
	Simulator();
	~Simulator();

	static Simulator* getSingletonPtr(void);
	static Simulator& getSingleton(void);
.......
}
In cpp:

Code: Select all

......
template<> Simulator* Ogre::Singleton<Simulator>::ms_Singleton = 0;

Simulator* Simulator::getSingletonPtr(void)
{
   return ms_Singleton;
}

Simulator& Simulator::getSingleton(void)
{
   assert( ms_Singleton );  return ( *ms_Singleton ); 
}
......
In main.cpp:

Code: Select all

...
Simulator* simulatorApp  = new Simulator();
try
{
 simulatorApp->start();
}
catch (Ogre::Exception& e)
{
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
}
.....
Anyone knows what the problem of the "Assertion failed!" is?
User avatar
westpointer
Halfling
Posts: 62
Joined: Fri May 23, 2008 9:29 am

Post by westpointer »

The problem is solved. Sorry for my careless, I find that in my start()
function, there is a class whitch has a member variable of class
Simulator. So the constructor of Simulator is called twice. :)
User avatar
liamrudel
Gremlin
Posts: 150
Joined: Tue Oct 21, 2008 10:35 am
Location: Ireland
Contact:

Re: Port wiki's Game State Manager to usable with Eihort

Post by liamrudel »

Using this in latest release(1.6) and all seems to be working fine!
The secret of creativity..... is knowing how to hide your sources!
User avatar
liamrudel
Gremlin
Posts: 150
Joined: Tue Oct 21, 2008 10:35 am
Location: Ireland
Contact:

Can't find material script files!

Post by liamrudel »

Hi, I having a small problem with this where mt textures are not loading up as it can't seem to find the material script files. Now I know they exists and the paths are correct because I copied it over from another program which was working, is there something done in the loading that can cause the script files to be over looked, because I did notice the order in which things are done in the log file are a bit different from my standard apps.

Code: Select all

09:19:49: Mesh: Loading cube.mesh.
09:19:49: Can't assign material 1 - Default to SubEntity of ground because this Material does not exist. Have you forgotten to define it in a .material script?
Full Log:

Code: Select all

09:30:36: Creating resource group General
09:30:36: Creating resource group Internal
09:30:36: Creating resource group Autodetect
09:30:36: SceneManagerFactory for type 'DefaultSceneManager' registered.
09:30:36: Registering ResourceManager for type Material
09:30:36: Registering ResourceManager for type Mesh
09:30:36: Registering ResourceManager for type Skeleton
09:30:36: MovableObjectFactory for type 'ParticleSystem' registered.
09:30:36: OverlayElementFactory for type Panel registered.
09:30:36: OverlayElementFactory for type BorderPanel registered.
09:30:36: OverlayElementFactory for type TextArea registered.
09:30:36: Registering ResourceManager for type Font
09:30:36: ArchiveFactory for archive type FileSystem registered.
09:30:36: ArchiveFactory for archive type Zip registered.
09:30:36: FreeImage version: 3.10.0
09:30:36: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
09:30:36: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
09:30:36: DDS codec registering
09:30:36: Registering ResourceManager for type HighLevelGpuProgram
09:30:36: Registering ResourceManager for type Compositor
09:30:36: MovableObjectFactory for type 'Entity' registered.
09:30:36: MovableObjectFactory for type 'Light' registered.
09:30:36: MovableObjectFactory for type 'BillboardSet' registered.
09:30:36: MovableObjectFactory for type 'ManualObject' registered.
09:30:36: MovableObjectFactory for type 'BillboardChain' registered.
09:30:36: MovableObjectFactory for type 'RibbonTrail' registered.
09:30:36: Loading library .\RenderSystem_Direct3D9_d
09:30:36: Installing plugin: D3D9 RenderSystem
09:30:36: D3D9 : Direct3D9 Rendering Subsystem created.
09:30:36: D3D9: Driver Detection Starts
09:30:36: D3D9: Driver Detection Ends
09:30:36: Plugin successfully installed
09:30:36: Loading library .\RenderSystem_GL_d
09:30:36: Installing plugin: GL RenderSystem
09:30:36: OpenGL Rendering Subsystem created.
09:30:37: Plugin successfully installed
09:30:37: Loading library .\Plugin_ParticleFX_d
09:30:37: Installing plugin: ParticleFX
09:30:37: Particle Emitter Type 'Point' registered
09:30:37: Particle Emitter Type 'Box' registered
09:30:37: Particle Emitter Type 'Ellipsoid' registered
09:30:37: Particle Emitter Type 'Cylinder' registered
09:30:37: Particle Emitter Type 'Ring' registered
09:30:37: Particle Emitter Type 'HollowEllipsoid' registered
09:30:37: Particle Affector Type 'LinearForce' registered
09:30:37: Particle Affector Type 'ColourFader' registered
09:30:37: Particle Affector Type 'ColourFader2' registered
09:30:37: Particle Affector Type 'ColourImage' registered
09:30:37: Particle Affector Type 'ColourInterpolator' registered
09:30:37: Particle Affector Type 'Scaler' registered
09:30:37: Particle Affector Type 'Rotator' registered
09:30:37: Particle Affector Type 'DirectionRandomiser' registered
09:30:37: Particle Affector Type 'DeflectorPlane' registered
09:30:37: Plugin successfully installed
09:30:37: Loading library .\Plugin_BSPSceneManager_d
09:30:37: Installing plugin: BSP Scene Manager
09:30:37: Plugin successfully installed
09:30:37: Loading library .\Plugin_CgProgramManager_d
09:30:37: Installing plugin: Cg Program Manager
09:30:37: Plugin successfully installed
09:30:37: Loading library .\Plugin_OctreeSceneManager_d
09:30:37: Installing plugin: Octree & Terrain Scene Manager
09:30:37: Plugin successfully installed
09:30:37: *-*-* OGRE Initialising
09:30:37: *-*-* Version 1.6.0RC1 (Shoggoth)
09:30:37: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
09:30:37: D3D9 : RenderSystem Option: Anti aliasing = None
09:30:37: D3D9 : RenderSystem Option: Floating-point mode = Fastest
09:30:37: D3D9 : RenderSystem Option: Full Screen = No
09:30:37: D3D9 : RenderSystem Option: Rendering Device = ATI Radeon HD 4800 Series
09:30:37: D3D9 : RenderSystem Option: VSync = No
09:30:37: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
09:30:37: D3D9 : RenderSystem Option: sRGB Gamma Conversion = No
09:30:38: CPU Identifier & Features
09:30:38: -------------------------
09:30:38:  *   CPU ID: GenuineIntel: Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz
09:30:38:  *      SSE: yes
09:30:38:  *     SSE2: yes
09:30:38:  *     SSE3: yes
09:30:38:  *      MMX: yes
09:30:38:  *   MMXEXT: yes
09:30:38:  *    3DNOW: no
09:30:38:  * 3DNOWEXT: no
09:30:38:  *     CMOV: yes
09:30:38:  *      TSC: yes
09:30:38:  *      FPU: yes
09:30:38:  *      PRO: yes
09:30:38:  *       HT: no
09:30:38: -------------------------
09:30:38: D3D9 : Subsystem Initialising
09:30:38: D3D9RenderSystem::_createRenderWindow "Vortex", 800x600 windowed  miscParams: FSAA=0 FSAAQuality=0 colourDepth=32 gamma=false useNVPerfHUD=false vsync=false 
09:30:38: D3D9 : Created D3D9 Rendering Window 'Vortex' : 800x600, 32bpp
09:30:38: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
09:30:38: Registering ResourceManager for type Texture
09:30:38: Registering ResourceManager for type GpuProgram
09:30:38: D3D9: Vertex texture format supported - PF_L8
09:30:38: D3D9: Vertex texture format supported - PF_L16
09:30:38: D3D9: Vertex texture format supported - PF_A8
09:30:38: D3D9: Vertex texture format supported - PF_A4L4
09:30:38: D3D9: Vertex texture format supported - PF_BYTE_LA
09:30:38: D3D9: Vertex texture format supported - PF_R5G6B5
09:30:38: D3D9: Vertex texture format supported - PF_B5G6R5
09:30:38: D3D9: Vertex texture format supported - PF_A4R4G4B4
09:30:38: D3D9: Vertex texture format supported - PF_A1R5G5B5
09:30:38: D3D9: Vertex texture format supported - PF_A8R8G8B8
09:30:38: D3D9: Vertex texture format supported - PF_B8G8R8A8
09:30:38: D3D9: Vertex texture format supported - PF_A2R10G10B10
09:30:38: D3D9: Vertex texture format supported - PF_A2B10G10R10
09:30:38: D3D9: Vertex texture format supported - PF_DXT1
09:30:38: D3D9: Vertex texture format supported - PF_DXT2
09:30:38: D3D9: Vertex texture format supported - PF_DXT3
09:30:38: D3D9: Vertex texture format supported - PF_DXT4
09:30:38: D3D9: Vertex texture format supported - PF_DXT5
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT16_RGB
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT16_RGBA
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT32_RGB
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT32_RGBA
09:30:38: D3D9: Vertex texture format supported - PF_X8R8G8B8
09:30:38: D3D9: Vertex texture format supported - PF_X8B8G8R8
09:30:38: D3D9: Vertex texture format supported - PF_R8G8B8A8
09:30:38: D3D9: Vertex texture format supported - PF_DEPTH
09:30:38: D3D9: Vertex texture format supported - PF_SHORT_RGBA
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT16_R
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT32_R
09:30:38: D3D9: Vertex texture format supported - PF_SHORT_GR
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT16_GR
09:30:38: D3D9: Vertex texture format supported - PF_FLOAT32_GR
09:30:38: D3D9: Vertex texture format supported - PF_SHORT_RGB
09:30:38: RenderSystem capabilities
09:30:38: -------------------------
09:30:38: RenderSystem Name: Direct3D9 Rendering Subsystem
09:30:38: GPU Vendor: ati
09:30:38: Device Name: ATI Radeon HD 4800 Series
09:30:38: Driver Version: 7.14.10.630
09:30:38:  * Fixed function pipeline: yes
09:30:38:  * Hardware generation of mipmaps: yes
09:30:38:  * Texture blending: yes
09:30:38:  * Anisotropic texture filtering: yes
09:30:38:  * Dot product texture operation: yes
09:30:38:  * Cube mapping: yes
09:30:38:  * Hardware stencil buffer: yes
09:30:38:    - Stencil depth: 8
09:30:38:    - Two sided stencil support: yes
09:30:38:    - Wrap stencil values: yes
09:30:38:  * Hardware vertex / index buffers: yes
09:30:38:  * Vertex programs: yes
09:30:38:  * Fragment programs: yes
09:30:38:  * Geometry programs: no
09:30:38:  * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
09:30:38:  * Texture Compression: yes
09:30:38:    - DXT: yes
09:30:38:    - VTC: no
09:30:38:  * Scissor Rectangle: yes
09:30:38:  * Hardware Occlusion Query: yes
09:30:38:  * User clip planes: yes
09:30:38:  * VET_UBYTE4 vertex element type: yes
09:30:38:  * Infinite far plane projection: yes
09:30:38:  * Hardware render-to-texture: yes
09:30:38:  * Floating point textures: yes
09:30:38:  * Non-power-of-two textures: yes
09:30:38:  * Volume textures: yes
09:30:38:  * Multiple Render Targets: 4
09:30:38:    - With different bit depths: yes
09:30:38:  * Point Sprites: yes
09:30:38:  * Extended point parameters: yes
09:30:38:  * Max Point Size: 256
09:30:38:  * Vertex texture fetch: yes
09:30:38:    - Max vertex textures: 4
09:30:38:    - Vertex textures shared: no
09:30:38:  * Render to Vertex Buffer : no
09:30:38:  * DirectX per stage constants: yes
09:30:38: ***************************************
09:30:38: *** D3D9 : Subsystem Initialised OK ***
09:30:38: ***************************************
09:30:38: ResourceBackgroundQueue - threading disabled
09:30:38: Particle Renderer Type 'billboard' registered
09:30:38: SceneManagerFactory for type 'BspSceneManager' registered.
09:30:38: Registering ResourceManager for type BspLevel
09:30:38: SceneManagerFactory for type 'OctreeSceneManager' registered.
09:30:38: SceneManagerFactory for type 'TerrainSceneManager' registered.
09:30:38: Parsing scripts for resource group Autodetect
09:30:38: Finished parsing scripts for resource group Autodetect
09:30:38: Parsing scripts for resource group General
09:30:38: Finished parsing scripts for resource group General
09:30:38: Parsing scripts for resource group Internal
09:30:38: Finished parsing scripts for resource group Internal
09:30:38: Creating resource group Bootstrap
09:30:38: Added resource location '../../media/packs/OgreCore.zip' of type 'Zip' to resource group 'Bootstrap'
09:30:38: Added resource location '../../media' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/fonts' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/materials/programs' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/materials/scripts' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/materials/textures' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/models' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/overlays' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/particle' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/gui' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/DeferredShadingMedia' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/PCZAppMedia' of type 'FileSystem' to resource group 'General'
09:30:38: Added resource location '../../media/packs/cubemap.zip' of type 'Zip' to resource group 'General'
09:30:38: Added resource location '../../media/packs/cubemapsJS.zip' of type 'Zip' to resource group 'General'
09:30:38: Added resource location '../../media/packs/dragon.zip' of type 'Zip' to resource group 'General'
09:30:38: Added resource location '../../media/packs/fresneldemo.zip' of type 'Zip' to resource group 'General'
09:30:38: Added resource location '../../media/packs/ogretestmap.zip' of type 'Zip' to resource group 'General'
09:30:38: Added resource location '../../media/packs/skybox.zip' of type 'Zip' to resource group 'General'
09:30:38: Texture: Vortex.jpg: Loading 1 faces(PF_R8G8B8,1024x768x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x768x1.
09:30:39: Can't assign material Examples/Rockwall to SubEntity of floor because this Material does not exist. Have you forgotten to define it in a .material script?
09:30:39: Mesh: Loading VortexBall.mesh.
09:30:39: Can't assign material VortexBallSh to SubEntity of Ball because this Material does not exist. Have you forgotten to define it in a .material script?
09:30:39: Can't assign material PlasmaSh to SubEntity of Ball because this Material does not exist. Have you forgotten to define it in a .material script?
09:30:48: Unregistering ResourceManager for type BspLevel
09:30:48: *-*-* OGRE Shutdown
09:30:48: Unregistering ResourceManager for type Compositor
09:30:48: Unregistering ResourceManager for type Font
09:30:48: Unregistering ResourceManager for type Skeleton
09:30:48: Unregistering ResourceManager for type Mesh
09:30:48: Unregistering ResourceManager for type HighLevelGpuProgram
09:30:48: Uninstalling plugin: Octree & Terrain Scene Manager
09:30:48: Plugin successfully uninstalled
09:30:48: Unloading library .\Plugin_OctreeSceneManager_d
09:30:48: Uninstalling plugin: Cg Program Manager
09:30:48: Plugin successfully uninstalled
09:30:48: Unloading library .\Plugin_CgProgramManager_d
09:30:48: Uninstalling plugin: BSP Scene Manager
09:30:48: Plugin successfully uninstalled
09:30:48: Unloading library .\Plugin_BSPSceneManager_d
09:30:48: Uninstalling plugin: ParticleFX
09:30:48: Plugin successfully uninstalled
09:30:48: Unloading library .\Plugin_ParticleFX_d
09:30:48: Uninstalling plugin: GL RenderSystem
09:30:48: *** Stopping Win32GL Subsystem ***
09:30:48: Plugin successfully uninstalled
09:30:48: Unloading library .\RenderSystem_GL_d
09:30:48: Uninstalling plugin: D3D9 RenderSystem
09:30:48: D3D9 : Shutting down cleanly.
09:30:48: Unregistering ResourceManager for type Texture
09:30:48: Unregistering ResourceManager for type GpuProgram
09:30:48: D3D9 : Direct3D9 Rendering Subsystem destroyed.
09:30:48: Plugin successfully uninstalled
09:30:48: Unloading library .\RenderSystem_Direct3D9_d
09:30:48: Unregistering ResourceManager for type Material
The secret of creativity..... is knowing how to hide your sources!
marc_
Halfling
Posts: 48
Joined: Wed May 21, 2008 7:03 pm
Location: México, CVA

Re: Port wiki's Game State Manager to usable with Eihort

Post by marc_ »

liamrudel, i had the same problem, but i found that the resourceGroups are initialized bfore even haveing paths to initialize and so then have scripts to parse, checkout this lines in the GameManager.cpp

Code: Select all

void GameManager::setupResources(void)
{
	// load resource paths from config file
	ConfigFile cf;
	cf.load("resources.cfg");

	// go through all settings in the file
	ConfigFile::SectionIterator seci = cf.getSectionIterator();

	String secName, typeName, archName;
	while (seci.hasMoreElements())
	{
		secName = seci.peekNextKey();
		ConfigFile::SettingsMultiMap *settings = seci.getNext();
		ConfigFile::SettingsMultiMap::iterator i;
		for (i = settings->begin() ; i != settings->end() ; ++i)
		{
			typeName = i->first;
			archName = i->second;
			ResourceGroupManager::getSingleton().addResourceLocation(
				archName, typeName, secName);
		}
	}
	ResourceGroupManager::getSingleton().initialiseAllResourceGroups();    <-------this is called after the one in  bool GameManager::configure(void), 
                                                                                                                              so it  won't initialize aomething already initialized


}

bool GameManager::configure(void)
{
	// load config settings from ogre.cfg
	if (!mRoot->restoreConfig())
	{
		// if there is no config file, show the configuration dialog
		if (!mRoot->showConfigDialog())
		{
			return false;
		}
	}

	// initialise and create a default rendering window
	mRenderWindow = mRoot->initialise(true,"GRV::Prototipo v1.1");

	ResourceGroupManager::getSingleton().initialiseAllResourceGroups();  <----comment this line and you will get the sscripts parsed

	return true;
}
marc_
Halfling
Posts: 48
Joined: Wed May 21, 2008 7:03 pm
Location: México, CVA

Hikari + Managing Games States

Post by marc_ »

i have hikari (hikari is used for flash UI ) running in my introState, but when i want to change to another state, an error pops saying:
Unhandled exception at 0x003d2c2b in prototipov1.1.exe: 0xC0000005: Access violation reading location 0xbaadf00d.
does anyboy have used hikari with the state manager of the wiki?, if so please tell me how do you change from states without having this problem.

thanks in advance..
marc_
Halfling
Posts: 48
Joined: Wed May 21, 2008 7:03 pm
Location: México, CVA

[solved] Hikari + Managing Games States

Post by marc_ »

hey guys, i have problems changing the state with hikari, i captured some screenshots, first the mouse released event is fired and the mouse button id is injected to the hikari manager
ogre1.JPG
ogre1.JPG (10.58 KiB) Viewed 3274 times
then i receive the hikari callback where i process to see if it is time to change the state
ogre2.JPG
ogre2.JPG (3.62 KiB) Viewed 3269 times
after calling change state, the statemanager calls the exit method of the current state.
ogre3.JPG
ogre3.JPG (13.46 KiB) Viewed 3270 times
after doing that, the game manager calls the second state's enter method where it is initialize the second state, there i have another flash UI, that also gets initialized

after all that ther is no error, and when it gets back to the point of origin which is the mouse released call back
ogre1.JPG
ogre1.JPG (10.58 KiB) Viewed 3274 times
i got the error showed in the previous post.

any ideas of how should i manage hikari in order to stop this?,,, hellP!!
thanks in advice.


ok, solved.. here is my original post..
http://www.ogre3d.org/forums/viewtopic.php?f=5&t=47538
Last edited by marc_ on Mon Apr 20, 2009 5:49 am, edited 1 time in total.
User avatar
liamrudel
Gremlin
Posts: 150
Joined: Tue Oct 21, 2008 10:35 am
Location: Ireland
Contact:

Re: Port wiki's Game State Manager to usable with Eihort

Post by liamrudel »

Do I need to credit anyone when using this?
The secret of creativity..... is knowing how to hide your sources!
User avatar
liamrudel
Gremlin
Posts: 150
Joined: Tue Oct 21, 2008 10:35 am
Location: Ireland
Contact:

Re: Hikari + Managing Games States

Post by liamrudel »

marc_ wrote:hey guys, i have problems changing the state with hikari, i captured some screenshots, first the mouse released event is fired and the mouse button id is injected to the hikari manager
ogre1.JPG
then i receive the hikari callback where i process to see if it is time to change the state
ogre2.JPG
after calling change state, the statemanager calls the exit method of the current state.
ogre3.JPG
after doing that, the game manager calls the second state's enter method where it is initialize the second state, there i have another flash UI, that also gets initialized

after all that ther is no error, and when it gets back to the point of origin which is the mouse released call back
ogre1.JPG
i got the error showed in the previous post.

any ideas of how should i manage hikari in order to stop this?,,, hellP!!
thanks in advice.

Try to make sure the last thing you do is switch states as I had a problem where I switched to a new state mid frame, it then went to call enter on state 2 and then came back to state 1 and tried to access some variables which where dead because state 2 changed the scene manager and some other stuff.
The secret of creativity..... is knowing how to hide your sources!
marc_
Halfling
Posts: 48
Joined: Wed May 21, 2008 7:03 pm
Location: México, CVA

Re: Port wiki's Game State Manager to usable with Eihort

Post by marc_ »

hey liamrudel, yeah i fixed some months ago... umm here is my original post and the solution applied...
http://www.ogre3d.org/forums/viewtopic.php?f=5&t=47538

:) i felt so stupid lol... but well guess that when you are so tired you never realized about this small things..
thanks anyway :)
Post Reply