AGK Tier2 meets Cerberus X

Started by MikeHart, March 25, 2018, 18:11:48

Previous topic - Next topic

Qube

So with this, one could use all the features of AGK but gain the benefit of a compiled language for the grunt logic work?. Tier 3, CX? ;D
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

MikeHart

I would say Tier 1.5  ;D

But yes, just like you use Tier2 directly with MSVC 2017. But in here i use CX which uses MSVC to compile it.

MikeHart


GaborD


Rick Nasher

So to summarize in 1 sentence and if understand correctly we'd get to code in a AGK Tier1/CX hybrid with the ability to add DLL's and getting a purely compiled result in the end, but only for Windows and we loose the x-platform benefits?

If so, I can see some particular usages for it, but it wouldn't be my weapon of choice for I really love the code-once, build- many feature of AGK.
_______________________________________
B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

MikeHart

@NAUGHTY: CX has no ability to call DLLs, so no to that.



Steve Elliott

Just to clarify, I said good work, preceded by a lol simply because Qube had begun his statement with a lol, just some silliness Mike   ;D
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

MikeHart

Windows target is done, next will be the Android NDK target. Fun fun fun.
I have contacted Richard Vanner already to see what I am allowed to share with the target.

Qube

Nice nice ;D

Quotenext will be the Android NDK target
Surely, MacOS next before mobile? :( :P

Quick question... How come the FPS is so low?. Is that something to do with your monitor or app settings?
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

playniax

Hey Mike, that actually looks very cool!

Does it really allow to use monkey classes, OOP features, etc?

MikeHart

#25
Quote from: Qube on April 07, 2018, 01:20:28
Nice nice ;D

Quotenext will be the Android NDK target
Surely, MacOS next before mobile? :( :P

I could but then i run only xcode 8 because of my old Imac. I am not sure if the xcode template of AGK is compatible.

QuoteQuick question... How come the FPS is so low?. Is that something to do with your monitor or app settings?


Athlon x255 II cpu with buildin ATI HD4200 chip. For that, it runs pretty good.  :D

MikeHart

Quote from: playniax on April 07, 2018, 06:44:17
Hey Mike, that actually looks very cool!

Does it really allow to use monkey classes, OOP features, etc?


yes and yes. You can't use Mojo/Mojo2 with it but most stuff that doesn't need it, will work. So I think.
I see no reason why it shouldn't. Ah ok, some stuff that rely on MingW libs won't work till we make CX completely compatible with MSVC 2017.

MikeHart

Here is an example:

Strict

#TEXT_FILES+="*.obj"

#AGK_DEVICE_WIDTH = 600
#AGK_DEVICE_HEIGHT = 480
#AGK_DEVICE_POS_X = 32
#AGK_DEVICE_POS_Y = 32
#AGK_FULLSCREEN = False

Import agk2

Global game:myGame = Null

'*********************************************************************
Class cShip
   Field _id:Int
   Field _img:Int
   '---------------------------------------------
   Method New()
      _id = LoadObjectWithChildren("data/Lifeboat.obj")
      _img = LoadImage("data/lifeboat_diffuse.png")

      SetObjectImage(_id, _img, 0)
      SetObjectScale(_id,3,3,3)
      SetObjectCastShadow(_id, 1)
      SetObjectPosition(_id,0,-0.1,0)
      SetObjectRotation(_id,0,135,0)
   End
   '---------------------------------------------
   Method Remove:Int()
      DeleteImage(Self._img)
      DeleteObject(Self._id)
      Return 0
   End
   '---------------------------------------------
   Method Update:Int()
      SetObjectRotation(_id,0,GetObjectAngleY(_id)+10*GetFrameTime() ,0)
      Return 0
   End
End

'*********************************************************************
Class myGame
   Field ship:cShip
   Field counter:Int = 1
   '---------------------------------------------
   Method LoadMedia:Int()
      'The ship     
      ship = New cShip
               
      'Water plane
      Local plane := CreateObjectPlane(150,150)
      Local img2 := LoadImage("data/water.jpg")
      SetObjectImage(plane, img2, 0)
      SetObjectRotation( plane, 90,0,0)
      Return 0
   End
   
   '---------------------------------------------
   Method Setup_Camera:Int()
      SetCameraRange(1,1,1510)
      SetCameraPosition( 1,-2,2,4 )
      SetCameraLookAt( 1,0,0,0,0 )   
      SetPrintSize(20)
      SetShadowMappingMode( 2 )
      Return 0
   End
   
   '---------------------------------------------
   Method Setup_Lights:Int()
      SetSunColor( 255,255,155 )   
      SetSunActive(1)
      'SetSunDirection( -0.3, -0.3, 0.5 )
      SetAmbientColor( 80,80,180 )
      Return 0
   End
   
   '---------------------------------------------
   Method Setup_Window:Int()
      SetWindowTitle("Cerberus X -> AppGameKit")
      SetVirtualResolution(GetDeviceWidth(),GetDeviceHeight())
      SetClearColor(0,0,100)
      SetAntialiasMode( 1 )
      SetGenerateMipmaps(0)
     
      SetSyncRate(9999,0)
      SetVSync(0)
      SetScissor(0,0,0,0)
      Return 0
   End
   
   '---------------------------------------------
   Method New()
      ' Setup stuff
      Setup_Window()
      Setup_Camera()     
      Setup_Lights()
      LoadMedia()
   End
   
   '---------------------------------------------
   Method Update:Int()
      ship.Update()   
     
      If GetRawKeyState(27) = 1
         ship.Remove()
         ship = New cShip
         counter += 1
      Endif
      Return 0
   End
   
   '---------------------------------------------
   Method Render:Int()
      agk_PrintC( "ScreenFPS= " ) ; agk_Print( ScreenFPS() )
      agk_PrintC( "Polygons= " ) ; agk_Print( GetPolygonsDrawn() )
      agk_PrintC( "Memory= " ) ; agk_Print( GetImageMemoryUsage() )
      agk_PrintC( "Objects created= " ) ; agk_Print( counter )
      Sync()
      'agk_PrintC( "GetShadowPolygonsDrawn= " ) ; agk_Print( GetShadowPolygonsDrawn() )
      Return 0
   End
End

'*********************************************************************
Function Main:Int()
   ' This function will be called from the AGK template continuously till you return a value of 1.
   If game = Null Then game = New myGame
   game.Update()
   game.Render()
   
   Return GetPointerPressed()
End




iWasAdam

this looks excellent - any thoughts on macos versions?

MikeHart

Quote from: iWasAdam on April 07, 2018, 11:24:21
this looks excellent - any thoughts on macos versions?


I could do one if the AGK template is compatible with XCode 8. But then, you would have to compile Trans and Ted yourself. As long as I have only this old hardware, I can't provide a current release on OSX.