I'm working on to adapt the game Final Fight PC 2018 for the Sega Dreamcast (OpenBor 4111). Dreamcast only has 16mb of Ram.
To the play game from start to finish, needed to unload the sprites from the levels. i did it, but it's not working! For example, take the first level slums.txt. I do unload sprites command load 3 in the slums.txt, after passing the level sprites are unloaded, but the memory is still used more than at the start of the game. If i pass several levels, the game freezes, as the memory is over! Why it's happened?
slums.txt
To the play game from start to finish, needed to unload the sprites from the levels. i did it, but it's not working! For example, take the first level slums.txt. I do unload sprites command load 3 in the slums.txt, after passing the level sprites are unloaded, but the memory is still used more than at the start of the game. If i pass several levels, the game freezes, as the memory is over! Why it's happened?
slums.txt
Code:
music data/music/a_slums1.ogg
background data/bgs/slums/back.gif
panel data/bgs/slums/n01.gif
order a
settime 50
blocked 0
wall 775 195 106 110 252 252 32 200
wall 908 269 83 110 252 252 69 200
wall -96 414 83 110 933 890 198 137
wall 707 223 200 215 224 223 25 191
wall 687 291 83 110 252 252 69 200
updatescript data/scripts/X/deathx.c
spawn1 35 18
spawn2 35 0
spawn3 35 30
spawn walk_special
coords 35 192
at 0
spawn walk_special
2pspawn 1
coords 35 170
at 0
spawn walk_special
3pspawn 1
coords 35 222
at 0
spawn damnd_jessica_
flip 1
coords 275 196
at 0
spawn dug_intro
alias DUG
coords 260 210
at 0
spawn dug_intro
alias dug
coords 230 185
at 0
spawn slum_c01
flip 1
coords 0 235 200
at 0
spawn drumcans
flip 1
coords 130 180
at 0
spawn TEL._BOOTH
item Yen
coords 450 182
at 0
spawn dustbin
item Whisky
2pspawn 1
coords 750 182
at 0
spawn dustbin
item Chicken
coords 790 182
at 0
spawn dustbin
item hamburger
coords 830 182
at 0
spawn dustbin
item Knife_
coords 905 217
at 0
spawn dug
alias dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW3"));
} @end_script
coords 318 176
at 10
group 6 6
at 170
wait
at 170
spawn door_open
flip 1
coords 158 155
at 170
spawn dug
alias dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 182 176
at 170
spawn dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 182 176
at 170
spawn dug
alias dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 182 176
at 170
spawn dug
alias dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
2pspawn 1
flip 1
coords 182 176
at 170
spawn j
coords -270 200
at 170
spawn j
2pspawn 1
coords -170 220
at 170
spawn dug
3pspawn 1
coords -90 200
at 170
spawn dug
alias dug
3pspawn 1
coords 490 210
at 170
group 1 1
at 170
spawn go
flip 1
coords 20 290
at 170
group 5 5
at 171
spawn j
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW2"));
} @end_script
coords 350 178
at 171
spawn j
coords -160 200
at 171
spawn j
2pspawn 1
coords -350 210
at 171
spawn j
3pspawn 1
coords 570 210
at 171
spawn dustbin
item Diamond
coords 390 182
at 171
spawn dustbin
item Gold__Bar
coords 430 182
at 171
wait
at 350
group 1 1
at 350
spawn go
flip 1
coords 20 310
at 350
group 5 5
at 600
spawn door_open
flip 1
coords 32 155
at 450
spawn dug
alias dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 56 176
at 450
spawn dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 56 176
at 450
spawn dug
alias dug
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 56 176
at 450
spawn dug
alias dug
2pspawn 1
@script void main() {
performattack(getlocalvar("self"), openborconstant("ANI_FOLLOW5"));
} @end_script
flip 1
coords 56 176
at 450
wait
at 600
spawn dug
alias dug
coords -170 198
at 600
spawn dug
2pspawn 1
coords -80 208
at 600
spawn axl
coords -100 190
at 600
spawn HOLLY__WOOD_50
alias HOLLY__WOOD
coords -30 196
at 600
spawn j
2pspawn 1
coords -120 210
at 600
spawn HOLLY__WOOD_50
alias HOLLY__WOOD
3pspawn 1
coords -220 200
at 600
group 1 1
at 660
spawn stair_wall
flip 1
coords 268 338 0
at 660
spawn walk_down
coords 285 192
at 660
spawn end_level
flip 1
coords 305 245
at 667
load Walk_Special 3 data/chars/misc/spawner/walk_special.txt
load Damnd_Jessica_ 3 data/chars/damnd/damnd_jessica/damnd_jessica_.txt
load Dug_intro 3 data/chars/dug/dug_intro.txt
load Slum_C01 3 data/chars/misc/map/slum_c01.txt
load Drumcans 3 data/chars/misc/obstacle/drumcans.txt
load Tel._Booth 3 data/chars/misc/obstacle/telephone_booth.txt
load Dustbin 3 data/chars/misc/obstacle/dustbin.txt
load Hamburger 3 data/chars/misc/food/hamburger.txt
load Dug 3 data/chars/dug/dug.txt
load Door_Open 3 data/bgs/slums/door_open.txt
load J 3 data/chars/j/j.txt
load Go 3 data/chars/misc/go/go.txt
load Axl 3 data/chars/axl/axl.txt
load Holly__Wood_50 3 data/chars/holly_wood/holly_wood_50.txt
load Stair_Wall 3 data/bgs/slums/stair_wall.txt
load Walk_Down 3 data/chars/misc/spawner/walk_down.txt
load End_Level 3 data/chars/misc/spawner/end_level.txt
load Yen 3 data/chars/misc/point/yen.txt
load Whisky 3 data/chars/misc/food/whisky.txt
load Chicken 3 data/chars/misc/food/chicken.txt
load Knife_ 3 data/chars/misc/weapon/knife_.txt
load Gold__Bar 3 data/chars/misc/point/goldbar.txt
load Diamond 3 data/chars/misc/point/diamond.txt