Trying to fix "Beat em up ultimate alliance"

devshark

New member
prelude, for context:
i'm not playing openbor on a PC, i'm doing it on a powkiddy rgb20s device. so i dont really know which version of openbor it's running.

the actual problem:
i'm trying to fix one game, however it's crashing - i need help in figuring out why it's crashing so i can fix that too.
for what it's worth, i can't really update openbor on the device, since i'm using openbor on the powkiddy rgb20s device. the game in question is beat em up ultimate alliance (ᐈ Beat Em Up Ultimate Alliance OpenBOR - 【 OpenBOR Games 2023 】)

i figured out it's crashing on the device for two reasons:
1) too much rain which slows it down to a halt on data/levels/br_st2c.txt - i can fix that easily.
2) something else just makes it crash on that same level... and i don't know what. turning on logging in the and i dont know where to locate the log

it seems to work fine on PC, using openbor 3.0, built Jan 26, 2017 - the level is beatable. however the rgb20s device is much less powerful so it could be due to discrepancy of the openbor used, or the raw computing power necessary to process whatever happens shortly after first screen.


one way to figure out whats going on is by commenting out everything that goes on in the level, then uncommenting things one by one until i find what breaks it, however that doesn't sound very efficient.
 
It doesn't crash if you reduce the content, and I'm speculating from a gamer: there was too much content originally, and the machine didn't have enough memory.
Hopefully a more professional person will answer this.

By the way, here's the configuration info I searched for:

Powkiddy RGB20S Specifications
  • 3.5″ IPS OCA Display (640 x 480)
  • RK3326 1.5Ghz Quad-Core Processor
  • 1GB RAM 1GB 内存
  • 3500 MAH Battery (5+ Hours)
  • WiFi
  • 3.5mm Headphone Jack
 
1GB RAM is way more than enough to run any OpenBOR game ever made several times over.

I don't know much (anything) about the Powkiddy, but issues like this usually just come down to some janky unofficial port we have nothing to do with.

DC
 
That system uses OpenLinux as OS, so they are using probably a very old Linux version on it. As Dc said, it's now an unofficial port, so we can't do much.

Also, that system uses a 4:3 screen, so when running a 16:9 on it, it will squeeze the image a lot - and you will lose performance for it.

POWKIDDY-RGB20S-Handheld-Game-Console-Retro-Game-Players-Open-Source-System-3-5-4-3-IPS.jpg_.webp

the vendor claims it can run N64 emulation, so it should have enough power to run OpenBOR.

I have a RG505 (Android based) and it runs perfectly :) I remember when I had an OpenLinux one (I can't remember the name), it was a nightmare to run some games.
 
hm, if we're gonna go technical, it's using retroarch frontend, on a unofficial OS which started as a fork of JELOS :D
the thing about running n64 is... debatable. however it can run some ps1 games pretty nicely, while some others lag like hell.

it runs dreamcast shenmue just fine though.

that being said, when I removed the number of spawned rain sprites (especially droplets), the performance went back to being great. yet the weird issue still persists, so i'll hunt it down the old fashion way.

but the interesting bit is, the game worked fine until this level. even when i change the level ordering (to make st2c the first level) it crashes very soon after starting it, so I don't think it's a memory issue, it could be some other issue or a syntax error or some other problem that the interpreter just can't manage. but commenting everything out *should* get rid of the problem, no? then pinpoint what exactly was the culprit...

I guess the tl;dr is - be happy with what games it can run, try to fix the ones that cant, if you can't fix em just move on to the next one.

so this is much less about "having power to run OpenBOR" but rather this one game, where doing specials drop the FPS into single digits. OpenBOR works fine for the most part. As do alot of other good games on it. /shrug
but the really really good ones, like Knights of the round annihilation - just crash during initial load. i thought too it was a memory issue, but without logs i'm just searching in the dark.

EDIT: lol, ok so when i comment alot of the stuff out, i just skip that level :D i need to comment out by blocks instead.
 
Last edited:
but without logs i'm just searching in the dark.

When you say without log, did you mean openborlogs didn't mention the error message?

so when i comment alot of the stuff out, i just skip that level

Sounds like you've disabled alot of stuffs. Isn't there any stuff (aside of background, music, wait and grouping) which works without crashing?

Also is data/levels/br_st2c.txt the only problematic level?
 
that being said, when I removed the number of spawned rain sprites (especially droplets), the performance went back to being great. yet the weird issue still persists, so i'll hunt it down the old fashion way.
That game was made over @Kratus SORX and dunno if this code is the same on that version, but if so, I am using the same rain code on my game and it slows downs even the windows build.
 
When you say without log, did you mean openborlogs didn't mention the error message?
yes, thats exactly what i'm saying. openbor doesn't produce a log. or if it does produce it, i'm unable to find it.

Sounds like you've disabled alot of stuffs. Isn't there any stuff (aside of background, music, wait and grouping) which works without crashing?

Also is data/levels/br_st2c.txt the only problematic level?
well, yes and no. when i leave some enemies, i just beat them up and beat the level.
yes - i disabled alot of stuff, and when i start reenabling enemies piece by piece, the crash creeps back in. it's not a simple case of "this enemy breaks the game", but the crash happens in the middle of the beating.
no - i dont know if it's the only problematic level, but given that it's the sixth level - its the first one that given me problems.

then i uncomment more of them, and i get this weird crash sometimes. I'm unable to pin down the repro steps.
so far it's been the only problematic level... i'm thinking i should just get rid of the level and see what comes down the line. maybe something is corrupted in it and i'm unable to track it down, maybe more problematic levels come my way in which case it might be best to explore other games whether they have this behaviour.

the crash is not even consistent. sometimes i beat the level with this shrunken set of enemies. sometimes i get the crash before i kill the first enemy or the first batch.

That game was made over @Kratus SORX and dunno if this code is the same on that version, but if so, I am using the same rain code on my game and it slows downs even the windows build.
the rain code is garbage, for now i'm just keeping the "big rains" in several places and got rid of all the droplets and that nets you a tremendeous speedup.
Ideally, i'd like to refactor the rain code so that instead of spawning five big rains with 4-5 droplets each, i just spawn one big rain with maybe 2-3 droplets that follow the player.

but the droplets seem to be very expensive yet don't yield anything, their cost simply severly outweights their benefit as they're a rather small, unimportant detail on the level.
because the "rain code" just spawns one big rain and 8 droplets on every 600 pixels. so 9 animations times 3 'screens' is 27 rain-related actors that just unnecessarily hog performance, when it's just the big rains that set the whole mood and atmosphere.

EDIT: i'll tinker with it, but if i'm unable to figure out the root cause, i'll just try commenting out the whole level from the levels.txt and see if i get a crash on some other level. if i end up beating the whole game without crashing then screw that one level. if the crash happens on later levels then i'll really need to figure out where the logs end up being created so i can get an idea of whats causing it. maybe it's corrupted memory, maybe it's a script error, maybe it's some other who-knows-what.

for now, i'm using this:
```
background data/bgs/Br02/back03.gif #1 1 0 0 0 0 1 1 1 6
panel data/bgs/Br02/pn03.gif none none
frontpanel data/bgs/Br02/Front03.gif
#frontpanel data/bgs/st1/fpn02.gif
#frontpanel data/bgs/st1/fpn02.gif
#frontpanel data/bgs/st1/fpn03.gif
order a
music data/music/Lv2b.ogg
settime 99
scrollspeed 0.5
stagenumber 2
spawn1 191 17 300
spawn2 242 5 300
spawn3 239 26 300
spawn4 190 35 300

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

light 128 -128
at 0

shadowcolor 2
at 0

shadowalpha 6
at 0

spawn St1_Rain
flip 1
coords 1 200
at 0

#spawn St1_Drop1
#flip 1
#coords 100 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 140 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 180 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 220 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 260 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 300 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 340 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 400 240
#at 0

#--------------------------------
spawn St1_Rain
flip 1
coords 638 200
at 0

#spawn St1_Drop1
#flip 1
#coords 738 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 778 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 818 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 858 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 898 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 938 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 978 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1038 240
#at 0

#-------------------
spawn St1_Rain
flip 1
coords 1275 200
at 0

#spawn St1_Drop1
#flip 1
#coords 1375 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1415 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 1455 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 1495 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 1535 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1575 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 1615 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1675 240
#at 0


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

Wall -32 275 10 0 131 189 30 124
Wall 1705 200 -40 0 424 434 30 192

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


spawn Rio
flip 1
coords 0 4
at 0

spawn Box
coords 595 242
at 0

spawn Box
coords 699 263 0
at 0

spawn Donovan_Wait4
flip 0
coords 500 270 0
at 301

spawn gneiss_wait0
Alias Gneiss
coords 500 240 0
at 301

group 4 4
at 400

wait
at 400

spawn Jack0
flip 1
coords -5 270 0
at 400


spawn Mic
Map 2
flip 1
coords 600 270 0
at 400


spawn Billy1
Alias Billy
map 1
flip 1
coords 600 270 0
at 400

spawn Gneiss
flip 1
coords 600 270 0
at 400

spawn Rubby
Map 1
flip 1
coords 600 270 0
at 400

#2pspawn Elmer1
#alias elmer
#flip 1
#coords 600 270 0
#at 400
#
#2pspawn miC
#flip 1
#coords 600 270 0
#at 400
#
#3pspawn Mic
#flip 1
#coords 600 270 0
#at 400
#
#
#3pspawn BasicX0
#flip 1
#coords 600 270 0
#at 400
#
#spawn Rio
#flip 1
# coords 0 4
# at 401
#
#spawn Drum
# coords 1070 246
# at 401
#
#spawn Drum
# coords 1009 246
# at 401
#
#spawn Billy1
#alias Billy
#flip 1
#coords -20 270 0
#at 500
#
#
#spawn Rubby1
#map 2
#flip 1
#coords 600 270 0
#at 500
#
#group 1000 1000
#at 600
#
#wait
#at 600
#
#spawn Gneiss
#flip 1
#coords -40 270 0
#at 600
#
#spawn BasicX0
#flip 1
#coords -30 270 0
#at 600
#
#2pspawn Mic
#map 2
#flip 1
#coords 600 270 0
#at 600
#
#2pspawn BasicX1
#flip 1
#coords -50 270 0
#at 600
#
#3pspawn Billy1
#map 2
#flip 1
#coords 600 270 0
#at 600
#
#
#3pspawn BasicX0
#flip 1
#coords -100 270 0
#at 600
#
#
#spawn Biker_bomb
#flip 1
#coords 428 192 0
#at 601
#
#spawn Biker_bomb
#flip 1
#coords 555 192 0
#at 601
#
#spawn Biker_bomb
#flip 1
#coords 826 210 0
#at 601
#
#spawn Gneiss
#Map 2
#flip 1
#coords -40 270 0
#at 700
#
#spawn Gneiss
#flip 1
#coords -30 270 0
#at 800
#
#2pspawn BasicX0
#flip 1
#coords 600 270 0
#at 900
#
#2pspawn Mic
#flip 1
#coords -50 270 0
#at 900
#
#3pspawn BasicX0
#flip 1
#coords 600 270 0
#at 900
#
#
#3pspawn Billy1
#flip 1
#coords -100 270 0
#at 900
#
#spawn Elmer0
#Alias Elmer
#coords 600 265 0
#at 1500
#
#spawn Billy0
#alias Billy
#coords 600 260 0
#at 1500
#
#spawn Billy1
#alias Ryuji
#map 6
#coords -10 250 0
#at 1500
#
#2pspawn BikerX
#coords 600 260 0
#at 1500
#
#3pspawn Billy0
#coords 600 260 0
#at 1500
#
#4pspawn BikerX
#coords -10 250 0
#at 1500
#
#spawn BasicX1
#flip 1
#coords -40 270 0
#at 1500
#
#spawn Billy0
#alias Billy
#flip 1
#coords -30 270 0
#at 1500
#
#2pspawn BasicX0
#flip 1
#coords 600 270 0
#at 1500
#
#2pspawn BasicX1
#flip 1
#coords -50 270 0
#at 1500
#
#3pspawn Mic
#flip 1
#coords 600 270 0
#at 1500
#
#
#3pspawn BasicX1
#flip 1
#coords -100 270 0
#at 1500

```
and the crash is still reproducible. i dont know how to repro it, i just go to the right and beat them up, and it usually happens at some point when i punch a guy. i'm also suspecting that maybe it's these 2p/3p spawns, but like i said - without logs i'm just hunting in the dark. with the log i'd have an idea of what to look for and narrow my search.
 
Last edited:
Kinda harsh words here, huh?
no mate, i'm a professional software engineer. sometimes i write crappy "get the job done quick" code that somewhat affect the performance (that gets fixed tomorrow or on the same week/next monday), but if you really allow yourself to let the barely-visible droplet elements tank performance then you really have to admit that it's garbage and in dire need of fixing asap.

there's simply no excuse. the words are simply fair and on point.

however if it's against ToC then i can refrain from them in the future. but i'm not attacking any person here, i'm merely stating the objectively measurable performance degradation whose root cause is that garbage code. it's just that and nothing else. i'm merely calling a spade - a spade. releasing that to the public is simply unacceptable.
 
That game was made over @Kratus SORX and dunno if this code is the same on that version, but if so, I am using the same rain code on my game and it slows downs even the windows build.
@O Ilusionista I don't know exactly what version of the rain code you are using, but in the current version I only noticed a small fps drop in a very old Android device I have.
Maybe it can be related to the engine version too, once @DCurrent made many optimizations in the v4.0 (the one I'm currently using).

Also I'm keep trying to replicate the issue you reported related to the suposed collision with rain entities, but so far no success. I have some things to test yet but I'm thinking that it can be related to the antigravity property I have declared in all entities, maybe there's some connection.

Another possibility I'm considering is the fact the rain spawn script spawnScreenRXZ is calling the spawn01, maybe using the native
spawn() directly can improve the performance, I will test it.


In case you want to take a look at the code, I posted below.

Rain spawner
C:
name            St1_Rain_Spawn
type            panel
shadow            0
speed            5
scroll            -0.5
antigravity        100
animationscript    data/scripts/animation/default.c

load            St1_Rain 3

anim spawn
    loop    0
    delay    4
    offset    25 25
    @cmd sound "data/sounds/sor2_rain.wav"
    frame    data/bgs/sor2/st1c/rain00.png
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    frame    data/bgs/sor2/st1c/rain00.png
    @cmd looper 1 100
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    frame    data/bgs/sor2/st1c/rain00.png

anim idle
    loop    1 1 3
    delay    4
    offset    25 25
    @cmd musicBoss
    frame    data/bgs/sor2/st1c/rain00.png
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    frame    data/bgs/sor2/st1c/rain00.png
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    @cmd spawnScreenRXZ "St1_Rain" 0 0 0 250 350 50 50
    frame    data/bgs/sor2/st1c/rain00.png

C:
name            St1_Rain
type            none
shadow            0
alpha            1
animationscript    data/scripts/animation/default.c

anim idle
    landframe 1
    loop    0
    delay    -1000
    offset    25 25
    @cmd dasher 1.6 -4 0.2
    frame    data/bgs/sor2/st1c/rain01.png
        delay    4
    frame    data/bgs/sor2/st1c/rain02.png
    frame    data/bgs/sor2/st1c/rain03.png
    frame    data/bgs/sor2/st1c/rain04.png
    @cmd suicide
    frame    data/bgs/sor2/st1c/rain04.png

C:
void spawnScreenRXZ(void name, float fX, float fY, float fZ, float xR1, float xR2, float zR1, float zR2)
{//Spawn entity at Random location relative to xPos and zPos (NEW SOR1 RAIN)
    void vSpawn;
    void self    = getlocalvar("self");
    float xPos    = openborvariant("xpos");
    float xR    = rand()%xR1+xR2; //RANDOM XPOS
    float zR    = rand()%zR1+zR2; //RANDOM ZPOS
    
    fX = fX+xPos+xR; //CHANGES POSITION RELATIVE TO XPOS
    fZ = fZ+zR; //CHANGES POSITION RELATIVE TO ZPOS
    vSpawn = spawn01(name, fX, fY, fZ);
}

no mate, i'm a professional software engineer. sometimes i write crappy "get the job done quick" code that somewhat affect the performance (that gets fixed tomorrow or on the same week/next monday), but if you really allow yourself to let the barely-visible droplet elements tank performance then you really have to admit that it's garbage and in dire need of fixing asap.

there's simply no excuse. the words are simply fair and on point.

however if it's against ToC then i can refrain from them in the future. but i'm not attacking any person here, i'm merely stating the objectively measurable performance degradation whose root cause is that garbage code. it's just that and nothing else. i'm merely calling a spade - a spade. releasing that to the public is simply unacceptable.
@devshark No matter how much knowledge you have in software, you will need to learn about how the engine works. Although the logic is similar to C, there's some differences when writing a code.
 
yes, thats exactly what i'm saying. openbor doesn't produce a log. or if it does produce it, i'm unable to find it.


well, yes and no. when i leave some enemies, i just beat them up and beat the level.
yes - i disabled alot of stuff, and when i start reenabling enemies piece by piece, the crash creeps back in. it's not a simple case of "this enemy breaks the game", but the crash happens in the middle of the beating.
no - i dont know if it's the only problematic level, but given that it's the sixth level - its the first one that given me problems.

then i uncomment more of them, and i get this weird crash sometimes. I'm unable to pin down the repro steps.
so far it's been the only problematic level... i'm thinking i should just get rid of the level and see what comes down the line. maybe something is corrupted in it and i'm unable to track it down, maybe more problematic levels come my way in which case it might be best to explore other games whether they have this behaviour.

the crash is not even consistent. sometimes i beat the level with this shrunken set of enemies. sometimes i get the crash before i kill the first enemy or the first batch.


the rain code is garbage, for now i'm just keeping the "big rains" in several places and got rid of all the droplets and that nets you a tremendeous speedup.
Ideally, i'd like to refactor the rain code so that instead of spawning five big rains with 4-5 droplets each, i just spawn one big rain with maybe 2-3 droplets that follow the player.

but the droplets seem to be very expensive yet don't yield anything, their cost simply severly outweights their benefit as they're a rather small, unimportant detail on the level.
because the "rain code" just spawns one big rain and 8 droplets on every 600 pixels. so 9 animations times 3 'screens' is 27 rain-related actors that just unnecessarily hog performance, when it's just the big rains that set the whole mood and atmosphere.

EDIT: i'll tinker with it, but if i'm unable to figure out the root cause, i'll just try commenting out the whole level from the levels.txt and see if i get a crash on some other level. if i end up beating the whole game without crashing then screw that one level. if the crash happens on later levels then i'll really need to figure out where the logs end up being created so i can get an idea of whats causing it. maybe it's corrupted memory, maybe it's a script error, maybe it's some other who-knows-what.

for now, i'm using this:
```
background data/bgs/Br02/back03.gif #1 1 0 0 0 0 1 1 1 6
panel data/bgs/Br02/pn03.gif none none
frontpanel data/bgs/Br02/Front03.gif
#frontpanel data/bgs/st1/fpn02.gif
#frontpanel data/bgs/st1/fpn02.gif
#frontpanel data/bgs/st1/fpn03.gif
order a
music data/music/Lv2b.ogg
settime 99
scrollspeed 0.5
stagenumber 2
spawn1 191 17 300
spawn2 242 5 300
spawn3 239 26 300
spawn4 190 35 300

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

light 128 -128
at 0

shadowcolor 2
at 0

shadowalpha 6
at 0

spawn St1_Rain
flip 1
coords 1 200
at 0

#spawn St1_Drop1
#flip 1
#coords 100 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 140 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 180 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 220 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 260 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 300 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 340 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 400 240
#at 0

#--------------------------------
spawn St1_Rain
flip 1
coords 638 200
at 0

#spawn St1_Drop1
#flip 1
#coords 738 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 778 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 818 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 858 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 898 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 938 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 978 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1038 240
#at 0

#-------------------
spawn St1_Rain
flip 1
coords 1275 200
at 0

#spawn St1_Drop1
#flip 1
#coords 1375 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1415 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 1455 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 1495 240
#at 0

#spawn St1_Drop1
#flip 1
#coords 1535 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1575 250
#at 0

#spawn St1_Drop1
#flip 1
#coords 1615 260
#at 0

#spawn St1_Drop1
#flip 1
#coords 1675 240
#at 0


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

Wall -32 275 10 0 131 189 30 124
Wall 1705 200 -40 0 424 434 30 192

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


spawn Rio
flip 1
coords 0 4
at 0

spawn Box
coords 595 242
at 0

spawn Box
coords 699 263 0
at 0

spawn Donovan_Wait4
flip 0
coords 500 270 0
at 301

spawn gneiss_wait0
Alias Gneiss
coords 500 240 0
at 301

group 4 4
at 400

wait
at 400

spawn Jack0
flip 1
coords -5 270 0
at 400


spawn Mic
Map 2
flip 1
coords 600 270 0
at 400


spawn Billy1
Alias Billy
map 1
flip 1
coords 600 270 0
at 400

spawn Gneiss
flip 1
coords 600 270 0
at 400

spawn Rubby
Map 1
flip 1
coords 600 270 0
at 400

#2pspawn Elmer1
#alias elmer
#flip 1
#coords 600 270 0
#at 400
#
#2pspawn miC
#flip 1
#coords 600 270 0
#at 400
#
#3pspawn Mic
#flip 1
#coords 600 270 0
#at 400
#
#
#3pspawn BasicX0
#flip 1
#coords 600 270 0
#at 400
#
#spawn Rio
#flip 1
# coords 0 4
# at 401
#
#spawn Drum
# coords 1070 246
# at 401
#
#spawn Drum
# coords 1009 246
# at 401
#
#spawn Billy1
#alias Billy
#flip 1
#coords -20 270 0
#at 500
#
#
#spawn Rubby1
#map 2
#flip 1
#coords 600 270 0
#at 500
#
#group 1000 1000
#at 600
#
#wait
#at 600
#
#spawn Gneiss
#flip 1
#coords -40 270 0
#at 600
#
#spawn BasicX0
#flip 1
#coords -30 270 0
#at 600
#
#2pspawn Mic
#map 2
#flip 1
#coords 600 270 0
#at 600
#
#2pspawn BasicX1
#flip 1
#coords -50 270 0
#at 600
#
#3pspawn Billy1
#map 2
#flip 1
#coords 600 270 0
#at 600
#
#
#3pspawn BasicX0
#flip 1
#coords -100 270 0
#at 600
#
#
#spawn Biker_bomb
#flip 1
#coords 428 192 0
#at 601
#
#spawn Biker_bomb
#flip 1
#coords 555 192 0
#at 601
#
#spawn Biker_bomb
#flip 1
#coords 826 210 0
#at 601
#
#spawn Gneiss
#Map 2
#flip 1
#coords -40 270 0
#at 700
#
#spawn Gneiss
#flip 1
#coords -30 270 0
#at 800
#
#2pspawn BasicX0
#flip 1
#coords 600 270 0
#at 900
#
#2pspawn Mic
#flip 1
#coords -50 270 0
#at 900
#
#3pspawn BasicX0
#flip 1
#coords 600 270 0
#at 900
#
#
#3pspawn Billy1
#flip 1
#coords -100 270 0
#at 900
#
#spawn Elmer0
#Alias Elmer
#coords 600 265 0
#at 1500
#
#spawn Billy0
#alias Billy
#coords 600 260 0
#at 1500
#
#spawn Billy1
#alias Ryuji
#map 6
#coords -10 250 0
#at 1500
#
#2pspawn BikerX
#coords 600 260 0
#at 1500
#
#3pspawn Billy0
#coords 600 260 0
#at 1500
#
#4pspawn BikerX
#coords -10 250 0
#at 1500
#
#spawn BasicX1
#flip 1
#coords -40 270 0
#at 1500
#
#spawn Billy0
#alias Billy
#flip 1
#coords -30 270 0
#at 1500
#
#2pspawn BasicX0
#flip 1
#coords 600 270 0
#at 1500
#
#2pspawn BasicX1
#flip 1
#coords -50 270 0
#at 1500
#
#3pspawn Mic
#flip 1
#coords 600 270 0
#at 1500
#
#
#3pspawn BasicX1
#flip 1
#coords -100 270 0
#at 1500

```
and the crash is still reproducible. i dont know how to repro it, i just go to the right and beat them up, and it usually happens at some point when i punch a guy. i'm also suspecting that maybe it's these 2p/3p spawns, but like i said - without logs i'm just hunting in the dark. with the log i'd have an idea of what to look for and narrow my search.
@devshark
I looked at this code and it seems the author who modified my game repeated the rain spawner too many times. The original code works with just one instance of the rain spawner, like this.

C:
load        St1_Rain_Spawn 3
load        St1_Ray 3
load        St1_Thunder 3
load        Trash 3

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

spawn        St1_Rain_Spawn 1
flip        1
coords        -60 200 200
at            0

spawn        St1_Ray 1
flip        1
coords        1 1
at            0

spawn        St1_Thunder 1
flip        1
coords        1 1
at            0
 
@devshark No matter how much knowledge you have in software, you will need to learn about how the engine works. Although the logic is similar to C, there's some differences when writing a code.
looks like that's right if i'm to fix this.

@devshark
I looked at this code and it seems the author who modified my game repeated the rain spawner too many times. The original code works with just one instance of the rain spawner, like this.
my intention here isn't to bash and/or trashtalk you people, or even review your code and have some sort of dick measuring contest. i'm here to hopefully get support on fixing this issue.

i understand very well how calling a piece of code garbage - especially in this particular case where the second author broke it - can feel like a personal attack, but believe me, there were no personal attacks, i'm sorry if i offended you or you felt like i was spitting in your direction, i don't know who the original author is, i don't know if it was great and then broken or just broken from the start. the thing that i saw was unnecessarily copypasted many times over. like even performing the special slows the game down.

but, those are all "later" problems. the current problem is resolving crashes. then i can deal with "later" problems that unnecessarily tank performance.
 
looks like that's right if i'm to fix this.


my intention here isn't to bash and/or trashtalk you people, or even review your code and have some sort of dick measuring contest. i'm here to hopefully get support on fixing this issue.

i understand very well how calling a piece of code garbage - especially in this particular case where the second author broke it - can feel like a personal attack, but believe me, there were no personal attacks, i'm sorry if i offended you or you felt like i was spitting in your direction, i don't know who the original author is, i don't know if it was great and then broken or just broken from the start. the thing that i saw was unnecessarily copypasted many times over. like even performing the special slows the game down.

but, those are all "later" problems. the current problem is resolving crashes. then i can deal with "later" problems that unnecessarily tank performance.
Speaking about the technical aspect of your thread, keep in mind that you can have some challenges on the way in order to fix this game.

First, this Beat em Up Alliance is a modified version of a very old version of my SOR2X game v1.2 or v1.3 (around 2018 if I'm not wrong), which contains many unfinished things. In Addition, this other modder made many edits with different procedures than mine and may have made some mistakes due to not understanding how and why I coded certain things.

The device you are trying to adapt is not supported officially, and after many years working with low hardware ports like psp/dreamcast I can say that there's a high chance of you having a memory issue. The effects you described are similar to I had with Dreamcast ports, I needed to hugely reduce the content in order to make it work, otherwise crash every time as soon as the memory is full.

As a dev you know that sometimes it's easier to start a code from scratch than understanding other people's codes and trying to fix/modify it. Unless you want this game too much, I don't know if it deserves the effort.

Anyway, we need more info about the crashes. I didn't see the log posted here, it would be helpful too.
 
As a dev you know that sometimes it's easier to start a code from scratch than understanding other people's codes and trying to fix/modify it. Unless you want this game too much, I don't know if it deserves the effort.
Actually, the game is actually rather nice, has a nice roster, plays nice. The issues don't strike me as "hardly fixable" and most of them look like a bunch of tiny things here and there. I suspect that the root cause of the problem(s) are a bunch of brainfart mistakes rather than some tough problem. But digging deeper will tell. At the very least, it's an interesting hobby... :)
The device you are trying to adapt is not supported officially, and after many years working with low hardware ports like psp/dreamcast I can say that there's a high chance of you having a memory issue. The effects you described are similar to I had with Dreamcast ports, I needed to hugely reduce the content in order to make it work, otherwise crash every time as soon as the memory is full.
I figured that much from DCurrent's response. But i also hink this is less of a "using who knows what port on who knows what hardware" problem (not dismissing it either) but since OpenBOR is already a part of retroarch, and this JELOS-based UnofficialOS using RetroArch as frontend - if it were really that sort of problem, then all (openbor) games would crash.
I've played games with much more "content" (enemy spam) and they didn't crash. I can chalk it up to the problems not having 100% repro rate, or maybe it's the alternative - maybe it's just this project doing something very very wrong which is causing the crashes.

As far as the memory goes, that was my first suspect too. However, after turning on the debug settings, i paid attention to the (memory) numbers at the bottom of the screen. At no point did memory drop below 1gb, yet the game still crashed. Which leads me to believe it's a segmentation fault / pointers stepping on memory they shouldn't rather than a OOM. I don't know if that's possible, but since this looks like C, it may very well be.

I even reassured myself that it's probably not a OOM by reproducing the crash even when this stage is rearranged to be the first stage, with far fewer enemies. It can smell like a OOM after beating five stages full of enemies then landing on the 6th one which happens to run out of it, but playing that same level, with one third of enemies uncommented, and hitting the crash? It can't be an OOM. It's gotta be something else.

Thats why i suspect some sort of "rookie mistake" somewhere rather than a fundamentaly broken codebase in need of a rewrite.

Anyway, we need more info about the crashes. I didn't see the log posted here, it would be helpful too.
That's the thing, and one of the reasons I came here. I don't know where logs end up. However, I'm gonna ask the OS guys that same question. at least i'll double my chances of having an idea where to look for them.

not getting any debug logs is the reason why i'm trying the "needle in a haystack" approach with commenting stuff out, checking that enemy-i-just-uncommented has all necessary files and looks alright there and so on. tedious unnecessary work.

So the question is - where does OpenBOR normally put it's logs? in the /openbor/ folder, where all of it's roms/paks are? or some place else?
 
since OpenBOR is already a part of retroarch
When? Is there an OpenBOR core for Retroarch?

then all (openbor) games would crash
Many OpenBOR games use a very low percentage of the engine capabilities and stay at the surface using the native functions. Things start to change when a game goes beyond this limit and uses too many scripts, because some functions used in newer builds are not present in previous builds, causing the engine to crash.

Considering the amount of script I always used in the SOR2X, it's not a surprise if this game (or any clone) is crashing in unofficial engine builds. The content amount is not always directly related with how they are coded, you may run well games with a lot of simple content and not run well games with a few of complex content.

So the question is - where does OpenBOR normally put it's logs? in the /openbor/ folder, where all of it's roms/paks are? or some place else?
You can find the logs at the "data/logs/OpenBorLog.txt"
 
When? Is there an OpenBOR core for Retroarch?
Yes. UnofficialOS emulators and game engines

I dont know if it made upstream to retroarch but... it's here. It even points to DCurrent's repo. And works relatively fine. Tho i admit, i probably need to spend a few more dozen hours with openbor just so i can say "all other games are stable" for certain. the few hours i have spent with openbor and some games... this is the only one that crashes.

Or... maybe this SA means standalone, while RA means retroarch. I admit, i don't know.

Many OpenBOR games use a very low percentage of the engine capabilities and stay at the surface using the native functions. Things start to change when a game goes beyond this limit and uses too many scripts, because some functions used in newer builds are not present in previous builds, causing the engine to crash.

Considering the amount of script I always used in the SOR2X, it's not a surprise if this game (or any clone) is crashing in unofficial engine builds. The content amount is not always directly related with how they are coded, you may run well games with a lot of simple content and not run well games with a few of complex content.
Perhaps that's why i can't even run GALegends or GAMyth or some of the fancier titles. To be fair, i don't even know which version of openbor core I have on this OS, i'll probably need to flash to a newer version and maybe the problem goes away. Or it becomes worse. Since only the cores get tampered with, usually for the better.

But question remains - this game doesn't have any fancy code/scripts in it's levels. Why did it wait until this particular level to start crashing? I believe that's a lead worth exploring... even though time would be much better spent trying to track down the logs.

You can find the logs at the "data/logs/OpenBorLog.txt"
ok, there is no such folder. Lemme see what the OS guys have to say about where would those logs end up.
 
I don't know if that's possible, but since this looks like C, it may very well be.

I haven't reviewed most of this thread in detail, but I can give a definitive answer to this: Yes. OpenBOR Script is weak typed, but it can and does use pointers. Most of the time you're messing with native engine objects, but it's easy enough to let a NULL or some other invalid pointer slip through if you're not careful.

One of the more common mistakes is trying to reference an entity pointer that the engine has removed from play.

DC
 
Back
Top Bottom