The Daily Click ::. Forums ::. Klik Coding Help ::. My game randomly freezes!
 

Post Reply  Post Oekaki 
 

Posted By Message

Spiriax



Registered
  25/05/2005
Points
  277
18th August, 2006 at 15:35:24 -

Hi everyone!

I really need help. Professional help or good help - help as help.
First of all: I use Multimedia Fusion (1), Version 1.5, build 119.

I think this problem might be kinda usual. The thing is that my game randomly freezes. It doesn't happen very often, and sometimes I've thought that the problem has gotten away, until it happens again.
I have a kind of fighting game and the freezing doesn't occur over the whole game; it only occurs in the arena (fighting) frame. It can happen in the very beginning of the fight and it can happen in the middle of it. And I can never see any visible reasons when it happens; no big mess of objects or anything like that.
This doesn't only ruin the game; I cannot shut it down either and I must go into Ctrl+Alt+Delete - in a resolution of 320x200.

If there's nothing you can think of what the reason for it might be, please still tell me if you've experienced this kind of problem and what solved it.
As this happens very randomly it's very difficult for me to try and remove things to see if things has gotten okay.

I use the extensions Window Focus object, DMC2 object and Save Game object (I have 20 Save Game objects in the frame).
I might inform you also that the game is "Combatants of Spiritlake" which I've posted a little preview of a couple of months ago.

All help would be utterly appreciated.
Thanks in advance.
/Spiriax

 
n/a

Tina Petersen



Registered
  19/09/2003
Points
  350
18th August, 2006 at 15:42:19 -

DMC2 made my games freeze randomly when u sent commands to it.

 
- Eternal Life, Or Your Money Back -
http://www.befun.dk/
Currently looking for a home (team)

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
18th August, 2006 at 15:46:37 -

The DMC2 object usually crashes if you end the application without using CloseModule and TerminateBass first, or during transitions - if it's the start of the frame that's the problem then it might not be that. But I'd try removing DMC2 and seeing what happens all the same.

 
http://www.davidn.co.nr - Games, music, living in America

Spiriax



Registered
  25/05/2005
Points
  277
18th August, 2006 at 17:15:35 -

If the DMC2 is the problem, I'd be shocked. Not only because I've used it a whole lot and never encountered such things, but also then why does it only freeze in the arena frame?

@Julia: Oh, that's good to know.

@David: I have encountered sereval crashes, that's true, but that have had to do with different 3rd party object transitions. I have encountered crashes that might be the cause of DMC2 but it only happens if I shut down the game in the beginning of the frame I think.
But that's not the problem, it's the game freeze.

This is how the conditions and actions look that has with DMC2 to do, maybe there's something bad:
http://img76.imageshack.us/img76/3541/namnls2cn6.jpg

As I use only MOD-files in my game - which I forgot to tell - I'm gonna change to ModFusion. That one should be more stable, right?

Image Edited by the Author.

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
18th August, 2006 at 17:16:54 -

It could be the 65536'th loop problem... It's a bug in MMF that skips every 65536'th event

 
n/a

Spiriax



Registered
  25/05/2005
Points
  277
18th August, 2006 at 17:24:28 -

What the heck, ok? O.o
Then how can I solve that?

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
19th August, 2006 at 07:03:25 -

There is a weird way fixing that bug...
* Start of frame
+ Pick all objects in zone -9999,-9999,9999,9999
* Some dummy action

For some reason this works
You can test the bug by always starting 10000 loops an during each loop add 1 to a counter... after 7 loops the result will be 69999

 
n/a

Spiriax



Registered
  25/05/2005
Points
  277
20th August, 2006 at 00:25:04 -

Okay, so now I've added that event.
I'll just wait and see if the game freezes again - it can happen in an hour, it can happen tomorrow...

I'm not very familiar with loops and such though...

Thanks everyone thus far, and please someone, bring me some more help...

 
n/a

deadeye



Registered
  22/07/2006
Points
  73
20th August, 2006 at 04:31:07 -

Damn, that's a nasty bug. Just read the article on it here:

http://www2.create-games.com/article.asp?id=1274

I think this might be why it doesn't register when my main characater stomps an enemy every once in a while. Occasionally he will just pass right through them. I looked over the code a million times, and double-checked my detector placement and I couldn't find out why it did that. I even made a slo-motion toggle for debugging, but I could never recreate the pass-through problem when it was in slowmo. I think now the reason it won't do it is because the 65535th event that was being skipped always just happened to be an idle time-wasting loop in my slow-motion code. Makes sense, anyway. I'll have to try that fix and see if it takes care of the problem.

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
20th August, 2006 at 07:28:34 -

This bug doesen't have to be whats wrong in your game, it could be something else aswell...
Remember to add a dummy evens such as set flag 0 off or something like that since empty events are removed

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
20th August, 2006 at 13:13:08 -

I noticed you do TerminateBASS() before you stop and close the module. Stop and close the module FIRST, and THEN Terminate BASS. I don't think it's gonna fix much, but it's worth a try.

 
Old member (~2004-2007).

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
20th August, 2006 at 23:24:03 -

Delete all of the DMC2 events and see if it still freezes. If it does then messing with it is a waste of time.

 
n/a

Spiriax



Registered
  25/05/2005
Points
  277
22nd August, 2006 at 12:23:12 -

I'm grateful for the new answers.

@deadeye: Oh, I see. That's very scary. I don't think I've encountered that event skip too much - though I cannot be sure.
I wonder, is this event skip-thing fixed in the latest build of Multimedia Fusion 2?

@Werbad: Yeah, you never know.
Oh yeah, I know. I just set the event to change the direction of a static active object.

@DaVince: Yes, thanks, that's a good tip.

@Radix: Hmm, yes but it's not really that easy to "see if it freezes", because it can happen so randomly. Sometimes I've thought that the annoying game freeze has gotten away because it didn't occur for a long time - and then it just happened again.
After adding that "event skip-fix" I started the game and let it go for itself for I think an hour maybe. Nothing did happen but we'll see. I will just pray to the heavens.

After writing this post I think I've come to the conclusion that the problem is/was probably the event skip-thing and that the freeze was because when the game froze, this bug had maybe skipped an event which were important for other events, thus resulting in a sort of crash.

More tips are still very welcome.

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click