PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

skip intro for quicker dev + fast background refresh

hi again :P

How do you think we could easily skip the GPRS stuff to go straight to our game's main core when running the .exe ?

that's only to get faster to what's interesting to look at, after modifying the code, without simulate registry each time.


& an other question: i have a surface loaded from a TGA, i want it to be the static background of my game, but a lot of sprites move on it. I have to copy that surface to the screen buffer each time.

it's a 240*320 TGA, this is how i loaded it in the InitGameState():

Code:
m_mybackground.Reset( g_Factory->NewSurface( "graphics/background.tga" ) );


how should i redraw it to screen as fast as possible at the beginning of each DoGameState() loop ?

THX
Heja Lewil,

I'm not sure I understand what you mean, but I'll try to help.

For the fast starts, go to FrameGame.cpp and edit the FrameGame::Initialize method. There is a line there, that says:

ChangeState( GAME_STATE_SPLASH );

Just change that to whatever gamestate you want to go immediately. For example, during game development I set it to

ChangeState( GAME_STATE_GAME );

That way I always jump straight into the game. You might also want to set it to

ChangeState( GAME_STATE_MENU );

to jump straight into the menu everytime.

As for your second question.

Just do

g_Api->GetSecondary()->CopyFrom( m_mybackground.Get() );

And that should work. You have to do the explicit get because m_mybackground is a scopedptr, and you need to pas a raw pointer to the CopyFrom() method. Sorry 'bout that, but the safety that scopedptr's provide makes more than up for it.

Cheers,

Jape
Hi Jape

that's exactly what i meant for both points. thx !!!

that's a lot of work again (that's a major improve since last EasyCE release, we have to re-learn) but i hope this game will be a good surprise because i've never heard about something like this in the forum... two or three month more and that should do it :')