SkillAgentSearch skills...

Apolune

Lost Astronaut's Game Creation Framework: A massive 1800+ class 1400 file extravaganza of OpenGL, WinAPI, OpenAL and many other features, written in Visual Studio for over a decade!

Install / Use

/learn @LAGameStudio/Apolune

README

Apolune and the Lost Astronaut Game Creation Framework

This is the Lost Astronaut Game Creation Framework ...

alt text

... along with the commercial Apolune Game (artwork reduced from commercially available version) as an implementation example, organized as a Visual Studio (2017) solution.

alt text

We're low on our monthly LFS charges. If you can't download the code directly, or if one of these images is "broken", try downloading a Release instead.

TL;DR

Description

Written in Visual C++ for Win32 using WinAPI as a WinProc Application. Does not use SDL. External dependencies kept to a minimum.

This game creation framework has taken well over 10 years of my life to develop. At various times it has been licensed to companies that I managed, for projects I developed, in the commercial computer graphics space. In particular one company, PieceMaker Technologies Inc., of which I held an equity stake, allowed me to reuse non-application-level code I developed, so in this way the framework has had some indirect funding applied to it.

Lost Astronaut Studios (lostastronaut.com) will adapt portions of this code for use in other game engine projects.

I am releasing it because:

  1. It's in a space that always needs more input, so it adds value to the spaces it interacts with (software, image analysis, automation, graphics and gaming)
  2. It would be useful for third parties who wish to produce transparent research and small independent developers who wish to learn and make games
  3. It is solely a Windows targetted project, and is stuck in the Win32 legacy, and when the project started Windows Desktop Users represented over 76% of all gamers, but today that number is more like 24%. While useful for producing Windows Desktop games, it wouldn't easily be ported to any other platform including the Xbox (though it might work on the Xbox with some effort).
  4. It is built on the aging OpenGL library, a tried-but-true-but-deprecated library from Khronos, and thus is stuck in the throws of that beast
  5. It contains over a decade of distilled knowledge and shows an evolution in home PC entertainment
  6. It is useful for makers and DIY enthusiasts
  7. It is powerful and will empower people who choose to learn it

Come find us on our Discord. DM "@Retrofriends" or join #framework to start a conversation with the author. http://discord.gg/MduSuX3

Additional documentation can be found on the wiki https://github.com/LAGameStudio/apolune/wiki

Sponsoring, Donations and Contribution

As the primary author, initiator and only vested official team member, I do appreciate donations and any donations will be used to fund making of video tutorials, documentation and code cleanup. Depending on the amount of accumulated donations, I may attempt to form a non-profit corporation around this project. The current spend of this project is $5/month to support the cost of hosting it on Github.com since the size of the repo is slightly larger than 2GB.

Another great way to support the project is to buy our games on STEAM, which you may find by visiting LostAstronaut.com or by searching steam for "Apolune" and looking for "Lost Astronaut Studios" on the Store pages.

If you download this project, please Star it.

With more stars we can get an Open Collective account to collect additional sponsorships.

If you use this project, please Watch it.

If you care about this project, please Sponsor it, or Contribute (see CONTRIBUTING.md for more information)

Feel free to make requests by reporting issues, as they will be considered and appropriately prioritized.

Fork us

Feel free to create Pull requests with fixes and suggested improvements only after you have tested them. Explain why you are making the request in the comment section of the request. We have a lax but optional Pull Request Template.

Features

A massive 1800+ class 1400 file extravaganza of OpenGL, WinAPI, OpenAL and many other features, written in Visual Studio for over a decade!

Technicals:

  • Supports building all the way back to Win 7 (Win32 only)
  • Written entirely in Visual Studio (Visual C++)
  • OpenAL (Audio Layer)
  • OpenGL and GLSL (Graphics Layer)
  • Unified device interface: Supports Multitouch (WinTouch), XInput, Direct Input, dinput8 (live keyboard detections), Mouse, Logitech Kit (Legacy option)
  • WinAPI (WinProc) and Messaging, Windows Dialogs, and COM (for OS dialog support)
  • Reimplementations in Integer, Float and Double precision
  • Built on ultra-fast LinkedLists and ZIndexed and ultra-lightweight ZeroTypes Library (https://zero.handmade.network) (no need for BOOST)
  • Textural datafiles in JSON and/or a proprietary "HDATA" format reminiscent of Poser files

OpenGL Implementations:

  • GLSetup Threaded-Texture-Loading OpenGL 3.1 compatibility context (for widest support)
  • Texture uploading
  • Full shaded GLSL integration
  • VBOs, IBOs, EBOs
  • FBOs (multisample)
  • DisplayLists (deprecated) and pBuffer (deprecated!)
  • GLWindow "OpenGL Extensible Windowing System" that ties to interface events

Image support:

  • GDI+ (PNG and JPG read/write)
  • Procedural image processing and generation support
  • CPU image manipulation
  • GPU texture uploads
  • GLImage texture library (TextureLibrary, management as global singleton)
  • Fit, stretch, and other types of real-time manipulation
  • Grid-based texture manipulation
  • Atlas textures

Animation Features:

  • Curves and paths
  • AStar pathfinding
  • Tweens and easing (Waveform animation)
  • Enhanced 2D and 2.5D collision, and 3D collisions
  • Several particle effect libraries
  • Box2D implementation for use with anything
  • Platformer tiles
  • 2D Top-Down Navigation AI
  • Many useful programmable and configurable implementions of visual effects like cracking, lightning, destruction, breaking, fading
  • Presentation / Slide classes implementing a way to do programmatic interactive and cut-scene movies

Geometry:

  • STL, OBJ, PLY
  • Generative primitives in 3D
  • Cube-mapped Sphere Generation
  • Extensive Vertex, mPolygon and ImmediateModel support classes for handling 3D geometry
  • Cartesian 2D helper and its family of related classes
  • Semi-automatic element "caching"
  • Rounded rectangle generation
  • Bin packing
  • Z-sorting for 2.5D

Fonts:

  • Texture atlas fonts (ATFont)
  • Bitmap texture fonts (TexFont)
  • 2D vector font format (Art2D)
  • 3D extruded font format (TTFEx font style)

UI:

  • Proce55ing-style object-oriented (Proce55or, Proce55ors, Pro55essViewer including buttons, sliders, text boxes, NPCs etc)
  • Panning 2D environments utilizing UI elements as framework
  • Wrappable worlds
  • Zone-activated ultra-large 2D worlds
  • Customizable OpenGL implemented UI framework options: GLWindow (first-tier game panel framework), "FastGUI" function-based UI programming, "EditGUI" (window-based) elemental semi-auto UI framework

Audio:

  • OpenAL 1.1 Community Edition
  • Source loading, mixing
  • AI Disc Jockeying with crossfades
  • Long-form audio streams
  • FLAC, WAV, etc via LibSndFile
  • EFX/EAX (Legacy Creative Sound)

Networking and threading:

  • RESTful support
  • VAST peer-to-peer support
  • Sockets
  • WinThreads and fallback to pThreads (legacy)

Shaders:

  • Entire Orange Book and Red Book implementations (legacy shaders)
  • Bloom
  • Photoshop-like layering shaders
  • 3D Normal Mapping, Phong Light Model
  • Shadow Shaders for 2D
  • Multilight Shaders
  • Over 100 individual effects!!

Collision

  • FBO Depth Stencil with Readback for "pixel perfect 2D collision"
  • Trigger.h which includes lots of useful ways of detecting collision including "shooting through a circle", "box-line" "line-line" "circle-line" tests.

Utilities:

  • 1D/2D Vector (Indexed / ZIndexed)
  • Auto-zeroed POD-non-POD classes (ZeroTypes)
  • String manipulation and handling of Strings (linkedlist) and KV pairs
  • Command line options wrangling
  • Macro-based class building supporting ONE-MANY-DONE mantra and the ability to easily add "to/from" string support for files and network interfaces
  • Math math and more math!
  • Extensive random numbers support including random.org atmospheric randomizations and pseudorandoms
  • Roguelike dungeon generation

Getting Started

Select "Release" mode for 32 bit. 64 bit does not build and will not work.

Clean. After you are done with "Build All", copy the contents of DLLs to the target folder (probably SolutionDir/Release)

The project filters are carefully organized.

"Application" is your application, and most likely the work you will do will involve adding new files to the "Game" filter/folder under this. When you first download this repo, the "Game" filter contains the Apolune game. You can modify this to get started, or you can stick all of those subfilters into Apolune, then create new ones. The entire application is built off the singleton "windows" -- to that you add derivatives of the GLWindow class, and those can contain many of the other classes, including other derivatives of GLWindow, which you can "hook in" to your GLWindow. You can also switch between GLWindows and you can also build distinct pieces of UI as overlay using multiple GLWindows.

"Framework" contains all of the utilities, helper classes, OpenGL, OpenAL and other middleware classes. Worth exploring. It is organized by purpose. Skimming through the

View on GitHub
GitHub Stars97
CategoryDevelopment
Updated29d ago
Forks9

Languages

C++

Security Score

85/100

Audited on Mar 2, 2026

No findings