Message Board


Message Board > Site bugs/ideas > DIV to Fenix port tutorial...

January 3, 2006, 18:51
Tovi
I love you!
75 posts

Since most of this site is actually about DIV and Fenix, and since most members are (and future members will be) old-DIV users, I think it'd be handy if we somehow made a guide to port your old DIV games to Fenix.

http://www.booleansoup.com/ind … opic&id=190 -> I think most incompatibilities will have some kind of workaround to them.

All it would require is for everyone to round up their old DIV games, and see what errors they produce. Like this:

Code:

Save() -> Needs only two variables instead of three.
        WORKAROUND: Remove last variable (I think).
load() -> Doesn't need "offset" or "&" in front of variables.
        WORKAROUND: Remove "offset" or "&".
Arrays -> Arrays can't be defined outside of BEGIN-END.
          WORKAROUND: Declare array outside of BEGIN-END, and define it inside.
        WORKAROUND 2: Use load() inside BEGIN-END to load-up array, which you can save with save().
CASE   ->   A case can't end with a ";", use ":" instead.
DRAW() -> Doesn't exist in Fenix.
        WORKAROUND: ??



[Edited on January 3, 2006 by Tovi]
____________
Zombie Robot Ninja Pirate Battlefield Extreme!!!
#
January 3, 2006, 20:00
Woody
HEAD BLACK MAN
722 posts

Fenix's drawing commands are there, just different.

Oh and HELLO TOVI

[Edited on January 3, 2006 by Woody]
____________
boredome is the bitter fruit of too much routine
#
January 3, 2006, 22:26
Tovi
I love you!
75 posts

That's excellent news...

Ok, so one more question: I used the lightFX.dll to get different effects for transparency (when flags=4 I mean). When I try to import LightFX.dll, it says it's not compatible with Fenix.

Any way around that? Those LightFX sure were a nice effect... I'd hate to see them go.

And HELLO BACK TO YOU TO! I just played Turbulence. And it's awesome, as usual.

[Edited on January 3, 2006 by Tovi]
____________
Zombie Robot Ninja Pirate Battlefield Extreme!!!
#
January 3, 2006, 22:50
Tovi
I love you!
75 posts

Another difference found:

Unload_map needs 2 variables (file and graph) instead of just 1 (graph).
____________
Zombie Robot Ninja Pirate Battlefield Extreme!!!
#
January 3, 2006, 23:13
Tovi
I love you!
75 posts

Screen_copy() function seems to be missing... Not essential, but I did use it for a nice wipe effect during level change. Oh well...
____________
Zombie Robot Ninja Pirate Battlefield Extreme!!!
#
January 4, 2006, 02:14
Rincewind
programmer
1545 posts

Tovi, dll's are not compatible.

And checking the differences between DIV and fenix is dead easy, just check both their documentations.

In case you didn't have these urls yet:

DIV 2 documentation
Official Fenix documentation(spanish because it's more updated than the english version, it doesn't matter much)
Flaming bird docs
Flamingbird WIKI

Happy day to you.

[Edited on January 4, 2006 by Rincewind]
____________
Personal website: http://www.loijson.com
#
January 4, 2006, 03:17
Sandman
F3n!x0r
1194 posts

Screen_copy() is get_screen() I think.

For the DLL part, get the C(++) sourcecode and build your own DLL for Fenix. Hmm I might build some quickstart about Fenix and DLL's. Hmmmmmm.

Oh and save() and load() have the same 'problems'.

Keep posting errors, sure someone has a solution.
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#
January 4, 2006, 08:46
Tovi
I love you!
75 posts

Rincewind -> It's not just a matter of a couple of syntax problems. There are structural differences too.

Like, in DIV, the roll_palette() command would cause you to cancel any fading effects. In Fenix, it doesn't. That took me a while to figure out.

Like I stated in a different topic: Debugging in Fenix is a pain.

Sandman -> I'll try get_screen(), but the function isn't the same as screen_copy it would seem, as screen_copy would let you specify where you copied your screen into, whereas get_screen randomly puts your screenshot "somewhere". Hmmm...
____________
Zombie Robot Ninja Pirate Battlefield Extreme!!!
#
January 4, 2006, 13:22
Sandman
F3n!x0r
1194 posts

For debugging use the console. The say( <string msg> ); function in Fenix displays <msg> in the console. Also it has some commands, like GLOBALS, PRIVATES <id or name of process>, LOCALS [<id or name of process>], INSTANCES, basic variable manipulation and more.

Get_screen():
Code:
global
my_map;
begin
my_map = get_screen();
save_png(0,my_map,"SCREENSHOT.PNG");
end

Not random, Fenix makes much use of the 0 FPG. The my_map identifier here will probably be 1000, since it's the first map in the memorypart of 0 FPG. The next one will have 1001, 1002, 1003, etc...

[Edited on January 4, 2006 by Sandman]
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#
January 6, 2006, 23:49
Tovi
I love you!
75 posts

Am I blind, or is there no function in Fenix to check the length of a string? Is there any way around this?
____________
Zombie Robot Ninja Pirate Battlefield Extreme!!!
#
January 7, 2006, 00:07
Fiona
games are terrible
-9616558 posts

strlen()

[edit]

TELL A LIE. Yes Fenix is stupid, it's len(string innit).

[Edited on January 7, 2006 by Fiona]
____________
laffo
#

Message Board > Site bugs/ideas > DIV to Fenix port tutorial...

Quick reply


You must log in or register to post.
Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!