It is currently Thu Jul 18, 2019 2:14 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: 2D Engine Nautilus (OpenGL)
PostPosted: Sun May 05, 2019 1:34 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 440
Image

I have just released the alpha version of my 2D (OpenGL) Engine Nautilus :D

Features:
- easy to integrate
- easy functions for sprites, text & tiles (rotated, scaled, resized, tinted, layered)
- support of multiple layers (0-9 or unlimited if stacked)
- render surface not bound to window size
- fps can be set freely (30 - 80)
- isometric camera system

Isometric camera example (source is included in the download):
Image

Im open for criticism and suggestions :)

Imports & Interfaces:
Code:
;Alpha 3

Import "ne32.lib"
  neContext.i(hwnd.i,width.i,height.i,fps.i)
  neVersion.i()
EndImport

Interface NAUTILUS_ISOMETRIC
  CreateCamera.i(X.f,Y.f,Width.f,Height.f)
  CameraPosition.i(Camera.i,*Position,*Offset = #Null)
  CameraMove.i(Camera.i,*Position,*Offset = #Null)
  CameraZoom.f(Camera.i,Min.f,Max.f,*Scale = #Null)
  CameraScale.f(Camera.i)
  CameraUnit.i(Camera.i,*Unit)
  CameraCartesian.i(Camera.i,*Cartesian)
  CameraIsometric.i(Camera.i,*Isometric)
  CameraClamp.i(Camera.i,*Bounds)
  CameraUpdate.i(Camera.i,*Translation = #Null)
  CameraFree.i(Camera.i)
  CreateTiles.i()
  TileSet.i(X.i,Y.i,Link.i)
  TileGet.i(X.i,Y.i)
  TileUnit.i(X.i,Y.i,*Unit)
  TileCartesian.i(X.i,Y.i,*Cartesian)
  TileIsometric.i(X.i,Y.i,*Isometric)
  TileTranslate.i(Camera.i,X.i,Y.i,*Position,*Cartesian = #Null,*Link = #Null)
  FreeTiles.i()
  MouseTranslate.i(Camera.i,*Mouse,*Cartesian,*Unit = #Null)
  MouseTest.i(*Unit)
  WorldToScreen.i(Camera.i,*Cartesian,*Position)
  ScreenToWorld.i(Camera.i,*Position,*Cartesian,*Unit = #Null)
  Translate.i(Camera.i,*Isometric,*Position)
  Isometric.i(*Cartesian,*Isometric)
  Unit.i(*Cartesian,*Unit)
  Release.i()
EndInterface

Interface NAUTILUS_FONT
  Width.f()
  Height.f()
  CenterX.f()
  CenterY.f()
  Resize.i(Width.f,Height.f)
  ResetSize.i()
  GetSpacing.i()
  SetSpacing.i(Spacing.f)
  ResetSpacing.i()
  Draw.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Tint.l = #Null)
  DrawRot.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawMod.i(X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Tint.l = #Null)
  DrawModRot.i(X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawLight.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Tint.l = #Null)
  DrawLightRot.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Angle.f = #Null,Tint.l = #Null)
  DrawLightMod.i(X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Tint.l = #Null)
  DrawLightModRot.i(X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerDraw.i(Layer.i,X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Tint.l = #Null)
  LayerDrawRot.i(Layer.i,X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerDrawMod.i(Layer.i,X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Tint.l = #Null)
  LayerDrawModRot.i(Layer.i,X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerDrawLight.i(Layer.i,X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Tint.l = #Null)
  LayerDrawLightRot.i(Layer.i,X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerDrawLightMod.i(Layer.i,X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Tint.l = #Null)
  LayerDrawLightModRot.i(Layer.i,X.f,Y.f,Text.s,Width.f = #Null,Height.f = #Null,CenterX.b = #False,CenterY.b = #False,Angle.f = #Null,Tint.l = #Null)
  Release.i()
EndInterface

Interface NAUTILUS_TILE
  Width.f()
  Height.f()
  CenterX.f()
  CenterY.f()
  Resize.i(Width.f,Height.f)
  ResetSize.i()
  Draw.i(Index.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null)
  DrawRot.i(Index.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawMod.i(Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null)
  DrawModRot.i(Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawLight.i(Index.i,X.f,Y.f,Center.b = #False,Tint.l = #Null)
  DrawLightRot.i(Index.i,X.f,Y.f,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  DrawLightMod.i(Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Tint.l = #Null)
  DrawLightModRot.i(Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerDraw.i(Layer.i,Index.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null)
  LayerDrawRot.i(Layer.i,Index.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerDrawMod.i(Layer.i,Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null)
  LayerDrawModRot.i(Layer.i,Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerDrawLight.i(Layer.i,Index.i,X.f,Y.f,Center.b = #False,Tint.l = #Null)
  LayerDrawLightRot.i(Layer.i,Index.i,X.f,Y.f,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerDrawLightMod.i(Layer.i,Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Tint.l = #Null)
  LayerDrawLightModRot.i(Layer.i,Index.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  Animation.i(Timer.f = #Null,Active.b = #False,Once.b = #False)
  AnimationState.i(Active.b = #True)
  AnimationOnce.i(Flag.b = #True)
  AnimationFrame.i()
  AnimationFrames.i()
  AnimationStart.i(Index.i = -1)
  AnimationStop.i(Index.i = -1)
  AnimationReset.i(Zero.b = #False)
  CreateCopy.i()
  Release.i()
EndInterface

Interface NAUTILUS_SPRITE
  Width.f()
  Height.f()
  CenterX.f()
  CenterY.f()
  Resize.i(Width.f,Height.f)
  ResetSize.i()
  Draw.i(X.f,Y.f,Center.b = #False,Alpha.a = #Null)
  DrawRot.i(X.f,Y.f,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawMod.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null)
  DrawModRot.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawLight.i(X.f,Y.f,Center.b = #False,Tint.l = #Null)
  DrawLightRot.i(X.f,Y.f,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  DrawLightMod.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Tint.l = #Null)
  DrawLightModRot.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerDraw.i(Layer.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null)
  LayerDrawRot.i(Layer.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerDrawMod.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null)
  LayerDrawModRot.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerLight.i(Layer.i,X.f,Y.f,Center.b = #False,Tint.l = #Null)
  LayerLightRot.i(Layer.i,X.f,Y.f,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerLightMod.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Tint.l = #Null)
  LayerLightModRot.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  Release.i() 
EndInterface

Interface NAUTILUS_ATLAS
  Width.f()
  Height.f()
  CenterX.f()
  CenterY.f()
  Resize.i(Width.f,Height.f)
  ResetSize.i()
  Draw.i(X.f,Y.f,Center.b = #False,Alpha.a = #Null)
  DrawRot.i(X.f,Y.f,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  DrawMod.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null)
  DrawModRot.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  Light.i(X.f,Y.f,Center.b = #False,Tint.l = #Null)
  LightRot.i(X.f,Y.f,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LightMod.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Tint.l = #Null)
  LightModRot.i(X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerDraw.i(Layer.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null)
  LayerDrawRot.i(Layer.i,X.f,Y.f,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerDrawMod.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null)
  LayerDrawModRot.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  LayerLight.i(Layer.i,X.f,Y.f,Center.b = #False,Tint.l = #Null)
  LayerLightRot.i(Layer.i,X.f,Y.f,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  LayerLightMod.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Tint.l = #Null)
  LayerLightModRot.i(Layer.i,X.f,Y.f,Width.f = #Null,Height.f = #Null,Center.b = #False,Angle.f = #Null,Tint.l = #Null)
  CreateSprite.i(X.i,Y.i,Width.i,Height.i)
  CreateTile.i(CountX.i,CountY.i,X.i,Y.i,Width.i,Height.i,OffsetX.i = #Null,OffsetY.i = #Null)
  CreateFont.i(CountX.i,CountY.i,X.i,Y.i,Width.i,Height.i,OffsetX.i = #Null,OffsetY.i = #Null)
  Bitmap.i(*Bitmap)
  Release.i()
EndInterface

Interface NAUTILUS_LAYER
  Reset.i(Layer.i)
  Translate.i(Layer.i,X.f,Y.f,Origin.b = #False)
  Push.i(Layer.i)
  Pop.i(Layer.i)
  Rotate.i(Layer.i,Angle.f = #Null)
  Scale.i(Layer.i,X.f = 1,Y.f = 1)
  Render.i()
EndInterface

Interface NAUTILUS_DRAWING
  DrawPointSize.i(Size.f = 1)
  DrawLineSize.i(Size.f = 1)
  DrawPoint.i(X.f,Y.f,Color.l = $FFFFFFFF)
  DrawLine.i(X1.f,Y1.f,X2.f,Y2.f,Color.l = $FFFFFFFF)
  DrawTriangle.i(X.f,Y.f,Width.f,Height.f,Fill.b = #False,Color.l = $FFFFFFFF)
  DrawBox.i(X.f,Y.f,Width.f,Height.f,Center.b = #False,Fill.b = #False,Color.l = $FFFFFFFF)
  DrawDiamond.i(X.f,Y.f,Width.f,Height.f,Center.b = #False,Fill.b = #False,Color.l = $FFFFFFFF)
  DrawCircle.i(X.f,Y.f,Radius.f,Fill.b = #False,Color.l = $FFFFFFFF)
EndInterface

Interface NAUTILUS
  ViewPortResize.i(Width.i,Height.i)
  ViewPortFactor.i(*Vector)
  ViewPortSize.i(*Vector)
  ViewPortCenter.i(*Vector)
  RenderSize.i(*Vector)
  RenderHideCursor(Flag.b = #True)
  RenderFilter(Bilinear.b = #False)
  RenderColor.i(Color.l = #Null)
  RenderBegin.i(*Delta = #Null,*FPS = #Null)
  RenderEnd.i()
  RenderReset.i()
  RenderPush.i()
  RenderPop.i()
  RenderTranslate.i(X.f,Y.f)
  RenderRotate.i(Angle.f)
  RenderScale.i(X.f,Y.f)
  RenderTextWidth.f()
  RenderTextHeight.f()
  RenderTextResize.i(Width.f,Height.f)
  RenderTextResetSize.i()
  RenderTextGetSpacing.f()
  RenderTextSetSpacing.i(Spacing.f)
  RenderTextResetSpacing.i()
  RenderText.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Tint.l = #Null)
  RenderTextRot.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  RenderTextMod.i(X.f,Y.f,Text.s,Width.f,Height.f,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Tint.l = #Null)
  RenderTextModRot.i(X.f,Y.f,Text.s,Width.f,Height.f,CenterX.b = #False,CenterY.b = #False,Alpha.a = #Null,Angle.f = #Null,Tint.l = #Null)
  RenderTextLight.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Tint.l = #Null)
  RenderTextLightRot.i(X.f,Y.f,Text.s,CenterX.b = #False,CenterY.b = #False,Angle.f = #Null,Tint.l = #Null)
  RenderTextLightMod.i(X.f,Y.f,Text.s,Width.f,Height.f,CenterX.b = #False,CenterY.b = #False,Tint.l = #Null)
  RenderTextLightModRot.i(X.f,Y.f,Text.s,Width.f,Height.f,CenterX.b = #False,CenterY.b = #False,Angle.f = #Null,Tint.l = #Null)
  InputKey.i(Code.i)
  InputKeySgl.i(Code.i)
  InputKeyChr.i()
  InputMouse.i(*Vector)
  InputMouseLeft.i()
  InputMouseLeftSgl.i()       
  InputMouseLeftDbl.i()
  InputMouseRight.i()
  InputMouseRightSgl.i()
  InputMouseRightDbl.i()
  InputMouseMiddle.i()
  InputMouseMiddleSgl.i()
  InputMouseMiddleDbl.i()
  InputMouseWheel(Code.i = #Null,*Value.Integer = #Null)
  CreateDrawing.i()
  CreateLayer.i()
  CreateAtlas.i(*Buffer,File.s = #Null$)
  CreateFont.i(*Buffer,File.s,Width.i,Height.i)
  CreateLight.i(Width.i,Height.i,LightA.a,LightB.a,Radius.f = #Null)
  CreateIsometric.i(Width.i,Height.i,TileWidth.i,TileHeight.i)
  Release.i()
EndInterface


Download links removed - Alphatest has ended!


Last edited by Mijikai on Sun Jun 16, 2019 7:38 pm, edited 7 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 2D Engine Nautilus (OpenGL)
PostPosted: Sun May 05, 2019 4:51 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 400
Location: Canada
The link to the German forum you provided doesn't work and since I don't read German ...

But it sound interesting.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: 2D Engine Nautilus (OpenGL)
PostPosted: Sun May 05, 2019 5:11 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 440
StarBootics wrote:
The link to the German forum you provided doesn't work and since I don't read German ...


I fixed it - all info is also here now :)


Top
 Profile  
Reply with quote  
 Post subject: Re: 2D Engine Nautilus (OpenGL)
PostPosted: Wed May 15, 2019 9:01 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 440
Update Alpha 3 (15.05.2019)

New Functions:
- Cursor can be hidden now!
- Added a new interface for isometric games (NAUTILUS_ISOMETRIC)

Have fun :D


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye