Fixel

magic

Active Member
3rd Party Tool Dev
Joined
Mar 5, 2018
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>
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
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.
 

magic

Active Member
3rd Party Tool Dev
Joined
Mar 5, 2018
Tq Mike for trying. One thing for sure that I don't know about is Reflection ;) I means, what are they? hmmm
 

Ferdi

Member
3rd Party Target Dev
Joined
Jun 21, 2017
To compile Flixel:

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

For example bunny.monkey banana:

Cerberus X:
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 X:
#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 X:
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 X:
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.
 

Rob Hewitt

Member
Joined
Aug 30, 2017
Works fine here, great! Hopefully all the modules that are out there can be rescued and used at some point.
 
Top Bottom