Fixel

magic

Active member
3rd Party Module Dev
3rd Party Tool Dev
Joined
Mar 5, 2018
Messages
252
I see a Fixel link from Cerberus / 3rd party module main homepage. https://www.cerberus-x.com/wordpress/modules/
It is an interesting module with several great sample. This is one of them:
- http://lab.devolonter.ru/libs/monkey-flixel/mode/html5.html


I download the banana sample from here
But I cannot run any of the sample because it for MX I think. I try to convert using @MikeHart tool but still cannot.
This is the one error report that always come:
Cerberus Runtime Error : TypeError: Cannot read property 'p_NewInstance' of null
D:/Dropbox/cerberus-v2018-12-30/modules_ext/flixel/flxgame.monkey<573>
D:/Dropbox/cerberus-v2018-12-30/modules_ext/flixel/flxgame.monkey<141>
D:/Dropbox/cerberus-v2018-12-30/modules/mojo/app.cxs<89>
 
Same problem in Monkey X87b. That will be fun to debug.
 
So far no success. This module is heavily relying on the Reflection module. And in theory it should work, but it doesn't so either something broke in Monkey times already or the current source code of fixel is broken.
 
Tq Mike for trying. One thing for sure that I don't know about is Reflection ;) I means, what are they? hmmm
 
To compile Flixel:

1. Hashes like "#REFLECTION_FILTER" needs to be above Import.

For example bunny.monkey banana:

Cerberus:
Import src.bunnymark

#REFLECTION_FILTER="src*"
#MOJO_IMAGE_FILTERING_ENABLED=False
#ANDROID_SCREEN_ORIENTATION="landscape"
#FLX_WEBGL_ENABLED=True

Function Main()
    New BunnyMark()
End Function

Needs to be:

Cerberus:
#REFLECTION_FILTER="src*"
#MOJO_IMAGE_FILTERING_ENABLED=False
#ANDROID_SCREEN_ORIENTATION="landscape"
#FLX_WEBGL_ENABLED=True

Import src.bunnymark

Function Main()
    New BunnyMark()
End Function

2. Need to change the alias name in flxu.monkey:

From:

Cerberus:
Alias MonkeyAbs = monkey.math.Abs
Alias MonkeyFloor = monkey.math.Floor
Alias MonkeyCeil = monkey.math.Ceil
Alias MonkeyMin = monkey.math.Min
Alias MonkeyMax = monkey.math.Max
Alias MonkeyGetClass = reflection.GetClass

To:

Cerberus:
Alias MonkeyAbs = cerberus.math.Abs
Alias MonkeyFloor = cerberus.math.Floor
Alias MonkeyCeil = cerberus.math.Ceil
Alias MonkeyMin = cerberus.math.Min
Alias MonkeyMax = cerberus.math.Max
Alias MonkeyGetClass = reflection.GetClass

3. If you want the webgl, you can get it from https://github.com/devolonter/mojo-html5-gl and put it in flixel/native/webgl. If not you can set #FLX_WEBGL_ENABLED=False, but may be slow.

Here is a screenshot of collisions.monkey:

flixel-collisions.png

Hope it helps.
 
Judt the replacement of the filter made it work? Wow.
 
Thank you @Ferdi for awesome help. Working Great!! :):):)
@MikeHart , I use your tool and convert to CX.

Anyone can download this CX version
 

Attachments

  • flixel_for_cx.zip
    3.4 MB · Views: 291
Works fine here, great! Hopefully all the modules that are out there can be rescued and used at some point.
 
Back
Top Bottom