He-Man

Complete HE-MAN 2019

No permission to download
Project is completed.
Yeah, i also think you should avoid platform entities if they are not really needed like in such stage. From my experience as well, more entities at once are more costly than more reall walls in a level. My most complex stages are having up to 26 walls in them and they don't seem to make any impact in performance. But spawn more entities at once in a level, it always had an performance impact. And by the way wider forgroud images may be larger in kb but they also not seem to be more "heavy" and especially in comperison to having more smaller ones instead.

So yeah, you should make the stage with walls and just with a fewer but wider forground images. This will definitely solve this performance issue!
By the way about platform entities, as i said it's always better to use them when really needed, like if you need a floating platform or something.

Edit: Now i also remember precsicly that i had some performence issues in my WH game when i was trying to spawn 50 obstacles at once in a small level. And many of them did not have any platforms, just obstacles, yet the stage was lagging a lot, so i scraped this idea because of that.
 
To further elaborate bWWd, I would use fglayers to display the blocks. Looks like each block is identical - so if you are very careful with your layer design and repeats/spacing, you'll be able to visually build the entire level with layers alone, all from a single "block" sprite.

Unlike magggas, I would not advise using large images. It's true that is more efficient than tons and tons of smaller ones attached to entities - but it's even MORE efficient to take advantage of layers and their ability to repeat a single image at set intervals. Think of it like the tiling system on old NES.

Then use walls to add the functionality. At that your stage will be optimal as it gets without getting fancy with scripting.

DC
 
Thanks, i cant use fglayers - theyre not affected by quake , also these walls need to overlap, cant be stack next to each other.In some cases they can..
Id have to test how noticeable it will be that quake is not affecting fglayers, and then decide.
 
Its not that, DC wanted me to use fglayers cause of its ability to loop the image/repeat it,
 
maxman said:
Why not use panel type entity but with some setlayer setting like it's fglayer?
Correct me if I am wrong, but is because even some entities been optimized (IOW they have "less logics" by default, like panel and type none), they are still entities and they cost more than a fglayer.
Fglayer is just an image - an extra sprite (almosrt everything is a sprite to the engine*) the engine will be displaying, nothing too much fancy than that (unless you use transparency, water effect, etc).

Even if you use those transformations, its consumes less resources because there isn't much logic involved with it. There is no collision detect, no entity enumeration, etc.

* Damon Caskey I know font characters are counted as sprites, but how about dots, lines and boxes drawm by script? They count as sprites in overall sprite count limit?

 
bWWd said:
Thanks, i cant use fglayers - theyre not affected by quake , also these walls need to overlap, cant be stack next to each other.In some cases they can..
Id have to test how noticeable it will be that quake is not affecting fglayers, and then decide.

bWWd, ahh, but they ARE affected by quake. There is an undocumented setting (very last parameter) that turns on quake for the layer. :)

O Ilusionista said:
Correct me if I am wrong, but is because even some entities been optimized (IOW they have "less logics" by default, like panel and type none), they are still entities and they cost more than a fglayer...

Exactly. Layers are less powerful than entities, but also less resource intensive and have a few features meant to help you with level design (like the repeats and transform effects). Entities can do that stuff too, but it requires more know how. fglayers have it right out of the box. The only time you want panel entities are when you need animations or certain logic that only entities can do.

* Damon Caskey I know font characters are counted as sprites, but how about dots, lines and boxes drawm by script? They count as sprites in overall sprite count limit?

No, IIRC direct drawing does not affect the sprite que - but they will eventually slow the framerate to a crawl. :)


DC
 
Thanks for the explanations.

Damon Caskey said:
ahh, but they ARE affected by quake. There is an undocumented setting (very last parameter) that turns on quake for the layer. :)

AHHHHHH that is good to know. But fglayers has so much parameters that is kinda hard to work with.
 
Damon Caskey said:
You'll note Roel pointed out he avoids them in his platform games. Floating points are expensive (but they are needed for precision since OpenBOR is a 3D world).

Wow, someone remembered something I said!  ;D

It wasn't so much the floating point numbers that caused trouble in my platform game engine, but the conversion between floating points and integers. This was an optimisation bottleneck, because such conversions can be slow and in a grid-based game, lots of them are required because positions have to be used as array indices. Additionally, the version of GCC I was using at the time was trying a little too hard to optimise those conversions away (which is a kind way of saying it had a stupid bug which caused erroneous float-int conversions). Anyway, I replaced the floating points with fixed points, which convert to integers much faster because they basically already are integers. And also I stopped using GCC.

If you find that floating points are making your code slow, counterintuitively, the solution may be to use more floating points. The slowest operations are often the ones involving a mix of floats and ints. If you're not already doing this, using floats for bounding boxes - even though they are always made from whole numbers - could actually speed things up.
 
bWWd said:
New release (2019)
https://www.youtube.com/watch?v=OhmiXN0s0AM&feature=youtu.be

Comes with map of Eternia, Versus Fighting mode, shooting/riding stages and Giant Bosses.
He-Man, Man-At-Arms, BattleCat, Sorceress, Skeletor, Evil-Lyn, She-Ra , Ram-Man , Teela and Lion-O are playable now.

Download: https://gamejolt.com/games/he-man/19434

----------------------------------------

I couldnt edit first post of original thread cause i didnt created it so i made new one.
I'm releasing demo, 9 stages and one boss, so you could see where it's all going, have fun with it, android and windows :
http://gamejolt.com/games/action/he-man/19434/

Openbor for other platforms if needed:
https://www.dropbox.com/sh/gv17zu4f543ft6x/mdBDaZqByz/releases

fRo63jm.gif

I dont know if download section was fixed or not so im using other links to share it.
Archive contains openbor for windows and android + touch.txt for android touch button config (move it to saves folder in your openbor folder on android device)

How do you keep up with what levels you have beaten in the world map I can never remember which ones I have baten until I click on the lol

Also is Triclops in the game? I think he was great. Stratos, Zodac and Man-E-Faces Psiclone and Roboto would make could playable characters...especially since Stratos flies, Psi Clone action figure had an awesome move where his waste would spin and make a little tornado that would be a great attack if it were possible
 
bWWd said:
Its not that, DC wanted me to use fglayers cause of its ability to loop the image/repeat it,
Damon Caskey  O Ilusionista
I don't know if its undocumented or maybe i don't understand how to use it yet, but entities can be repeated using drawmethod parameters too, aren't they?
 
oldyz said:
bWWd said:
Its not that, DC wanted me to use fglayers cause of its ability to loop the image/repeat it,
Damon Caskey  O Ilusionista
I don't know if its undocumented or maybe i don't understand how to use it yet, but entities can be repeated using drawmethod parameters too, aren't they?

No oldyz, auto repeat only works only panels and layers. Technically it's possible to repeat an entity visually by using screens, but in almost every case that's way more complex to bother with for a simple repeat. Just spawn another identical entity and be done with it. Save screens for reflections, picture in picture and other special effects.

DC
 
OK i started to work on labirynth walls, but how do i get fglayer of bglayer to be displayed at certain Z, so player can stand behind the image, and when walks down hes in front of the image, you know like typical z offset.
So far fglayer is always in front on player and bglayer is behind panel, both wont help me unless there is a way to display stage graphics at specific Z coordinate.
 
bWWd said:

bWWd,

Here's an excerpt from the file that runs this stage. It's all done with fglayers. Basically, you just have to experiment with different Zpos settings to fine tune it.


Code:
loadingbg    data/bgs/wilder/loading.png  -80 -240 480 0 -100
# Wilderness
music        data/music/wilder~1
bossmusic       data/music/battle~1
direction     both
updatedscript    data/levels/wilderne/updated.c

# Stage movement
# bgspeed    speed    direction
bgspeed            4     1
rock        0

# Default layers. Background is hidden and just serves as a palette placeholder since
# displaying it (the background) with fglayer command gives more fine control.
# background    filepath            xratio    zratio    xoffset    zoffset    xspace    zspace    xrepeat    zrepeat    trans    alpha    w-mode    amp    wl    ws    move    quake    neon
background    data/bgs/wilder/clouds_0.png     0     0     0     0     0     0     0     0     0    0    0    0    0    0    0

# panel        filepath (main)            filepath (neon)    filepath (blended)
panel        data/bgs/wilder/stage_0.png     none         none   
order        a

# Additional layers. I like to use fglayer vs. bglayer because
# you get fine control over the layer positon.

# fglayer    filepath                    Zpos     xratio    zratio    xoffset    zoffset    xspace    zspace    xrepeat    zrepeat    trans    alpha    w-mode    amp    wl    ws    move    quake    neon
fglayer        data/bgs/wilder/clouds_0.png            -400    0.9    0.9    0.5    0    0    0    -1    1    0    0    3    4    1    0    0.5
fglayer        data/bgs/wilder/hills_0.png            -399    0.82     0.82     0     56     0    0      -1     1     1      
fglayer        data/bgs/wilder/hills_1.png            -398    0.74     0.74     0     59     0    0      -1     1     1      
fglayer        data/bgs/wilder/field_1.png            -397    0.66    0.66     0     62     0    0      -1     1     1
fglayer        data/bgs/wilder/field_0.png            -397    0.66    0.66     0     69     0    0      -1     1     1    0    3    1    3    0    0
fglayer        data/bgs/wilder/trees_5.png            -396    0.5     0.5     0     0     20    0      -1     1     1      
fglayer        data/bgs/wilder/trees_4.png            -395    0.42     0.42     81     0     81    0      -1     1     1
fglayer        data/bgs/wilder/trees_3.png            -394    0.34     0.34     7     0     14    0      -1     1     1
fglayer        data/bgs/wilder/trees_2.png            -393    0.26     0.26     38     0     18    0      -1     1     1   
fglayer        data/bgs/wilder/trees_1.png            -392    0.19     0.19     41     0     0    0      -1     1     1      
fglayer        data/bgs/wilder/trees_0.png            -391    0.1     0.1     112     -6     50    0      -1     1     1      
fglayer        data/bgs/wilder/bush_0.png             300    -0.3     -0.3     0     210     0    0      -1     1     1      
fglayer        data/bgs/wilder/debris_1.png             301    -0.5     -0.5     50     215     50    0      -1     1     1      
fglayer        data/bgs/wilder/debris_0.png             302    -0.7     -0.7     0     215     30    0      -1     1     1      

# Additional palettes

# Palette    filepath                alpha1    alpha2    alpha3    alpha4    alpha5    alpha6
palette     data/bgs/wilder/morning_0.act         0     0     0     0     0     0
palette     data/bgs/wilder/morning_1.act         0     0     0     0     0     0
...
 
yeah i was onto something when you posted, thnks ! i dont know if its related to resolution or what, ill figure it out.
I had yo use like -900

This worked for me:
Code:
fglayer  data/sprites/mur3.gif  -1580 0 0 -100 -100 200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/mur3.gif  -1380 0 0   250 100 200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/mur3.gif  -1180 0 0 -200 300 -200 -1 3 1 1 0 0 0 0 0 0 1


fglayer  data/sprites/mur3.gif  -980 0 0 250 500 -200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/mur3.gif  -780 0 0 -300 700 200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/mur3.gif  -580 0 0 250 900 200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/mur3.gif  -380 0 0 -500 1100 200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/mur3.gif  -180 0 0 250 1300 -100 -1 2 1 1 0 0 0 0 0 0 1
###################

fglayer  data/sprites/lawb.gif  -1480 0 0 1850 -50 1200 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/lawb.gif  -1280 0 0 950 150 250 -1 2 1 1 0 0 0 0 0 0 1


fglayer  data/sprites/lawb.gif  -1080 0 0 250 350 960 -1 3 1 1 0 0 0 0 0 0 1

fglayer  data/sprites/lawb.gif  -880 0 0 1420 550 800 -1 2 1 1 0 0 0 0 0 0 1



fglayer  data/sprites/lawb.gif  -680 0 0 1420 750 350 -1 2 1 1 0 0 0 0 0 0 1



fglayer  data/sprites/lawb.gif  -480 0 0 1400 950 600 -1 2 1 1 0 0 0 0 0 0 1 


fglayer  data/sprites/lawb.gif  -280 0 0 1400 1150 1800 -1 2 1 1 0 0 0 0 0 0 1

I have no clue how this gets calculated at the moment but it works, i just got one right and changed the rest accordingly making first Z smaller/bigger, when z offset got bigger then i had to make that ifrst Z smaller.So there is a relation to them for sure.I dont think manual covers that.

--
OK i converted the stage succesfully.Works great.IT wasnt as hard as i thought, openborstats wall preview helped a lot and it has fglayers placement correctly .
36aJq.gif

----
New version is on gamejolt
https://gamejolt.com/games/he-man/19434
 
O Ilusionista said:
Wombat2112 the version for the ps classic is not official - it wasn't made by us. So we can't offer much support, sorry.

Oh no thank you I didn't even factor that in. It's actually cool that it even works on a console. I only discovered open bor by playing this thing called Autobleem and Retroarch on the PS classic until then I never even heard of it lol....then that's how I found He-man and GI Joe and a Marvel game. The guy that helped port em said something about "choke points" building up over time.  Thanks for pointing that out. I only got into emulation and things like Open Bor about 6 months ago. I noticed when I played on the pc vs the console I had no way of knowing which levels I had beat also.
 
Wombat2112 yeah some games won't work well on Raspberry pi build, since it uses non official codes and some stuff isn't finished yet. In some cases, you have to use a specific version for that build - this is wants happens with my Avengers game (you have to use a custom version - called mini classic demo - to be able to play it on those mini/classic consoles.)
 
Back
Top Bottom