January 22, 2019, 06:06:28 PM

Author Topic: AGK Tier2 meets Cerberus X  (Read 2751 times)

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1374
Re: AGK Tier2 meets Cerberus X
« Reply #15 on: March 27, 2018, 01:20:13 AM »
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
Until the next time...

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #16 on: March 27, 2018, 09:07:16 AM »
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.

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #17 on: March 27, 2018, 09:13:36 AM »
Can you try port Raylib to over? ;D

Naah, I don't think so.

Offline GaborD

  • Full Member
  • ***
  • Posts: 172
Re: AGK Tier2 meets Cerberus X
« Reply #18 on: March 27, 2018, 10:36:17 AM »
Sounds really interesting.

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 605
Re: AGK Tier2 meets Cerberus X
« Reply #19 on: March 27, 2018, 07:28:40 PM »
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
_______________________________________

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #20 on: March 27, 2018, 09:52:41 PM »
@NAUGHTY: CX has no ability to call DLLs, so no to that.



Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1370
Re: AGK Tier2 meets Cerberus X
« Reply #21 on: March 27, 2018, 10:08:42 PM »
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
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)

MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #22 on: April 06, 2018, 10:05:21 PM »
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.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1374
Re: AGK Tier2 meets Cerberus X
« Reply #23 on: April 07, 2018, 01:20:28 AM »
Nice nice ;D

Quote
next 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?
Until the next time...

Offline playniax

  • Full Member
  • ***
  • Posts: 105
    • Playniax
Re: AGK Tier2 meets Cerberus X
« Reply #24 on: April 07, 2018, 06:44:17 AM »
Hey Mike, that actually looks very cool!

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

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #25 on: April 07, 2018, 08:15:06 AM »
Nice nice ;D

Quote
next 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.

Quote
Quick 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

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #26 on: April 07, 2018, 08:52:30 AM »
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.

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #27 on: April 07, 2018, 08:54:54 AM »
Here is an example:
Code: [Select]
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



Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 759
Re: AGK Tier2 meets Cerberus X
« Reply #28 on: April 07, 2018, 11:24:21 AM »
this looks excellent - any thoughts on macos versions?

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 527
  • Cerberus-X Dev Team
    • Cerberus X
Re: AGK Tier2 meets Cerberus X
« Reply #29 on: April 07, 2018, 12:24:34 PM »
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.