Page 1 of 1

Exported game doesn't work as in-editor game

PostPosted: Sat Nov 25, 2006 8:03 pm
by marcusr
Hi,

When I run my game in the editor, it works fine. When I export it to a Windows executable, it doesn't work in two places.

Firstly, in an actor collision, this snippet of code should play a sound:

...
noise=rand(3)+1;
sprintf(soundname,"data/sounds/jarnoise_%d.wav",noise);
PlaySound(soundname,1,1);

It does in-editor, but not in the export.

Also, on the end screen I display the number of creatures you caught, positioning them in special positions. These are shown in-editor, but don't appear in the exported version

VisibilityState("Bug", ENABLE);

if (Score.textNumber > 0) {CreateActor("Bug", "anim", "(none)", "(none)", 579, 174, true);}
if (Score.textNumber > 1) {CreateActor("Bug", "anim", "(none)", "(none)", 560, 180, true);}
if (Score.textNumber > 2) {CreateActor("Bug", "anim", "(none)", "(none)", 536, 183, true);}
if (Score.textNumber > 3) {CreateActor("Bug", "anim", "(none)", "(none)", 577, 144, true);}
if (Score.textNumber > 4) {CreateActor("Bug", "anim", "(none)", "(none)", 562, 150, true);}
if (Score.textNumber > 5) {CreateActor("Bug", "anim", "(none)", "(none)", 537, 153, true);}
if (Score.textNumber > 6) {CreateActor("Bug", "anim", "(none)", "(none)", 561, 115, true);}
if (Score.textNumber > 7) {CreateActor("Bug", "anim", "(none)", "(none)", 553, 122, true);}
if (Score.textNumber > 8) {CreateActor("Bug", "anim", "(none)", "(none)", 524, 131, true);}

view.x=480;
view.y=0;

Re: Exported game doesn't work as in-editor game

PostPosted: Sat Nov 25, 2006 8:52 pm
by marcusr
I should also say other sounds are playing fine, and the score increments, but the sound isn't played.

Also, from what I can see, for the second problem, the actors appear, and then disappear almost instantly.

This is with version 1.3.6.

PostPosted: Sat Nov 25, 2006 8:52 pm
by makslane
For the first problem, you must put in some place of your code each sound file, may be in a comment, like this:

//Playsound("data/jarnoise_1.wav");
//Playsound("data/jarnoise_2.wav");
...

Other thing, you must put the sounds in the data folder without subdirectories.

For the second problem, I need see your game.
Please, send to my email and use the subject of this thread.

PostPosted: Sun Nov 26, 2006 9:15 am
by marcusr
makslane wrote:For the first problem, you must put in some place of your code each sound file, may be in a comment, like this:

//Playsound("data/jarnoise_1.wav");
//Playsound("data/jarnoise_2.wav");
...

Other thing, you must put the sounds in the data folder without subdirectories.


Thanks makslane, that did the trick!

makslane wrote:For the second problem, I need see your game.
Please, send to my email and use the subject of this thread.


When I upgraded from 1.3.5 to 1.3.6 I'm seeing strange beviour in-editor as well for this problem, so I'll try and track it down a bit more before taking up your time.

Thanks for the help!

PostPosted: Sun Nov 26, 2006 10:04 am
by marcusr
Just to follow up on this, the problem was actually related to setting the score - which is what determined the number of actors that appeared. By making a global score variable and using that, rather than using the score.textNumber, it started working.

Thanks again

Marcus

Game Editor Pro v1.3.8 will not fully export it seems...

PostPosted: Thu Aug 09, 2007 8:36 pm
by Kid_Fisto
OKAY! this gets my goat(for u english speakers)...
i'm paying for
Game Editor Pro v1.3.8
to export my perfectly made(AND played) file
which is supposed to work like an executable screensaver(.exe but not .scr of course) and i've tried EVRYTHING to get it to export right!
evrything like(give us a moment): different folders, diferent extensions(obviously i'm generalizing for time!), save as different file then exporting, even exporting from the pro v1.3.8 folder, etc... i still have two game editor folders which may be the problem, but somehow i recall someone telling me that was a GOOD idea!? for installation problem purposes of course!
anyway i'm done venting about this...
let's hope the big cheese can fix this prob' in his next update.

PostPosted: Thu Aug 09, 2007 9:11 pm
by summer_goth
Hmmm everything seems to be doing exactly as it is "programmed". What exactly is it that you want to achieve? Or what is going wrong? And saying that "everything goes wrong" doesn't help much.

I assume that it's working in game mode but not as an executable? (from the thread name)

What works differently in the two cases?

still no go!

PostPosted: Thu Aug 09, 2007 9:34 pm
by Kid_Fisto
alright, here we go...
sigil, then burns as robin rises, then amon who disappears when michael move finish, then ditto dojima appears-exit michael, sasaki appears, exit robin, karasuma appears exit dojima, kosaka appers exit sasaki, then zaizen appears exit kosaka & then zaizen moves & collides with karasuma who then exits. with zaizen at center for about 4-5 seconds and then robin rises joined by cast -zaizen. some seconds later title screen appears during guitar solo and ends with flames 7x(or 8x?) flaming up. AND Reload from .ged file of same name.
i've also tried activation event OR new timer on michael and game mode is fine BUT as soon as i export it and close everything out And play Sigil.exe with or without .dat and/or .ged(s) in single folder... it still goes back to previous error as if some kind of default. then i load GE back up and error is present there too again aswell. Aaagh! ...Okay?

the error it gets...

PostPosted: Thu Aug 09, 2007 9:40 pm
by Kid_Fisto
i suppose i should add what i said in the attachement comment, duh. . . ... . . . ...
if michael does not disappear then eveything (i.e. just look and read you'll see) just about... messes up. with a slight exception on staff gathering and title screen somewhere when or after zaizen gets collided and destroyed by robin.
thanx :-p

PostPosted: Fri Aug 10, 2007 9:01 am
by summer_goth
As much as I would like to help you I am a bit busy at the moment. Maybe by the end of next week I can look at it again.

Eh, I am also still struggling to understand what you are saying.

What is the "previous error"? The reason why it will take a bit too long at your problem is that I have to look at every actor name and check every step to see what's going on.

Please rephrase your problem similar to the first post in this thread.

For example:

This should happen: Give concise description.

This is what happens: The file doesn't load or this actor disappears or it plays once and doesn't want to again or the actors are not moving towards the positions that they are supposed to move etc.

Sorry, I would like to help but I am limited in time and it's easier to help when I have concise logical steps to work with.

PostPosted: Fri Aug 10, 2007 7:42 pm
by Kid_Fisto
by the 4th move finish
the third move finish actor should move off screen
if he doesn't move then he stays there ignoring his move to command
(all this ONLY after exporting, yet somehow after export it effects both GE & EXE)
if he doesn't move then some other actors don't do according to the programming until the collision of the central(male) actor from the lower rising of the(female) actor from below. THAT my friend is when things[meaning Everything] seems to go back to normal, although i may need to fix the "problem actor's" z depth to make the group of them together look right. and then about 8 seconds or so and then title screen, and flames, then the reload.

SO, it's almost working it's almost done EXCEPT the EXPORT...
Makslane needs to work out the bugs on the export in his program.
in fact it may be a bug related with move to event, because i'm having the same problem with apersonal project for my girlfriend.
Thank You For Your Time.