OpenBOR v3.0 Build 4316 (Windows/Wii/Android)

Status
Not open for further replies.

DCurrent

Site Owner, OpenBOR Project Leader
Staff member
It's new release time everyone! I'm not going to list every single one of the changes here, because I have a much, MUCH bigger release around the corner, but here are a few new goodies to tide you over.

Update, rev 4334

Download replaced. Includes following updates:

  • All previous updates (see thread)
  • The pointless total system memory display when Debug Performance option is enabled has been replaced with sprite que readout. If the number looks high to you, remember that text characters are also sprites.
  • I have confirmed sprite que is dynamically allocated, and increased the maximum allowed sprites to 5000.

Update, rev 4321

Download replaced. Includes following updates:

  • Debug menu looping issue fixed. Previously patched by White Dragon while I worked on a permanent fix - the long term version is now in place.
  • Position readouts now round to integer values for ease of reading and less sprite consumption (all on screen text characters are technically sprites).
  • Position readout now includes Base position.
  • Position readout now adapts to the font height.

Note on debug options - as the name implies they are meant for debugging, and are CPU intensive while active. There's no getting around this, so don't expect good performance on consoles or even some PCs. That's why you have the option of enabling them piecemeal instead of all at once.

Bug Fixes & Technical

  • Lots of cleanup in the menu code. Plenty more to do, but it's a start. This will let me fill requests like disabling Sound adjustments and other module specific customization. I've also rearranged the menu items so text no longer overlaps or flies out of the screen.
  • Some memory optimizations. Replaced several static substructures with pointers to the substructure, and only allocate memory for the entire substructure on use. Non tech folks: Basically, it means certain features aren't eating memory unless you actually use them.
  • A lot of code cleanup in general. I'm making a point to leverage more pointers (no pun intended). This has major implications, many you will see soon.

New Features & Updates

  • It's now possible to combine inline scripts with animation script libraries. Details are below.
  • New script operators:
    <<=
    >>=
    |=
    &=
    ^=
    ~
    (nice one White Dragon)
  • As above, the menu has been rearranged to look more professional. All options remain the same save one. The old Debug option now opens a sub menu with the following items:
    • Performance: Identical to the old old Debug option. When enabled, FPS and memory use are displayed in a black box at bottom of screen.
    • Position: Displays all on screen entities' offsets as a white dot, along with X,Y, and Z positions directly below. Text display uses font 0.
    • Collision Attack: Displays attack collision for all on screen entities as a red overlay.
    • Collision Body: Same as above, but for body boxes as a blue overlay.
    • Range: Same as above, but for for range (X and Y only). Overlay is green. Note that default ranges for most animations are quite large, especially on the vertical axis - so don't be shocked if you enable this and find your display coated in a sea of green.

Animation Script Upgrade

[quote author=White Dragon]
Now you can use animationscript event in file or in entity.txt and between animations and @cmd SIMULTANEOUSLY!!

Example now this script works and is VALID:
Code:
name	XXX
type	player

animationscript	data/scripts/animationscript.c

anim	WALK
	@script
		void self = getlocalvar("self");
		int frame = getlocalvar("frame");

    		if ( frame > 3 ) {
			changeentityproperty(self,"animpos",0);
    		}
	@end_script

	loop	1 0 8
	offset	14 61
	bbox	7 6 18 54
	delay	10
	frame	data/chars/leo/012.gif
	sound	data/sounds/step1.wav
	frame	data/chars/leo/013.gif
	frame	data/chars/leo/014.gif
	frame	data/chars/leo/015.gif
	frame	data/chars/leo/016.gif
	sound	data/sounds/step1.wav
	frame	data/chars/leo/017.gif
	frame	data/chars/leo/018.gif
	@cmd changeentityproperty getlocalvar("self") "animpos" 0
	frame	data/chars/leo/019.gif
	frame	data/chars/leo/019.gif

		delay 10
		offset  14  48
		bbox  14  2  30  41
	frame	data/chars/leo/rise05.gif
	frame	data/chars/leo/rise05.gif

because now all animationscript will be unified into ONE!
so like in that example:

animationscript data/scripts/animationscript.c
+
@script
void self = getlocalvar("self");
int frame = getlocalvar("frame");

    if ( frame > 3 ) {
changeentityproperty(self,"animpos",0);
    }
@end_script

+
@cmd changeentityproperty getlocalvar("self") "animpos" 0

it will be unified into ONE animationscript event.

It's fantastic because now you can choose to use script between animations (@script ... @end_script or @cmd) and script into an imported file (animationscript data/scripts/animationscript.c) SIMULTANEOUSLY!!
In previous builds you were forced to choose a way...
[/quote]

Debug Demo

This little video shows some of the new debug options in action.

https://www.youtube.com/watch?v=_al2LLThrCs

Download
 
Man, that debug option is AWESOME!. Its one of the key features I was missing in OpenBOR (mainly because the CLSN viewer).
Nice job!

Its possible to round it a tad? I don't think we need such precise numbers as 115.399719, since I am pretty sure 115.3 and 115.39 would not have any visual difference.
 
I can confirm this issue. My game doesn't even loads - it crashes right after I run the executable

Script error: data/chars/captain/shield.txt, line 1547: Invalid declaration(expected comma, semicolon or initializer?) '(' (in production 'decl')

void main()
        ^



Script error: data/chars/captain/shield.txt, line 1645: Unknown error '' (in production 'stmt_list2')


^



Script error: data/chars/captain/shield.txt, line 1645: Unknown error '' (in production 'comp_stmt3')


^


********** An Error Occurred **********
*            Shutting Down            *

Fatal Error in load_cached_model, file: data/chars/captain/shield.txt, line 60, message: Error parsing function main of animation script in file '%s'!
Total Ram: 4294967295 Bytes
Free Ram: 4294967295 Bytes
Used Ram: 29208576 Bytes

Release level data...........
Done!
Release graphics data........ Done!
Release game data............


Release game data............ Done!
Release timer................ Done!
Release input hardware....... Done!
Release sound system......... Done!
Release FileCaching System... Done!

**************** Done *****************

Fatal Error in load_cached_model, file: data/chars/captain/shield.txt, line 60, message: Error parsing function main of animation script in file '%s'!
 
eheh no bug, just your animationscript file has to finish with a new line. just it.
BTW I see to improve the function to work withount newline too.
 
eheh no bug, just your animationscript file has to finish with a new line. just it.
But this will break the compatibility with all older mods...for (sorry if I sound rude) not that useful feature?
 
O Ilusionista said:
eheh no bug, just your animationscript file has to finish with a new line. just it.
But this will break the compatibility with all older mods...for (sorry if I sound rude) not that useful feature?

dont worry, updated yet =)
sorry for this, but fixed yet.
wait some minute
The source is online yet  ;)


GOOD WORK DC for new debug!!
 
O Ilusionista said:
Man, that debug option is AWESOME!. Its one of the key features I was missing in OpenBOR (mainly because the CLSN viewer).
Nice job!

Piccolo said:
Hardcoded debug functions... that's good  8)

Thanks. I was against it for a long time, but the new options only cost us 12 bytes, and no CPU cycles at all unless they are turned on. But honestly, it's really for me... I needed a hard coded visual representation on screen to finish my next update.

It was originally just a temporary quick and dirty function for my own use, but since I had to write the code anyway, I figured why not polish up and leave it in for everyone?

Its possible to round it a tad? I don't think we need such precise numbers as 115.399719, since I am pretty sure 115.3 and 115.39 would not have any visual difference.

I can look into that. Truthfully there's probably no need for a decimal value at all, since the smallest unit you can adjust or see on screen is a single pixel. That said, I'll probably add velocity as an option too, which does need a fairly precise readout.

DC
 
Hi DC 2 questions:

1) How can I set the last uploaded build as default download? I uploaded 4317 but default is still 4316. (I set all default mirrors)
2) When you compile, do you use latest lib (sdl2 2.0.5 for windows and libogc 1.8.12 for wii)? I uploaded in tool latest libs ready to use  ;)
 
White Dragon said:
Hi DC 2 questions:

1) How can I set the last uploaded build as default download? I uploaded 4317 but default is still 4316. (I set all default mirrors)

Funny enough, I noticed that oversight in my instructions in the dev area and was going to update accordingly. In the files list, click on the information icon (the little round i). It will open a popup window. In the lower right of that popup look for Default Download For. Below that is a series of check boxes, and Select All. Click select all, and then press the Save button. That binary is now the default download.

2) When you compile, do you use latest lib (sdl2 2.0.5 for windows and libogc 1.8.12 for wii)? I uploaded in tool latest libs ready to use  ;)

I have the latest tools but have not changed any of my compile settings yet.

DC
 
Tnx DC!
For next times please compile with latest libs.
I wrote here my update:
http://www.chronocrash.com/forum/index.php?topic=3108.msg42255#msg42255
- updated win-sdk to win-sdk-SDL2-2.0.5
- updated devkitpro to devkitPro-libOGC-1.8.12

Uploaded into separated files for now.
For example

in tools/win-sdk you can find:
MinGW.7z (old one)
win-sdk-SDL2-2.0.5.7z (newest)

and in tools/devkitpro you can find:
devkitPro-libOGC-1.8.12.7z (newest)
devkitPro.7z (old one)


Ps. to compile latest Wii build used suppress: unused-local-typedefs

    typedef enum
    {
        POS_Y_0,
        POS_Y_1,
        POS_Y_2,
        POS_Y_3,
        POS_Y_4,
        POS_Y_5
    } e_items_pos_y;

e_items_pos_y is unused.

I added -Wno-unused-local-typedefs to BUILD_WII in makefile.
I dont know if you want to use e_items_pos_y in the future..
 
White Dragon said:

Yikes. I left that enum in by mistake. I'll take it out. Best not to suppress compile warnings, thanks for the catch.

DC
 
In the debug menu it doesn't go to Back if you try to go up on Performance, pressing down on Back will go to Performance though.

Sanctuary%20of%20Illusion%20-%200051.png
 
I tried the newest version and...no entity appears on the screen:
Avengers_United_Battle_Force_0000.png


edit: if I disable PERFORMANCE, the entities appears, but they flick a lot. And everything I draw using updated script flicks too (like the lines on health bar) and even non scripted things like powerbar

edit2: If I let only boxes active, everything runs fine.
 
O Ilusionista said:
edit: if I disable PERFORMANCE, the entities appears, but they flick a lot. And everything I draw using updated script flicks too (like the lines on health bar) and even non scripted things like powerbar

edit2: If I let only boxes active, everything runs fine.

Don't draw with updatedscript but use ondrawscript (like I wrote in PM).
 
Its a hud thing, I can't use ondrawscript.
by the way, I noticed the ammount of entites on the screen affects the performance while debug is active.
 
O Ilusionista said:
Its a hud thing, I can't use ondrawscript.
by the way, I noticed the ammount of entites on the screen affects the performance while debug is active.

mmm... I know the cause maybe...
With debug options ALL enabled the most mods have too sprites on screen defined by MAXQSPRITES.
Yes actually the limit is 600 (updated by me) before was 500.
Tested with 2000 and it works well.. but need some test to see the engine memory usage and understand well what is the RIGHT number of MAXQSPRITES.
 
Status
Not open for further replies.
Back
Top Bottom