Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 177 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 5 1 2 3 4 5
Re: Trouble with Published Game ... Again [Re: Dooley] #451959
05/28/15 07:49
05/28/15 07:49
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
The published version of a game is a little different to your development version, the latter one has a few more things for debugging active and so on. This is why errors can appear (immediately) in either one of those versions while not appearing in the other, although the faulty line of code or damaged file is in both of them.

It was an old/ faulty *.wad file I think which caused the problem. The error appeared first in the published version but after changing and adding stuff (in code) it appeared in the development version, too.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Trouble with Published Game ... Again [Re: Superku] #451980
05/28/15 18:39
05/28/15 18:39
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Thanks,
I'm planning to break up my project into different pieces in order to help narrow down the cause of these issues. One thing that occurred to me right off, all my global variables, strings, bmaps and pointers are being called though the main script, I mean, not within a function, not sure what the word for this is.

Is there a way to call global pointers like these from within a function, so they are only called upon when needed? For instance, if I have a level with certain textures, but those textures will not be used on any other levels, can I call them within a function, so they do not get accessed on other levels?

I hope this makes sense. This way, I could break up my program, and only those features being used would be called in the level they are being used on. That way, if there is a faulty bitmap, or model, etc... it would only cause problems in the level it is used on, and I could narrow down the cause much faster.

In a related question, how does the engine know which action/function to call first after loading a level? Does it start the top of the "level" list in WED and work its way down?

That way, the first entity on the list could call all the bitmaps, pointers, strings and variables used by the things on that level only. Is it possible?

Re: Trouble with Published Game ... Again [Re: lemming] #451981
05/28/15 18:41
05/28/15 18:41
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
@Lemming - your post made me laugh, by the way laugh Thanks for that!

Last edited by Dooley; 05/28/15 18:41.
Re: Trouble with Published Game ... Again [Re: Dooley] #451986
05/29/15 06:18
05/29/15 06:18
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Okay,
I've found an old build of my game on my laptop. I'm going to load it back up, publish it and see if the same errors occur. That way, I'll know whether the problem was there early on or whether it came in later.

Re: Trouble with Published Game ... Again [Re: Dooley] #451989
05/29/15 09:02
05/29/15 09:02
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I don't understand what you mean with "call all the bitmaps" and similar.
When you level_load a map, I think the blocks as well as their textures - which get freed on the next level_load call so you don't have to purge them manually - get loaded first, then entities and then the actions are executed, starting with the entity which you placed in your level first.

Going back to an older version where the error does not appear can be helpful but it is no guarantee that that version does not have a faulty file - still assuming it's not an error in your code or simply a missing file in your published folder.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Trouble with Published Game ... Again [Re: Superku] #451995
05/29/15 16:43
05/29/15 16:43
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
BMAP* cursor_pcx = "cursor.pcx"; << this is what I'm talking about

Re: Trouble with Published Game ... Again [Re: Dooley] #451997
05/29/15 16:51
05/29/15 16:51
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Oh I see. In such a case an entity function which creates the bitmaps can indeed be useful, I do something similar for a few big textures which I only need in one cutscene too.
You can do that for instance as follows:

BMAP* bmp_big_texture1 = NULL;

void create_big_textures()
{
if(!bmp_big_texture1) bmp_big_texture1 = bmap_create(...);
...
}

Then, when you exit the level you have two options, that is either destroy the bitmaps

ptr_remove(bmp_big_texture1);
bmp_big_texture1 = NULL;

or bmap_purge() (or whatever it is called) the allocated memory. Then you do not have to create the bitmap more than once but still can free unused memory.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Trouble with Published Game ... Again [Re: Superku] #451998
05/29/15 18:54
05/29/15 18:54
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Great, I will try this.
Also, I don't know if this might be the cause or not, but I get warnings that I have undefined materials on some of my objects. The thing is, even when I assign a material to them, it still gives me the warning. It never seemed to cause any problems, at least not any immediate crashes. Could this be the cause, or just another symptom?

Any advice on assigning materials?

Is this enough?
my.material = metal_mtl;

Or is there some other process one must use?

Re: Trouble with Published Game ... Again [Re: Dooley] #451999
05/29/15 18:55
05/29/15 18:55
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
For the record, I know you also have to define the MATERIAL* before assigning it.

like so...

MATERIAL* metal_mtl =
{
effect="metal.fx";
skin1 = skycube;
}

Re: Trouble with Published Game ... Again [Re: Dooley] #452082
06/02/15 06:04
06/02/15 06:04
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Woooooohoooooo!

Okay, I hope this was really the problem. I re-installed GameStudio A7 along with the latest patch, and recompiled all my levels, and now the published version doesn't crash anymore laugh

I figured it might be a problem with my installation when the debugger in SED wasn't working.

Now it seems to run smoothly and does not crash in the place it was crashing before. I am going to do a lot of testing now, to make sure it's stable, and make a backup copy before making any further changes.

I guess I should have figured this out sooner, but here it is for anyone else to benefit from my troubles.

Page 4 of 5 1 2 3 4 5

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1