Solved Stage problem, OpenBor Crash

Question that is answered or resolved.

dantedevil

Well-known member
When i defeat the last enemy of the first group OpnBor crash always.

I try removing the items and the same happend.


Code:
music        data/music/stage1-1.ogg
fglayer data/bgs/stage1-1/light.png -60 0 0 390 0 0 0 1 1 1 1 0 0 0 0
panel        data/bgs/stage1-1/backgr.png

order           a


Wall  -31  241  0  0  352  0  33  280
Wall  1185  241  -349  0  1  -23  33  280


updatescript data/scripts/traileru.c

spawn1 205 30 10
spawn2 205 35 10
spawn3 205 40 10



type        0
settime        99
notime        0
stagenumber    1-1


#######################################

spawn  story
alias   stage_01
at  0



#-------1


group   2 2
at      0

wait
at      0

spawn  bd2
alias   black_death_gang
coords  -150 250
at  0

spawn  bd4
alias   black_death_gang
coords  550 250
at  0

spawn  bd2
alias   black_death_gang
coords  -50 270
at  0


#-------2

group   2 3
at      190

wait
at      190

spawn  bd2
alias   black_death_gang
coords  -100 230
at  150

spawn  bd4
alias   black_death_gang
coords  -50 240
at  150

spawn  bd3
alias   black_death_gang
coords  550 250
at  190

spawn  bd2
alias   black_death_gang
coords  -150 240
at  190

spawn  bd4
alias   black_death_gang
coords  -150 240
at  190

spawn  bd2
alias   black_death_gang
coords  -150 240
at  190


#-------3

group   3 3
at      250

wait
at      333

spawn  bd2
alias   black_death_gang
coords  550 230
at  250

spawn  bd4
alias   black_death_gang
coords  -50 240
at  250

spawn  bd3
alias   black_death_gang
coords  550 250
at  333

spawn  bd2
alias   black_death_gang
coords  -150 260
at  333

spawn  bd4
alias   black_death_gang
coords  520 240
at  333

spawn  bd3
alias   black_death_gang
coords  550 260
at  333


#-------3

group   3 3
at      400

wait
at      484


spawn  bd2
alias   black_death_gang
coords  550 230
at  400

spawn  bd3
alias   black_death_gang
coords  -50 240
at  484

spawn  bd4
alias   black_death_gang
coords  550 250
at  484

spawn  bd2
alias   black_death_gang
coords  -150 260
at  484

spawn  bd4
alias   black_death_gang
coords  520 240
at  484

spawn  bd2
alias   black_death_gang
coords  550 260
at  484


#-------

spawn   trash
item    lifeup
coords  585 238
at      184


#-------4


group   3 3
at      673

wait
at      673


spawn  bd2
alias   black_death_gang
coords  550 230
at  673

spawn  bd3
alias   black_death_gang
coords  -50 240
at  673

spawn  bd2
alias   black_death_gang
coords  550 250
at  673

spawn  bd3
alias   black_death_gang
coords  -150 260
at  673

spawn  bd4
alias   black_death_gang
coords  520 240
at  673

spawn  bd1
alias   black_death_gang
coords  490 260
at  673

I dont see problems in the last part of the Log:

Code:
-- Setting up game... ----------

Loading title background sprites... Done!

-- LOG: Game proper ---------------------------

Level Loading:   'data/levels/scenes/intro/intro.txt'
Total Ram: 4294967295 Bytes
 Free Ram: 4294967295 Bytes
 Used Ram: 113516544 Bytes

Loading 'stop' from data/chars/misc/story/stop.txt

Level Loaded:    'data/levels/scenes/intro/intro.txt'
Total Ram: 4294967295 Bytes
 Free Ram: 4294967295 Bytes
 Used Ram: 113528832 Bytes
Total sprites mapped: 5149

Level Unloading: 'data/levels/scenes/intro/intro.txt'
Total Ram: 4294967295 Bytes
 Free Ram: 4294967295 Bytes
 Used Ram: 114237440 Bytes

Done.
Total Ram: 4294967295 Bytes
 Free Ram: 4294967295 Bytes
 Used Ram: 114237440 Bytes

Video track: resolution=480*272, display resolution=480*272, 30.00 frames/second
Audio track: 44100.000000 Hz, 2 channels, 16 bits/sample
Level Loading:   'data/levels/test.txt'
Total Ram: 4294967295 Bytes
 Free Ram: 4294967295 Bytes
 Used Ram: 96706560 Bytes

Loading 'BD2' from data/chars/bd2/bd2.txt
Loading 'BD4' from data/chars/bd4/bd4.txt
Loading 'knifer' from data/chars/misc/knifer.txt
Loading 'BD3' from data/chars/bd3/bd3.txt
Loading 'Trash' from data/chars/misc/trash.txt
Loading 'BD1' from data/chars/bd1/bd1.txt

Level Loaded:    'data/levels/test.txt'
Total Ram: 4294967295 Bytes
 Free Ram: 4294967295 Bytes
 Used Ram: 102932480 Bytes
Total sprites mapped: 5601

Allocating sprite : Raiden...
Sprite allocated : #241741144
Allocating sprite : Carolina...
Sprite allocated : #244826616
Allocating sprite : Kitana:Jago:...
Sprite allocated : Kitana
Sprite allocated : Jago
Allocating sprite : Liu_Kang:Tusk:Midas:...
Sprite allocated : Liu_Kang
Sprite allocated : Tusk
Sprite allocated : Midas
 
Last edited:
Solution
Well my friend,  finally works perfect.
My mod have the arrow sprite,  but i see the problem is the sprite is PNG, not GIF.
I change the format and works properly.
Thanks for you help like always.
Is it this part? Because you set wait 190 and the first two enemies are at 150 ?

Code:
wait
at      190

spawn  bd2
alias   black_death_gang
coords  -100 230
at  150

spawn  bd4
alias   black_death_gang
coords  -50 240
at  150


spawn  bd3
alias   black_death_gang
coords  550 250
at  190
 
Yes, i see that and correct, but still crashing.
with the message:

"Ultimate 2D engine stopped working

Windows is looking for the solution"

This is the last update:

Code:
music		data/music/stage1-1.ogg
fglayer data/bgs/stage1-1/light.png -60 0 0 390 0 0 0 1 1 1 1 0 0 0 0
panel    	data/bgs/stage1-1/backgr.png

order           a


Wall  -31  241  0  0  352  0  33  280
Wall  1185  241  -349  0  1  -23  33  280


updatescript data/scripts/traileru.c

spawn1 205 30 10
spawn2 205 35 10
spawn3 205 40 10



type		0
settime		99
notime		0
stagenumber	1-1


#######################################

spawn  story
alias   stage_01
at  0



#-------1


group   2 2
at      0

wait
at      0

spawn  bd2
alias   black_death_gang
coords  -150 250
at  0

spawn  bd4
alias   black_death_gang
coords  550 250
at  0

spawn  bd2
alias   black_death_gang
coords  -50 270
at  0

spawn  bd4
alias   black_death_gang
coords  -100 250
at  0


#-------2

group   2 3
at      190

wait
at      190

spawn  bd2
alias   black_death_gang
coords  -100 230
	flip  1
at      190

spawn  bd4
alias   black_death_gang
coords  -50 240
at      190

spawn  bd3
alias   black_death_gang
coords  550 250
at  190

spawn  bd2
alias   black_death_gang
coords  -150 240
at  190

spawn  bd4
alias   black_death_gang
coords  -150 240
	flip  1
at  190

spawn  bd2
alias   black_death_gang
coords  -150 240
	flip  1
at  190


#-------3

group   3 3
at      250



spawn  bd4
alias   black_death_gang
coords  -50 240
	flip  1
at  250

spawn  bd2
alias   black_death_gang
coords  548 230  0
at  250


wait
at      333

spawn  bd3
alias   black_death_gang
coords  550 250
at  333

spawn  bd2
alias   black_death_gang
coords  -150 260
	flip  1
at  333

spawn  bd4
alias   black_death_gang
coords  520 240
at  333

spawn  bd3
alias   black_death_gang
coords  550 260
at  333


#-------3

group   3 3
at      402


spawn  bd2
alias   black_death_gang
coords  550 230
at  410

spawn  bd3
alias   black_death_gang
coords  -49 240  3
	flip  1
at  434

wait
at      484

spawn  bd4
alias   black_death_gang
coords  550 250
at  484

spawn  bd4
alias   black_death_gang
coords  520 240
at  484

spawn  bd2
alias   black_death_gang
coords  550 260
at  484

spawn  bd2
alias   black_death_gang
coords  -150 260  
at  484


#-------

spawn   trash
item	lifeup
coords  585 238
at      500

#-------4


group   3 3
at      673

wait
at      673


spawn  bd2
alias   black_death_gang
coords  550 230
at  673

spawn  bd3
alias   black_death_gang
coords  -50 240
	flip  1
at  673

spawn  bd2
alias   black_death_gang
coords  550 250
at  673

spawn  bd3
alias   black_death_gang
coords  -150 260
	flip  1
at  673

spawn  bd4
alias   black_death_gang
coords  520 240
at  673

spawn  bd1
alias   black_death_gang
coords  490 260
at  673
 
This turning more rare every time.

I discover the game no crash only when remove the Group and the wait.

I put only this and crash:
Code:
music		data/music/stage1-1.ogg
fglayer data/bgs/stage1-1/light.png -60 0 0 390 0 0 0 1 1 1 1 0 0 0 0
panel    	data/bgs/stage1-1/backgr.png

order           a


Wall  -31  241  0  0  352  0  33  280
Wall  1185  241  -349  0  1  -23  33  280


updatescript data/scripts/traileru.c

spawn1 205 30 10
spawn2 205 35 10
spawn3 205 40 10



type		0
settime		99
notime		0
stagenumber	1-1


#######################################

spawn  story
alias   stage_01
at  0



#-------1


group   2 2
at      0

wait
at      0

spawn  bd2
alias   black_death_gang
coords  -150 250
at  0

spawn  bd4
alias   black_death_gang
coords  550 250
at  0

spawn  bd2
alias   black_death_gang
coords  -50 270
at  0

spawn  bd4
alias   black_death_gang
coords  550 250
at  0

And this working normal:
Code:
music		data/music/stage1-1.ogg
fglayer data/bgs/stage1-1/light.png -60 0 0 390 0 0 0 1 1 1 1 0 0 0 0
panel    	data/bgs/stage1-1/backgr.png

order           a


Wall  -31  241  0  0  352  0  33  280
Wall  1185  241  -349  0  1  -23  33  280


updatescript data/scripts/traileru.c

spawn1 205 30 10
spawn2 205 35 10
spawn3 205 40 10



type		0
settime		99
notime		0
stagenumber	1-1


#######################################

spawn  story
alias   stage_01
at  0



#-------1



spawn  bd2
alias   black_death_gang
coords  -150 250
at  0

spawn  bd4
alias   black_death_gang
coords  550 250
at  0

spawn  bd2
alias   black_death_gang
coords  -50 270
at  0

spawn  bd4
alias   black_death_gang
coords  550 250
at  0

What's going on here?
 
Well my friend i try but nothing.
The enemies or this stage dont have scripts in the spawn animations, only in the simple death.  I remove but still crashing.

I thing the error must be in the updated.c

Here my update.c

Code:
#include "data/scripts/anititle.c"
#include "data/scripts/story/story_define.h"
#include "data/scripts/story.c"
#include "data/scripts/gettick.c"


void zoom()
{
   void vscreen = openborvariant("vscreen");
   int maxz=openborvariant("PLAYER_MAX_Z")+1000;
   int zoom_value=getglobalvar("zoomvalue");
   int zoom_x=getglobalvar("zoomx");
   int zoom_y=getglobalvar("zoomy");
   void ent=getglobalvar("zoomentity");
   int px=getentityproperty(ent,"x") +  zoom_x - openborvariant("xpos");
   int py=getentityproperty(ent,"z") + zoom_y - openborvariant("ypos") - getentityproperty(ent,"a");
   void zoom_scr = getglobalvar("zoomscreen");
   if(!zoom_scr){
      zoom_scr = allocscreen(openborvariant("hResolution"),openborvariant("vResolution"));
      setglobalvar("zoomscreen",zoom_scr);
   }
   clearscreen(zoom_scr);

   //draw what we need 
   drawspriteq(zoom_scr,0,openborconstant("MIN_INT"),maxz,0,0);
   //setup drawMethod
   changedrawmethod(NULL(),"reset",1);
   changedrawmethod(NULL(),"enabled",1);
   changedrawmethod(NULL(),"scalex",zoom_value);
   changedrawmethod(NULL(),"scaley",zoom_value);
   changedrawmethod(NULL(),"centerx",px);
   changedrawmethod(NULL(),"centery",py);
   //Draw the resized customized screen to main screen.
   drawscreen(zoom_scr,px,py, maxz+1);
   changedrawmethod(NULL(),"enabled", 0);
   drawspriteq(vscreen, 0, maxz+1,maxz+1, 0, 0);
   drawspriteq(vscreen, 0, maxz+2,openborconstant("MAX_INT"), 0, 0);
   clearspriteq();
}


void main(){
   if(getglobalvar("zoomentity"))
   {
      zoom();       
   }
      mainLoop();
}

void mainLoop(){
	void scene=openborvariant("current_scene");
	if(openborvariant("in_level"))
	{
		turnWhite();
		storySystem();
	}
	if(openborvariant("in_titlescreen")){
		if (scene!="data/scenes/intro.txt"){
			inTitleLoop(1);
		}
	}
	else {
		inTitleLoop(0);	
	}
}
 
I just remembered something, did you remove arrow.gif from sprites folder?

I think the crash is because engine tried to display that gif which is unavailable
 
You right my friend,  i dont have that sprite.
I try in the morning and confirm ok.
I go to sleep because it's too late here and have to work.
You are my hero friend.
Thanks!
 
Well my friend,  finally works perfect.
My mod have the arrow sprite,  but i see the problem is the sprite is PNG, not GIF.
I change the format and works properly.
Thanks for you help like always.
 
Solution
Odd, I thought I was using .png arrows. Will need to double check. If it is in the engine it will an easy fix, so it shouldn't be too hard to include with the next update.

DV
 
Back
Top Bottom