Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

Game freezing when opponents outside map

The greatest unfinished sequel ever!
Post Reply
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Game freezing when opponents outside map

Post by Errol »

I've been fiddling with all sorts of things recently and while testing the difference between !material and !!material (and there is a difference!) my game froze. On further investigation it turned out that as soon as an opponent entered the !!material and fell out the bottom of the map the game would freeze.

Awesome! An easily recreatable game freezing scenario!

Now, am I right in thinking this sort of freeze doesn't happen for everyone? If you've never had the "opponents outside map causing game freeze" bug would you be willing to test my Carma crashing map? (Not only did C2 freeze, my entire PC needed hard rebooting). (This was me being dumb)
-Errol
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Halogaland
turbo bastard
Posts: 447
Joined: Thu Jun 02, 2011 12:28 pm
Location: Vienne, France

Re: Game freezing when opponents outside map

Post by Halogaland »

I have this bug too, but only sometimes (on special tracks, not all), for example, with the repulsificator (that I have really increased at the force level to be funnier XD), at each time I use it, and then the opponent flying in the air, and then... POUF... bug :suicide:
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: Game freezing when opponents outside map

Post by Harmalarm »

yup, this is know to happen. Didn't know the entire system needed rebooting though. I had a lot of these issues with my dd2 mod. My guess would be this happens for all of us though. The game just cannot seem to cope with opponents falling into oblivion.

I wonder if it also happens on standard c2 track, where opponents can fall through the water plane...
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Game freezing when opponents outside map

Post by Errol »

The PC crashing was me being tired and dumb so ignore that.

I haven't had this occur on stock maps but I can't see that there's anything special happening there either. It's very weird.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Fireman
motorised death
Posts: 784
Joined: Thu May 28, 2009 8:06 am

Re: Game freezing when opponents outside map

Post by Fireman »

I never had any crashes with the default C2 tracks nor with almost all add-on tracks.

I remember there was one track which would always crash if you'd launch an opponent (or yourself) out of the map. It was the Stunt Park from TDR2000. I don't believe it's random.

I thought there was a topic about it on here or at devWAM, I'm not sure though.
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: Game freezing when opponents outside map

Post by coffeycup »

Yeah, it happens with most of, if not all of my custom levels so I try to build in an 'invisible wall' that wraps around the perimeter to keep them in (a tall wall with a transparent texture) which works 99% of the time unless you happen to use the pinball or opponent repulsifier that throws them up and over into the void.
I don't know why it doesn't happen with stock maps, when an opponent falls off they respawn at a Multiplayer Start Point, I think.

Maybe adding more Multiplayer Start Points? Or making sure the default one in the TXT file has coords that drop them in a valid position?

I can help test out some ideas, if you want.
User avatar
juozas
hit n run
Posts: 197
Joined: Mon Mar 31, 2008 2:39 pm
Location: Wasted
Contact:

Re: Game freezing when opponents outside map

Post by juozas »

I've seen it freezing in some overly modded corrupt c2 install on some original track (in the clean install it was ok) just a few seconds after it started, as the cars were flying away...
Сделано в СССР
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Game freezing when opponents outside map

Post by Errol »

Having played a little today I think I've got it worked out. I'll need to do some more accurate testing to say for certain but it seems to be related to the "increased yon, opponents don't recover" bug.

Basically, opponents won't recover to/from within your "immediate" area, this area being defined by a circle of radius yon. If this radius includes ALL nodes (as it is more than likely to do so on smaller maps) the game gets stuck trying to find a node which causes the 100% loop crash.

I "fixed" my test map by adding a node with co-ords 0,300,0 and linking it into the node network.

Before anyone starts modding their maps I'll do some further testing and put up a definitive "fix" article on Toxic-Ragers and link to it from here.

Coffey, if you want to do a quick test then just add a new node 300+ above the highest point on your map and add a path section. I used path-type 1001 but 0 works fine too has to be 0.
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
User avatar
Econobrick
Stucco
Posts: 1720
Joined: Wed Apr 05, 2000 7:14 pm
Location: Sutter and Belmont
Contact:

Re: Game freezing when opponents outside map

Post by Econobrick »

I guess that explains why "Slamson Towne" (a track Sir Errolson himself helped with all those years ago) was so crash/freeze prone... since it was quite a small map with a starting grid right next to a bottomless ocean?!

Image
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: Game freezing when opponents outside map

Post by coffeycup »

Errol wrote:Coffey, if you want to do a quick test then just add a new node 300+ above the highest point on your map and add a path section. I used path-type 1001 but 0 works fine too.
Hey, that worked! How you divined this, I don't know.

I added two nodes at 0, 300, 0 and 1, 300, 0 and connected them with a path section.
Placed my starting grid on the edge of the map facing outward so they had to drive off.

On the first try the game froze, I checked my YON and saw it was at 120 so set it way down to 20 tried again and it worked! Ha!

Moved the nodes up to 600 on the Y axis, set YON to 90 tried again, no freeze.
Looks like you're spot on with the YON and size of map. I think it doesn't happen with stock maps because they're so large. Most of the custom maps, well mine at least, are small by comparison.

Yay! No more need for inviso-walls, I hated doing that hack, made me feel dirty.

ETA : If I set YON above 90 game freezes even if I make node Y pos 999?
User avatar
Errol
Toxic Ranger
Posts: 1168
Joined: Fri Dec 25, 1998 12:00 pm
Location: Sunny Wales
Contact:

Re: Game freezing when opponents outside map

Post by Errol »

It does seem a little picky. My current setup:

Yon: 135

Code: Select all

9                             // Number of path nodes
    0.000,    0.000,    0.000   // Node #0
    0.000,    0.000,   -9.000   // Node #1
    0.000,    0.000,  -20.000   // Node #2
    0.000,    0.000,  -40.000   // Node #3
  -40.000,    0.000,  -40.000   // Node #4
  -40.000,    0.000,   56.000   // Node #5
   50.000,    0.000,   56.000   // Node #6
   50.000,    0.000,  -40.000   // Node #7
    0.000,  500.000,  -20.000   // Node #8 (this is the recover node, directly above node #2)

9                                           // Number of path sections
   0,   1,   0, 255,   0, 255,    1.0,    0   // Section #0
   1,   2,   0, 255,   0, 255,    1.0,    0   // Section #1
   2,   3,   0, 255,   0, 255,    1.0,    0   // Section #2
   3,   4,   0, 255,   0, 255,    1.0,    1   // Section #3
   4,   5,   0, 255,   0, 255,    1.0,    1   // Section #4
   5,   6,   0, 255,   0, 255,    1.0,    1   // Section #5
   6,   7,   0, 255,   0, 255,    1.0,    1   // Section #6
   7,   3,   0, 255,   0, 255,    1.0,    1   // Section #7
   8,   2,   0, 255,   0, 255,    1.0,    0   // Section #8 (recover node linked into main network, using type 0)
I haven't had a crash since.

EDIT:

Update! You have to use path type 0 otherwise the game freezes. Unfortunately the opponents never seem to make it back to the map this way. It's a handy fix for the game crash but it's useless if your opponents regularly fall off the map. The problem now seems to be that they "fall" for so long that the recover code kicks in, they basically get stuck in a recovery loop.

Silly Carmageddon 2!

FURTHER EDIT:

Thinking about it, the reason they don't make it back to the track is that they're not subject to physics unless you can see them. They won't fall back down to the ground because they have no gravity! Rejigging my solution...

FINAL EDIT (FOR NOW):

A "proper" solution to this problem will include quite a few more nodes and track sections. At the bare minimum you need a "safety" node, something so far away that only the most retarded yon value will exclude it. This node HAS to have a path section linking it back into your full node network (in other words, if you can't get from this node to your race path then it won't work). To ensure smoother operation for your opponents you should also add in some "extreme" nodes, I'd suggest at least 4 of these, one as far into each corner of your map as it's possible to get to. These will also need pathing back into the main network.
Using this combination you can prevent the crash with the "safety" node and once you begin driving around the opponents can move to one of the "extreme" nodes and get back into the race. A shitload of effort right here :/

I think this is all due to a bug too! There's a YON value in general.txt that never seems to be used. I'd assume that the options.txt YON should only be used for rendering and the general.txt one for opponent behaviour. Possibly there is a code-based workaround but I won't be able to investigate this for a few days.

Hope this helps!
:: You wanna build a snowman mod C:R? Get Flummery, the Carmageddon modders tool. ::
Post Reply

Check who’s online

Users browsing this forum: No registered users and 224 guests