Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Moving NPCs crash program
I noticed an odd error in the Windows complation of my game.
On some maps, the game crashes and returns the following error: Unhandled exception: c0000094 At adresse: 00417349 Going further into this, it says there's a division by zero.
The error occurs every time the player enters a map that has moving NPCs (friendly or hostile, that makes no difference). If all the NPCs on this map stand perfectly still and do not walk around, there's no problem. But as soon as one of them walks, the error occurs.
This does, however, not happen under MacOS 9, and PoG runs without problems, even though the NPCs there are moving around a lot, too.
Just wanted to know if anyone else noticed this, and if you know a way around it.
I don't use a PC, so I have no idea.
What does your animation look like, though? I mean, how have you set up the walking animation? Sometimes crashes can occur only if you run the compiled version of your game, and maybe some crashes only occur if you run the PC version? So if you've added some events to the walk animation (like... add splashes in water), the game might crash.
Sorry if that doesn't make any sense.
Nope, just standard walking animation. I also have an NPC that is actually a Fountain. This NPC has the animation of a bubbling Fountain (set to Standard), while the walking NPCs are set to 8-Directional. Which of these settings is used, however, doesn't matter. I tried both. Fact is, the error occurs only under Windows (95 as well as XP, support enabled or not), and only if there's a non-stationary NPC on the map.
This doesn't help your problem....
But the fountain doesnt have to be an NPC. You can make an animation of the fountain and instead of setting it as an NPC that can't move, you can simply put the animation in the map.
On the map click on layers, select your layer, and then place the animation on the map. (If its an animation, it will have a red arrow on the icon.)
@pixor, on Apr 17 2006, 02:29 AM, said in Odd error in Windows compilations:
The fountain doesnt have to be an NPC.
It helps if you want to drink from it.
Nah, just place an event on the map tiles surrounding the fountain if you want anything to happen, like drink from it!!!
Laughs the fountain is bewitched, it actually talks to the player. Yeah, that can be done with events, too, but that way seemed easier to me. The fountain talks, explains waht's going on and gives the player a new body (you start out as pure essence without a body).
Sounds awesome.
And I guess it's better to use an NPC than event tiles, too, because it shows that nifty blue aura undeneath it. Without that, how will the player know he can talk to it?
Quite true, quite true....
I marvel at your amazing thought concepts.....
Laughs again thanks. ^^
@arion, on Apr 15 2006, 04:23 AM, said in Odd error in Windows compilations:
Wait, can NPCs use standard animations? I thought they couldn't :huh:
This post has been edited by Kryten : 19 April 2006 - 03:19 AM
NPCs can use standard animations as long as they do not move or if you want them to move in a specific way. Sometimes, though, the NPC will move anyway when in contact with the Player, especially if the NPC is a fighter and the Player wails away enough. I have found it useful as a passive NPC. I have a couple of passive NPC trees that when the Player hits will give up something. Those have just a single graphic, but I wanted the blue collision sphere ring to pop up. I have a passive NPC dog that is a standard animation who is lying on the ground, not walking around, but his tail wags. Most of the time, though, I'll place a standard animation on the map and place event tiles on the map ground around him. Loads easier.
In fact, as soon as an NPC has stamina (thus is hostile/can be attacked) it will move, even if you define a "Walk around initial position" value of Zero. As I said, the odd thing is that the error is NOT caused by IMMOBILE NPCs, that is friendly NPCs with a range of Zero. I looked into the assembler code, and one of the registers divides by a stack pointer (no idea what the stack pointer is, though, what it stands for), and it seems that this stack pointer has a value of zero. Thus, division by zero, and that causes every program to crash.
If you want this inanimate object to be an NPC which cannot move, but which also has an animation, place it on a tile and block access on the eight tiles which surround it. Then it no longer needs a walk around value of zero. Your player will still be able to "talk" to it, or drink from it, being only one movement tile away.
I have successfully used this technique with an enemy NPC and know that the circle of blocked access tiles does not interfere with the interaction. In my scenario, there is a large rock which the player attacks with a miner's pick. If I gave the rock a morale value, the rock would "run away" when that value was reached. If I made the morale equal to zero, the rock would chase the player if he quit too soon. With the rock firmly locked in place with access blocked, the player strikes it until it breaks into many small pieces scattering valuable crystals on the ground. The player is able to pick up the crystals including those which fall on the original tile which the player cannot stand on (because the access is blocked.)
You're not getting what to say. I'm not asking how to make an in-animate NPC. I don't want to make an in-animate NPC. 98% of my NPCs are SUPPOSED to walk around. I want to know if anyone knows the reason for this odd bug. Everytime I run the WINDOWS (not MacOS) version of the compilation, the program crashes when I enter a map that has at least one NPC that is moving around. The reason seems to be a division by zero. My questions are: - Did anyone else observe this? - Does anyone know why it happens? - Does anyone know a way around it?
Sorry, Arion. This is a puzzle which seems not to ever have come up before -- at least not on this board. I have no other suggestions.
I'm assuming that you're not trying to run the Windows version on your Mac. If so, that's the problem. If not, then I don't know because I haven't tried it yet. Sorry.
I tried to run it on an emulated Windows on my comp, but I also had a friend, who's using PCs with Win XP and Win 95 try it, all returned the same error.
Rubber Ducky, seriously. The windows app wouldn't return an error like that if I ran it on my mac. It wouldn't run at all, because the mac doesn't recognize it as program.
Since this only appears on the Win version, Coldstone is obviously having problems compiling the Win version. Too bad there's no Win version of Coldstone, otherwise I could do it with that.
This post has been edited by Arion : 25 April 2006 - 05:42 AM
@arion, on Apr 25 2006, 06:40 AM, said in Odd error in Windows compilations:
I did not suggest that you did. I merely stated I had no knowledge of this problem being previously exposed.
@arion, on Apr 14 2006, 05:46 AM, said in Odd error in Windows compilations:
Well I was trying to test your statement, so I made a windows version of my game and brought it to my Windows Laptop (Dell 2650).
It did not quit out with moving NPCs, however it did "mess up".
At first it was fine, the startup screen was normal, but when I loaded a map it had... difficulties. All of the NPCs had no animations. They were just black squares with health bars. Also the ground tiles were all black. But any stamps on a Layer in the maps were still there. Also the Player Icon was black. It was really strange.
I think there may just be something wrong with the windows compilation, but I'm not sure.
Once I sent the Windows version to my friend because he wanted to see what I was working on, and I don't remember him saying anything was wrong. ( He just said it was slow and boring. :p)
hmmmmm this is an odd error and hopefully they'll try to fix it in the update..
Do they check this forum to see what things people mention so they can fix them?