fantomX is out

Community Forums/Monkey Talk/fantomX is out

MikeHart(Posted 2015) [#1]
And here is the first release. fully mojo2 powered. Here are the changes compared to fantomEngine 1.57...

Version 2.0

*New functionalities*

- fantomX now uses mojo2.
- Box2D is more closely integrated into the engine. As mojo2 is now supported, this was unavoidable.

*New functions/methods *

- ftEngine.CreateCanvas:Canvas(image:Image = Null)
- ftEngine.GetCanvas:Canvas()
- ftEngine.Render:Void(scene:ftScene)
- ftEngine.RenderFlush:Void()
- ftEngine.SetAlpha:Void(alpha:Float)
- ftEngine.SetCanvas:Void(canvas:Canvas)
- ftEngine.SetCanvasAmbientLight : Void ( red:Float, green:Float, blue:Float )
- ftEngine.SetCanvasColorMask:Void(red:Bool, green:Bool, blue:Bool, alpha:Bool)
- ftEngine.SetCanvasFogColor:Void(red:Float, green:Float, blue:Float, alpha:float)
- ftEngine.SetColor:Void(red:Float, green:Float, blue:Float)
- ftEngine.SetupRender:Void()
- ftMapTile.GetProperty:String(key:String)
- ftMapTile.GetPropertyCount:Int()
- ftObject.CreateImage:ftObject(width:Int, height:Int, xpos:Float, ypos:Float, _ucob:Object=Null)
- ftScene.Render:Void(setupRender:Bool = False)
- ftScene.Update:Void(speed:Float=1.0, updateEngineTimer:Bool = False)
- ftTileMap.GetTileSet:ftTileSet(index:Int)
- ftTileMap.GetTileSetCount:Int()
- ftTileSet.GetImageHeight:Int()
- ftTileSet.GetImageWidth:Int()
- ftTileSet.GetTileHeight:Int()
- ftTileSet.GetTileWidth:Int()
- ftVec2D.Lerp:ftVec2D(targetVector:ftVec2D, timeFaktor:Float)

*Changes*

- ftObject.SetBlendMode regarding usable mojo2 blend modes.
- Removed class tPointS and exchanged it with class ftVec2Dp.
- Class ftVec2D extends now class ftVec2Dp.
- Moved the collision detection methods outside of ftObject into the cftCollisions file and made functions out of them.
- Renamed function GetPitchRate:Float(halfStep:Float, base:Float=1.0) inside the cftMisc.monkey file to ftGetPitchRate.
- Moved ftEngine._StripDir:String( path:String ) as a function to the cftMisc.monkey file.
- ftEngine.GetTouchX:Float(index:Int=0, withCam:Bool = True) ' Added withCam parameter
- ftEngine.GetTouchXY:Float[](index:Int=0, withCam:Bool = True) ' Added withCam parameter
- ftEngine.GetTouchY:Float(index:Int=0, withCam:Bool = True) ' Added withCam parameter
- ftEngine.LoadMusic:ftSound(filename:String, loopFlag:Bool=True) ' Changed the default loop frag to true
- ftEngine.SetMaxSoundChannel:Void(maxChannel:Int = 31) ' Changed the channel range to 0-31

*New example*

- Sound/Sound.monkey


You can grag it here..

http://files.whiteskygames.com/fantomX_V200.zip

The documentation is reachable at

http://fxdocs.fantomgl.com

To convert an old project to fantomX you need to do just a view changes. At the beginning of your code...

' Tell fantomX to import physics related classes/fields/methods
#FantomX_UsePhysics = False

' Import the fantomX framework which imports mojo2 itself
Import fantomX


And then in the OnRender method of your app...

	'------------------------------------------
	Method OnRender:Int()
		' Check if the engine is not paused
		If fE.GetPaused() = False Then
			' Clear the screen 
			fE.Clear( 255,0,0)
		
			' Render all visible objects of the engine
			fE.Render()

			' Now draw the current FPS value to the screen
			fE.SetColor(255, 255, 0)
			fE.GetCanvas().DrawText( "FPS= "+fE.GetFPS(),fE.GetLocalX(10), fE.GetLocalY(10))
			' Last, flip the previously drawn content to the screen, make it visible
			fE.RenderFlush()			
		Else
			fE.GetCanvas().DrawText("**** PAUSED ****",fE.GetLocalX(fE.GetCanvasWidth()/2.0),fE.GetLocalY(fE.GetCanvasHeight()/2.0),0.5, 0.5)
			' Last, flip the previously drawn content to the screen, make it visible
			fE.RenderFlush()
		Endif
		Return 0
	End



Why0Why(Posted 2015) [#2]
Looks impressive Mike!