PocketMatrix forums

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

3D CEdiCE

Hi,

I'd like to thank Thierry for the great library Pocket HAL has become. Thanks to PocketHAL we've been able to release 3D CEdiCE (some information has already been posted at the announcement boards : http://www.pocketmatrix.com/forums/viewtopic.php?t=17197 )

The library is extremely compact, fast and stable which is something really useful when dealing with a 3d engine :) (despite the game is just a puzzle)

Again, lots of thanks Thierry! :)
I tried it and noticed that it doesn't handle loss-of-focus.

It hangs if I turn off the device (I have the owner info enabled) or when a system notification pops up.

Device is a toshiba e750.

Also, is there no sound? Seems like there should be some simple clicks and beeps at the least.
fast_rx wrote:I tried it and noticed that it doesn't handle loss-of-focus.

It hangs if I turn off the device (I have the owner info enabled) or when a system notification pops up.

Device is a toshiba e750.


mmm, both things seem to work on my devices (3630 and 1940). I remember something about e750 when turning off and on the device in this forums, I'll search about this problem. No idea about the loss of focus, maybe it's time to get an e750 ;)

Maybe the problem is I'm using 0.6.5, it was the last version I downloaded and I "feared" of upgrading it to avoid extra beta testing.


Also, is there no sound? Seems like there should be some simple clicks and beeps at the least.

Yes, I'm working on that :) The problem is I didn't want to include the fmod dll (takes quite an amount of space) to just play some little wavs, and as I was in a hurry so I couldn't code the sound functions :)
You might want to try 0.6.6 and see if the problem is still there.
Thierry wrote:You might want to try 0.6.6 and see if the problem is still there.


Yes, I'm compiling with both 0.6.6 and 0.7.2 to see and trying to contact fast_rx to test them in the e750 :)
fast_rx wrote:I tried it and noticed that it doesn't handle loss-of-focus.


mmm... I've got a theory :)
I think the game is draining all the processor time and barely has time to do other things, so the loss of focus is being handled, but it's just too slow.
I've put an Sleep(1); after each frame, and my loss of focus seems to react really faster than before.

could this be the cause of the problem? :)

Also, is there no sound? Seems like there should be some simple clicks and beeps at the least.

Yes, I'm working on that :) The problem is I didn't want to include the fmod dll (takes quite an amount of space) to just play some little wavs, and as I was in a hurry so I couldn't code the sound functions :)


Try my sound library, it's only about 30kb and you can play .mod and .wav without much problems :)
You can download it at http://www.shlzero.com
Also re: Hekkus it's very easy to get going. You would only need a day to implement some wav's & a background tune.
gersen wrote:Try my sound library, it's only about 30kb and you can play .mod and .wav without much problems :)
You can download it at http://www.shlzero.com


yep, I'm trying it right now, it's really compact and easy to use :)

btw, how can I "unload" sounds (to allow sounds to be changed via configuration), if I just load over a loaded sound, will it free the unused sound?

TIA :)
Kak
yep, just load over the current one. For my mods I do:-
Code:
game_music_on=1;
if(game_tune==1)m_module.load(TEXT("spacetune1.mod"));
if(game_tune==2)m_module.load(TEXT("spacetune2.mod"));
if(game_tune==3)m_module.load(TEXT("spacetune3.mod"));
m_module.loop(true);
m_sound.playMusic(&m;_module);
m_sound.volumeMusics(game_music_vol);


I load all my wavs at the start & play then one by one as required
Code:
m_sfx[20].load(_Module.GetModuleInstance(),IDR_20_MECH);//machine sound
m_sfx[20].volume(30);

.....


if(game_sfx_on==1)m_sound.playSound(&m;_sfx[20]);

Conan wrote:yep, just load over the current one.


great :)
I'm having some problems when powering on/off the device though :( It works perfectly with my 3630, however the 1940 hangs the device and I have to reset it.
It works ok when I remove the sound library calls. Do I have to handle a certain message to detect power off and do something with the library? (suspend, I suppose)

TIA :)
Kak
You have to detect power off/on message (WM_ACTIVATE should be the right one) and call hssSpeaker.suspend() on power off and hssSpeaker.resume() on power on.
gersen wrote:You have to detect power off/on message (WM_ACTIVATE should be the right one) and call hssSpeaker.suspend() on power off and hssSpeaker.resume() on power on.


just after writing the message I had "the great idea" of looking at the pockethal + hekkus examples. The rotozoom was working fine, and the difference was on WM_ACTIVATE.
I think I deserve a RTFM / RTFE ;)

it works great now, thanks :)
Still hangs if owner info screen enabled ... Verified no problem if it is disabled. (phal 6.6)

Another problem is game doesn't exit completely. If I quit, I get the "thanks for playing" text, click once more to exit. Then, when I run it the second time, I just go back to the "thanks for playing" text and can't do anything else - have to reset.