• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

fantomX - A game framework for Cerberus X (mojo2)

Status
Not open for further replies.

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,597
Hello

this is my game framework called fantomX. It is using mojo2, so you can only use it with Cerberus X targets that mojo2 supports.

To download it, go to its GitHub release page here: https://github.com/MikeHart66/fantomX/releases

It ships will numberous examples and a good sized documentation which you can also find here: http://fxdocs.fantomgl.com/

fantomX currently supports the following features:
  • Various objects like images, tile maps, graphic primitives, sounds, collision zones, scenes and layers.
  • Automatic processes to create, update and render objects.
  • Callback methods which are called during the handling of an object, layer, timer and transitions.
  • Layer transitions with callback methods.
  • Extensive handling methods for the engine's objects.
  • Object transitions for position, rotation, scaling and alpha values with callback methods.
  • Several equation and ease types for object and layer transitions.
  • Object timers with callback methods.
  • Different collision methods for objects with callback methods.
  • Touch input handling with callback methods.
  • Organize your objects in layers.
  • Automatic content scaling via providing a virtual canvas setup.
  • Simple high-score list loading, saving and updating.
  • Simple sound loading which handles the proper file extension depending on the chosen platform.
  • Support for bitmap font text objects which load EzGUI font descriptions.
  • Build-in frames per second calculator.
  • Simple camera/view support which you can move around to render parts of your scenery.
  • Support for texture maps (atlas) created by the tool TexturePacker.
  • Support for tile maps created by the tool Tiled.
  • Embedded object informations inside a Tiled map will be imported and are accessable.
  • Engine time scaling supporting object updates, timers and transitions.
  • Automatic swipe gesture detection with event method.
  • Path/Waypoint handling. Let your objects follow them.
  • A* pathfinding und user definable grids of nodes. It doesn't have to be a grid of squares!
  • Integration of Box2D powered physics including ray casting. Physics definition created by the tool PhysicsEditor are supported too.
  • Localize your game easily with easy support of multiple languages.
  • Support different key maps for different controllers or user definitions.
  • Easy scene/room management.
  • Objects can be composed of several single images.
  • Automatic object pooling.
  • Custom GUI elements.
  • Support for 9-slice image scaling.
 
I get a compile error :(
Code:
TRANS cerberus compiler V2017-07-31
Parsing...
Modpath error - import=monkey.map, existing=monkey.list
Semanting...
D:/Cerberus/modules_ext/fantomX/cftAStar.monkey<27> : Error : Duplicate identifier 'list' found in module 'xml' and module 'cerberus'.
 
Mmh,weird. The pathfinding example works perfectly here. WHAT did you try to compile?

Scrap that, the Github version behaves differently then what I have here. I will look into this.
 
Last edited:
Ok, in the fantomX/xml/xml.monkey file, change the import to monkey.list and monkey.map like this:

upload_2017-8-31_6-21-41.png
 
Original file wich gave me the compile error
Code:
Import monkey.list
Import monkey.Map

Also tried this with a bunch of errors
Code:
Import cerberus.list
Import cerberus.map
 
The second one gives me this
Code:
TRANS cerberus compiler V2017-07-31
Parsing...
Semanting...
Translating...
Building...
g++  -m64  -O0 -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Debug64/main.o ../main.cpp
../main.cpp:22123:30: error: expected initializer before '-' token
 extern c_cGame* bb_BallPuzzle-FantomX__g;
                              ^
../main.cpp:152681:23: error: expected initializer before '-' token
 c_cGame* bb_BallPuzzle-FantomX__g;
                       ^
../main.cpp: In function 'int bbMain()':
../main.cpp:152685:12: error: 'bb_BallPuzzle' was not declared in this scope
  gc_assign(bb_BallPuzzle-FantomX__g,(new c_cGame)->m_new());
            ^
../main.cpp:152685:26: error: 'FantomX__g' was not declared in this scope
  gc_assign(bb_BallPuzzle-FantomX__g,(new c_cGame)->m_new());
                          ^
../main.cpp: In function 'int bbInit()':
../main.cpp:209508:2: error: 'bb_BallPuzzle' was not declared in this scope
  bb_BallPuzzle-FantomX__g=0;
  ^
../main.cpp:209508:16: error: 'FantomX__g' was not declared in this scope
  bb_BallPuzzle-FantomX__g=0;
                ^
../main.cpp: In function 'void gc_mark()':
../main.cpp:209654:12: error: 'bb_BallPuzzle' was not declared in this scope
  gc_mark_q(bb_BallPuzzle-FantomX__g);
            ^
../main.cpp:209654:26: error: 'FantomX__g' was not declared in this scope
  gc_mark_q(bb_BallPuzzle-FantomX__g);
                          ^
mingw32-make: *** [build/Debug64/main.o] Error 1
Makefile:59: recipe for target 'build/Debug64/main.o' failed
TRANS FAILED: Error executing 'mingw32-make CCOPTS=" -m64  -O0" LDOPTS=" -m64  -L../openal/libs/Win64 -L../curl/lib/Win64" OUT="Debug64/CerberusGame"', return code=2
 
I think this has nothing to do with fantomX but how you named something there. there is a minus sign.

Can I see the cxs source?
 
Sorry, mi bad.
I was testing this in an existing project folder.
Not sure if that has anything to do with it but i created a new one and got it to compile for android and win32.

Compiling for win64 gave me an error.
Code:
TRANS cerberus compiler V2017-07-31
Parsing...
Semanting...
Translating...
Building...
g++  -m64  -O0 -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Debug64/main.o ../main.cpp
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/as.exe: build/Debug64/main.o: too many sections (36461)
D:\CerberusProjects\FantomXTest\FantomXTest.buildv2017-07-31\glfw3\gcc_winnt\build\Debug64\ccAnQSze.s: Assembler messages:
D:\CerberusProjects\FantomXTest\FantomXTest.buildv2017-07-31\glfw3\gcc_winnt\build\Debug64\ccAnQSze.s: Fatal error: can't write build/Debug64/main.o: File too big
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/as.exe: build/Debug64/main.o: too many sections (36461)
D:\CerberusProjects\FantomXTest\FantomXTest.buildv2017-07-31\glfw3\gcc_winnt\build\Debug64\ccAnQSze.s: Fatal error: can't close build/Debug64/main.o: File too big
mingw32-make: *** [build/Debug64/main.o] Error 1
Makefile:59: recipe for target 'build/Debug64/main.o' failed
TRANS FAILED: Error executing 'mingw32-make CCOPTS=" -m64  -O0" LDOPTS=" -m64  -L../openal/libs/Win64 -L../curl/lib/Win64" OUT="Debug64/CerberusGame"', return code=2
 
Well, mingw32 compiling for 64???? I don't think this is possible. I have only the 64 bit version of mingw installed. Works fine here.
 
Here is the output I get:

Code:
"C:/Users/Micha/Desktop/FantomMonkey/Cerberus/bin/transcc_winnt" -target=Desktop_Game_(Glfw3) -config=Release -run "C:/Users/Micha/Desktop/FantomMonkey/Cerberus/modules_ext2/fantomX/examples/BaseScript/BaseScript.monkey"

TRANS cerberus compiler V2017-07-31

Parsing...

Semanting...

Translating...

Building...

gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/context.o ../glfw3/src/context.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/egl_context.o ../glfw3/src/egl_context.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/init.o ../glfw3/src/init.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/input.o ../glfw3/src/input.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/monitor.o ../glfw3/src/monitor.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/osmesa_context.o ../glfw3/src/osmesa_context.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/vulkan.o ../glfw3/src/vulkan.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/wgl_context.o ../glfw3/src/wgl_context.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/win32_init.o ../glfw3/src/win32_init.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/win32_joystick.o ../glfw3/src/win32_joystick.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/win32_monitor.o ../glfw3/src/win32_monitor.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/win32_time.o ../glfw3/src/win32_time.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/win32_thread.o ../glfw3/src/win32_thread.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/win32_window.o ../glfw3/src/win32_window.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/window.o ../glfw3/src/window.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/stb_vorbis.o ../stb/stb_vorbis.c
gcc -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/stb_image.o ../stb/stb_image.c
g++ -m64 -O3 -DNDEBUG -Wno-free-nonheap-object -I../curl/include -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release64/main.o ../main.cpp
g++ -m64 -L../openal/libs/Win64 -L../curl/lib/Win64 -Wl,--subsystem,windows -o Release64/CerberusGame build/Release64/context.o build/Release64/egl_context.o build/Release64/init.o build/Release64/input.o build/Release64/monitor.o build/Release64/osmesa_context.o build/Release64/vulkan.o build/Release64/wgl_context.o build/Release64/win32_init.o build/Release64/win32_joystick.o build/Release64/win32_monitor.o build/Release64/win32_time.o build/Release64/win32_thread.o build/Release64/win32_window.o build/Release64/window.o build/Release64/stb_vorbis.o build/Release64/stb_image.o build/Release64/main.o -lcomdlg32 -lgdi32 -lopengl32 -lOpenAL32 -lcurldll -lws2_32

Done.
 
i get an error when compiling in cerberusx " xml and cerberusx module have identical list" ??
 
Hi!
I just enjoyed an XMas discount on https://www.codeandweb.com/physicseditor which I may use in a new small(?) (side-?)project using Box2D physics and FantomX, seeing that you Mike wrote an exporter for it, which is great. Haven't tried it yet but I definitely will ASAP.
Shouldn't CerberusX/fx be in the list of the supported languages/frameworks? There are already plenty of them listed.
 
Shouldn't CerberusX/fx be in the list of the supported languages/frameworks? There are already plenty of them listed.
Yeah, that might be an option. Thanks for letting me know. Btw, would you rather like to use fantomEngine? Cause I could easily port it other to CX.
 
I'll try it the way it is when I can, the fantomEngine Box2D examples look quite straightforward, I'll build on that.
There also is Box2D support in IgnitionX (including a R.U.B.E importer) and Pyro but CX+fantomEngine look like the safest and easiest option.
 
You can use the current release with CX without a problem. But I will port it over and change the docs like I did with fantomCX over the next days.
 
Status
Not open for further replies.
Back
Top Bottom