Compiled version doesnt work as in GE

Non-platform specific questions.

Compiled version doesnt work as in GE

Postby d-soldier » Thu May 10, 2007 11:34 pm

... I'm about finnished with my current game, and I'm doing dome beta testing of my own, and as such I compiled it to windows exe, and have since noticed problems. For instance, when my player is killed, an activation event is sent to my LifeCounter, which (if more then 0) creates the player again, or (if equal to 0) the game over actor. Works great while playing in GE... but when compiled (and the player is killed) it creates two new players on the screen, and when the LifeCounter is at 0, it creates the GAMEOVER actor, but still continues to create players as well... I dont understand why it works perfectly while in GE, but is all messed up when compiled... anyone else had issues like this?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby makslane » Thu May 10, 2007 11:40 pm

Send me the game, I will see what's happen.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Fri May 11, 2007 12:03 am

The only way to resolve this problem (for now) is doing it in other ways, happened to me in OmegaPong.

Like the Timer actor wasn't getting destroyed correctly, all I did is add a second destroy actor and it worked perfectly ect...
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

...

Postby d-soldier » Fri May 11, 2007 12:43 am

Yep, that seemed to fix it... I had to run a series of activation events through a completely different actor to destory the timer... strange that the normal destroytimer event works fine while in GE but not in the compiled version...
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby d-soldier » Fri May 11, 2007 12:57 am

well... fixed one problem anyways... The compiled version still continues to create the player when there are no lives left (along with creating the gameover actor..) Heres my script:

if(text_lives.textNumber>0) //also tried ">=" just in case
{
text_lives.textNumber -= 1;
CreateTimer("Event Actor", "1second", 1000);
}
else if(text_lives.textNumber==0) //also tried "<1" & "<=1" just in case
{
speed = 0;
CreateActor("gameover", "gameover_00000", "(none)", "(none)", 0, 0, true);
PlaySound2("data/wav_hitmetal.wav", 1.000000, 1, 0.000000);;

}

---- anyone?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Fri May 11, 2007 1:23 am

you say it creates it two times when it has lives left and one when it doesn't?
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Fri May 11, 2007 1:28 am

d-soldier wrote:well... fixed one problem anyways... The compiled version still continues to create the player when there are no lives left (along with creating the gameover actor..) Heres my script:

if(text_lives.textNumber>0) //also tried ">=" just in case
{
text_lives.textNumber -= 1;
CreateTimer("Event Actor", "1second", 1000);
}
else if(text_lives.textNumber==0) //also tried "<1" & "<=1" just in case
{
speed = 0;
CreateActor("gameover", "gameover_00000", "(none)", "(none)", 0, 0, true);
PlaySound2("data/wav_hitmetal.wav", 1.000000, 1, 0.000000);;

}

---- anyone?

sometimes script does not matter unless you must constantly destroy the player because GE for some reason in the windows .exe files will create the actor when it is destroyed at its current position or at the x 0 and y 0 position. :(
(I have not had this problem in the new version! :D)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

no

Postby d-soldier » Fri May 11, 2007 1:29 am

GAME-A-GOGO:

It did, but routing a (another) destroytimer event stopped it from making two... now it continues making one (like it should) even after the counter is at 0 (which it shouldnt).. It's like the textnumber has no effect, but the code obviously works, becuase the gameover actor is created when there are 0 lives left... but so is the player, though he shouldnt be..
Sparky:

Okay... so whats the fix then?
Last edited by d-soldier on Fri May 11, 2007 1:32 am, edited 1 time in total.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Fri May 11, 2007 1:30 am

I posted,
but I do not see a destroy actor event for your player...?
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby d-soldier » Fri May 11, 2007 1:33 am

When the player is destroyed, it sends an activation event to the LivesCounter actor. The code above is the Activation event for the LivesCounter when it receives that event.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Fri May 11, 2007 1:42 am

d-soldier, try adding a destroy actor in the script.

Sometimes, to make things work, it has to be twisted xD
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

eh

Postby d-soldier » Fri May 11, 2007 1:51 am

The problem isnt that the player isn't being destroyed, this entire event only occurs when he IS destroyed, and it doesn't happen while playing the game in GE, only in the compiled version. And if I did have a destroyplayer event in there, the LivesText object would be "-1" and look really unprofessional... hmm.. is there a way to script that text object that 0 is the lowest number it can display? maybe?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

i might be able to fix it...

Postby kyensoftware » Fri May 11, 2007 6:33 am

I might be able to fix it.
I just have a Q for Makslane:
In Windows EXE export, does it export 16-bit or 32-bit?
If it is 16-bit, it is prob an integer error. (it has to do wit binary. Commodore 64, processor registers are 8-bit bytes, DOS/Early Linux/UNIXes 16-bit processor registers and finnaly 32-bit windows. then there is 64-bit, that ge dosnt work with (in windows, it dosnt, in linux, it does!)that has 64-bit bytes.)
Sorry if you dont understand, d-soldier, i am sorry.
Makslane should understand.
I got it to run on Win 95 and 98, 95 being 16-bit, and 98 being both. Then again, XP has a 16-bit startup, and system core error thingy!
You are probably all scratching your heads now... :wink:
Good Luck fixing!
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Re: i might be able to fix it...

Postby makslane » Fri May 11, 2007 2:37 pm

kyensoftware wrote:In Windows EXE export, does it export 16-bit or 32-bit?


32bits
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

so

Postby d-soldier » Fri May 11, 2007 10:30 pm

So does anyone know how to script a text object so that 0 is the lowest number is displays (never goes negative?)
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest