fantomCX- A game framework for Cerberus X (mojo2)

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Hi folks,

this is my game framework called fantomCX. It is using mojo2.

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

It ships will numberous examples and a good sized documentation.

Here is a quick feature list:

  • Various objects like images, tile maps, graphic primitives, sounds, collision zones 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.
  • 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 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.
  • Extensive handling methods for the engine's objects.
  • Simple camera 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.
  • 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!
  • Easy 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.
  • Embedded objects inside a Tiled map will be stored and are accessable.
  • Easy scene/room management.
  • Objects can be composed of several single images.
  • Automatic object pooling.
  • Custom GUI elements
 
Last edited:

fredfan

New Member
Joined
Jan 3, 2018
does it support displaying hexagon tile maps?
Also are the demos uploaded somewhere?
 

Ferret3D

Member
Joined
Aug 13, 2017
Tiled examples crash, cftEngine.csx
Code:
If Image.Load(dataTileSet.GetItem("image"),0.5,0.5,Image.Filter)<> Null Then
                obj.objImg[tileSheetIndex] = imgMng.LoadImage(path + dataTileSet.GetItem("image"), tlW, tlH, (imgH/tlH)*(imgW/tlW), Image.Filter)
            Else
                obj.objImg[tileSheetIndex] = imgMng.LoadImage(path + ftStripDir(dataTileSet.GetItem("image")), tlW, tlH, (imgH/tlH)*(imgW/tlW), Image.Filter)
            Endif
Listview crash, cftGui.csx line 292
Code:
Local obj:=Self.engine.CreateImage(Self.objImg[1],Self.GetPosX(), Self.GetPosY()-Self.GetHeight()/2-20+80*(Self.GetChildCount()+1))
Everything else i tested works fine but i'm really interested in the Tiled examples.
 
Last edited:

Memzen

New Member
3rd Party Module Dev
Joined
Dec 26, 2018
Location
Colorado
Should the fantomCX folder be in the Cerberus modules_ext folder or in a project folder?
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Can be in the modules_ext folder or any other folder you have set inside your config file.
 

Memzen

New Member
3rd Party Module Dev
Joined
Dec 26, 2018
Location
Colorado
These are some errors I found while going through the fantomCX examples. This might help for the next fantomCX update, whenever that might be. There is no hurry.

fantomCX examples errors
--------------------------------------------------------------
Gui\Buttons

Cerberus Runtime Error : NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load
'http://localhost:49236/data/font_20.txt'.
--------------------------------------------------------------
Gui\Joysticks

Cerberus Runtime Error : NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load
'http://localhost:49283/data/font_20.txt'.
--------------------------------------------------------------
Gui\Listview

Cerberus Runtime Error : Array index out of range
E:/000/prog/Cerberus/modules_ext/fantomCX/cftGui.cxs<292>
E:/000/prog/Cerberus/modules_ext/fantomCX/cftGui.cxs<444>
E:/000/prog/Cerberus/modules_ext/fantomCX/cftGui.cxs<556>
E:/000/prog/Cerberus-X_-_projects/fantomCX/examples/Gui/Listview/Listview.cxs<63>
E:/000/prog/Cerberus/modules/mojo/app.cxs<89>
--------------------------------------------------------------
Objects\Creation\SpriterObject

E:/000/prog/Cerberus-X_-_projects/fantomCX/examples/Objects/Creation/SpriterObject/SpriterObject.cxs<74> : Error
: Identifier 'SpriterImporter' not found.
--------------------------------------------------------------
TileMaps\DynamicMap

there is a problem because the number shown by setting the text at line 104 is always 1 less than what the tile
itelf is showing

fE.GetCanvas().DrawText("Tile unter mouse at "+x+":"+y+" = "+tileMap.GetTileIDAt(x,y),fE.GetLocalX(10,
False),fE.GetLocalY(30, False))
--------------------------------------------------------------
TileMaps\Tiled - MultiTileSets.cxs

Error - Unable to load image: tiles1.png
Error - Unable to load image: tiles2.png
Error - Unable to load image: isometric_64x64.png
--------------------------------------------------------------
TileMaps\Tiled - Tiled.cxs

Error - Unable to load image: sewer_tileset.png
--------------------------------------------------------------
TileMaps\Tiled - TiledIsometric.cxs

Error - Unable to load image:
../../../../../../../../../../../Applications/Tiled_090_examples/isometric_grass_and_water.png
--------------------------------------------------------------
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Hi @Memzen , I didn't forget about you.

Gui\Buttons
Could not reproduce this. Which platform did you try the example on?

Gui\Joysticks
Could not reproduce this. Which platform did you try the example on?

Gui\Listview
Indeed a bug. I am fixing this.

Objects\Creation\SpriterObject
Ouch, a test script that should not have shipped with CX, sorry.

TileMaps\DynamicMap
No bug, it returns the tile-index in the tilemap, which start at 0.

TileMaps\Tiled - MultiTileSets.cxs
Kinda a bug/feature in debug mode. As paths to images inside the map file can be set differently, I try to cover some possible path variants during loading the tileset. And if the image was not found, I try a different method. That is why you get these error messages in debug mode.
Will change that behaviour so the image path has to be the correct one inside the map file. This way you will only get an error if the image is not existant or the path was not set correctly.

TileMaps\Tiled - Tiled.cxs
See above.

TileMaps\Tiled - TiledIsometric.cxs
See above.

Anyway, I also working on the docs and them compatible with the new MakeDocs version. So expect a new version in maybe 7-14 days.
 

Memzen

New Member
3rd Party Module Dev
Joined
Dec 26, 2018
Location
Colorado
To whom it may concern:


Gui\Buttons

When I unzip fantomCX-3.00b.zip the folder 'Buttons.data' is missing
the files 'font_20.png' and 'font_20.txt' which causes the error.


Gui\Joysticks

When I unzip fantomCX-3.00b.zip the folder 'Joysticks.data' is missing
the files 'font_20.png' and 'font_20.txt' which causes the error.


TileMaps\DynamicMap

Now I understand. I thought it was the ID of what thing is in the cell
but it is the ID of the tile's texture.
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Gui\Buttons

When I unzip fantomCX-3.00b.zip the folder 'Buttons.data' is missing
the files 'font_20.png' and 'font_20.txt' which causes the error.


Gui\Joysticks

When I unzip fantomCX-3.00b.zip the folder 'Joysticks.data' is missing
the files 'font_20.png' and 'font_20.txt' which causes the error.
Ah ok. I guess I forgot about that i fixed it here.
 

MikeHart

Administrator
Staff member
Joined
Jun 19, 2017
Location
Germany
Just uploaded version 3.01. Major work was done on the docs to make them compatible to the latest MakeDocs tool.
 

patbou

New Member
Joined
Aug 4, 2019
I'm a complete newbe to Cerberus-X... after looking at some of the examples, I want to take a look at fantomcx, but how do I install it if I want to use it? I didn't find any documentation on this. I'm sure it's easy but I just don't see it!

Thank you!
 

Phil7

Active Member
3rd Party Tool Dev
Joined
Jun 26, 2017
Welcome to the community here!
Just like every module you like to use in CerberusX you only have to copy the inner folder called fantomCX-3.01(and rename it to only fantonCX) into the modules folder (or even better to the modules_ext folder) of CerberusX and start with the codes in the examples folder there to get a feeling of how it works.

@MikeHart Maybe you could remove the version part from the inner folder in the downloads, so renaming is not needed any more.
 
Top Bottom