Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 05:32:32 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogslibsgt: simple games toolkit (c++ library set)
Pages: [1]
Print
Author Topic: libsgt: simple games toolkit (c++ library set)  (Read 900 times)
Raptor85
Level 5
*****



View Profile WWW
« on: February 17, 2019, 11:56:56 AM »

This started as me just being fed up with modern api's and the complexity of doing simple operations in them and has now evolved into series of independent libraries to assist in common game development needs that right now are unnecessarily complex for the majority of developers. It's not "technically" a game but everything is targeted towards game development so I figured I'd start up a devlog here to show the progress. (I also do already have some test games written using them, which will be posted around the time I upload the actual libs)

The libraries themselves are in C++17 though bindings for other languages are a definite possibility in the future if there's any interest.  Each library is designed to be COMPLETELY independent of all the others, and can be used with other libraries like SDL/SFML/etc... only pulling in exactly what's needed for the functionality each one provides.  For instance you can use SDL2 for windowing and input and use the software framebuffer and timing if you wanted, or say GLFW using sgtinput for hardware mouse support.  

I haven't decided on the exact license yet but they will be open source, and freely usable without restriction commercially.

Over the next few weeks I'll be cleaning them up and running some tests to verify the win32 version is working as intended (I run linux myself so it's only been tested in WINE and VirtualBOX so far) before the first public release.  OSX support is planned but not a priority, as I do not currently have a mac for testing, the codepath is (mostly) already there though so it should be simple. Android and Switch support are also planned in the future (Switch should be little more than altering the windowing library and input library to use it's api, android will require some NDK bindings however).  I'm not happy with the EGL accelerated backend for the framebuffer as it's not as consistent across systems as I thought so it will be replaced with a standard GL4.5+ backend in the future. (current software implementation will remain unchanged)

Currently implemented libraries
  • sgtfb - simple framebuffer w/ software raster and bitmaps, multiple back-ends available for presenting to screen
  • sgtfs - filesystem management and safe file IO routines
  • sgtgl - OpenGL context creation + function fetching library independent of windowing system
  • sgtinput - Keyboard/Mouse/Joystick library will full hardware support
  • sgttimer - hardware timer support + fixed timestep manager, automatic management of unused cpu cycles
  • sgtwin - cross-platform window creation and management

Libraries started but put on the backburner as not a priority
  • sgtrt - software ray tracer
  • sgtswrast - software 3d rasterizer

Future libraries planned but not started yet
  • sgtsound - managed sound mixing/playback
  • sgtnet - managed network socket system
  • sgtthread - thread pooling and creation/management library
  • sgtfont - truetype and bitmapped font management library
  • sgtmem - memory management library
  • sgtecs - simple ECS management library
  • sgtmath - common mathematical functions, structures, and algorithms

Note: Only direct dependencies listed, dependencies may have dependencies of their own, but this will vary by system.


Details of current libraries:

  • sgtfb
    • Provides simple pixel framebuffer access
    • Does not provide any window creation or management code, window or viewport must already exist
      • can be easily be bound to native windows (X11/win32), QT widgets, etc
    • Fast pixel manipulation and raster routines
      • PutPixel
      • DrawLine
      • DrawRect
      • FillRect
      • More Planned!
    • Cross-Platform Bitmap object with all raster routines available as well as blit routines to copy data to/from other bitmaps
      • FastBlit
      • AlphaBlit
      • MaskedBlit
    • Dependencies and size
      • Linux - Size: 24k
        • libX11.so
        • libstdc++.so.6
        • libc.so.6
        • (Optional)libEGL.so
          • Adds support for optional EGL backend renderer
        • (Optional)libGL.so
          • Required with EGL backend
      • Windows - Size: ~30k (Not fully optimized/tested yet)
        • User32.dll
        • libstdc++-6.dll
        • libc-6.dll
        • (Optional) EGL.dll (preferred Mesa3D version)
          • Adds support for optional EGL backend renderer, significantly faster drawing.
  • sgtfs
    • Provides a filesystem object for safely reading/writing/appending data to and from files
    • Automatically determines program data folder and config/save path properly for all operating systems
      • File access is restricted to these folders, which type of folder you are trying to access determined by flags
    • Dependencies and size
      • Linux - Size: 7.2k
        • libstdc++.so.6
        • libc.so.6
      • Windows - Size: ~10k (Not fully optimized/tested yet)
        • libstdc++-6.dll
        • libc-6.dll
  • sgtgl
    • Automates creation of an OpenGL context and fetches pointers to all functions
    • Does not provide any window creation or management code, window or viewport must already exist
      • can be easily be bound to native windows (X11/win32), QT widgets, etc
    • Dependencies and size
      • Linux - Size: 25k
        • libstdc++.so.6
        • libc.so.6
        • liGL.so
      • Windows - Size: ~50k (Not fully optimized/tested yet)
        • libstdc++-6.dll
        • libc-6.dll
        • opengl32.dll
  • sgtinput
    • Interface providing keyboard/mouse/joystick events
    • Current version is completely independent of windowing system
      • Planned future revision will have win32/x11 fallback if control binding fails
      • Planned future revision will have callback and custom event control bindings
    • Hardware mouse support
      • Ignores all OS mouse smoothing\acceleration
      • Higher accuracy/faster response times
      • Supports as many mice as you can plug into your USB ports
    • multiple keyboard support
      • for when you're REALLY determined for local multiplayer but everyone wants the keyboard
    • Full joystick/gamepad support, supports everything from dualshock to xbox, to flightsticks/throttles
    • Dependencies and size
      • Linux - Size: 35k
        • libstdc++.so.6
        • libc.so.6
      • Windows - Size: (currently incomplete)
        • libstdc++-6.dll
        • libc-6.dll
  • sgttimer
    • OS Independant hardware timer
    • used most accurate timer available on system (generally nanosecond precision)
    • can be queried for time since startup or initialized with a tick interval for easy fixed timestep loops
    • in "tick" mode will automatically sleep to free up cpu time/use less power if ticks are taking less time to execute than they are alotted
    • Dependencies and size
      • Linux - Size: 7.7k
        • libstdc++.so.6
        • libc.so.6
      • Windows - Size: (currently incomplete)
        • libstdc++-6.dll
        • libc-6.dll
  • sgtwin
    • Creates and manages a window in a cross-platform fashion
    • Defaults to primary screen as defined by window manager, but can be overridden on creation
    • Does not create any graphical contexts, other libraries must be used to get a drawing surface
      • provides callbacks to retrieve window and display handles in a cross-platform fashion
      • can be passed information for window creation from opengl/directx to ensure correct device is initialized
        • Mostly useful on laptops which might have multiple displays of different capabilities
    • Automatic capture and handling of common interrupts
      • Alt+Enter or OS fullscreen command will trigger either windowed-fullscreen or windowed mode based on current mode
      • Automatic mouse grab with ctrl+g as standard fallback to release
        • can grab/ungrab mouse programatically overriding this
        • mouse cursor hidden by default (can be overridden)
    • Dependencies and size
      • Linux - Size: 24k
        • libstdc++.so.6
        • libc.so.6
        • libX11.so
        • XCB Compile Option Enabled (default)
          • libxcb.so
          • libxcb-icccm.so
          • libxcb-randr.so
          • libxcb-keysyms.so
          • libX11-xcb.so
        • Wayland Compile Option Enabled (incomplete)
          • libwayland-client.so
      • Windows - Size: ~50k (Not fully optimized/tested yet)
        • User32.dll
        • libstdc++-6.dll
        • libc-6.dll

Downloads:
Check back later!
Logged

-Fuzzy Spider
gruffler
Level 0
*


View Profile
« Reply #1 on: April 30, 2019, 02:41:13 AM »

Hows this going? Been keeping an eye on it but no updates yet. Is it still an active project? It looks right up my street...  Smiley
Logged
Raptor85
Level 5
*****



View Profile WWW
« Reply #2 on: May 15, 2019, 08:36:46 PM »

Still progressing, just slowly, bought a house so hadn't had a lot of free time as of late....too busy painting and moving furniture in, my primary development computer has also been down most of the time (packed in a box)

Right now the Linux version is VERY functional but the windows version is iffy at best, haven't really put much time into it yet.

Logged

-Fuzzy Spider
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic