What is Lightwave?
Lightwave is actually designed to both a simplified windowing, input, rendering, audio, and networking framework as well as eventually an advance rendering engine for use in future games. the framework and the rendering engine will be completely separate in terms of usability, the goal of the framework is that simple 2D and 3D games, as well as eventually the rendering engine can be built off of it, without ever having to touch any underlying os specific code, and maintain a single code base for various platforms. the framework itself will deal with all of the various platforms to try and present a uniform code base that can work on the targeted platforms.
What is Lightwave targeting?
The first goal to reach is support of windows, mac, linux(ubuntu distro's to be more specific, but anything which uses the x11 window library for managing the windowing segment should work.), iOS, and Android. writing a framework that uniformly supports both desktop, and mobile inputs is not easy to say the least, and at the end of the day it'll be up to the application end to ensure it supports all the inputs for desktop and/or mobile versions of there game.
How will the framework be designed?
the framework is being split into 5 modules:
This component is the basis of the entire framework, it's intended to have a good math library(vector2/3/4, matrix, quaternion, and various necessary math operations for writing 2D and 3D games), independent byte order reading/writing mechanisms, UTF-8 text support that supports both dynamic and static stack text allocations, support for custom allocation schemes, several multi-threaded safe containers(such as FIFO queue's, maps, link lists, etc), and finally a high resolution timer class(a bit redundant with std::chrono, but it simplifies the use of std::chrono). The core module will surely see some expansion as the framework is worked on, but at the moment it's goal is to remain c++11 compliant, and require no external dependency's on any of the targeted platforms in question.
This is the juggernaut of a module which makes of much of the meat of the framework, it consists of alot of platform-specific code, to present a uniform interface to applications, this module supply's cross-platform windowing support(this however acts as a semaphore for android and iOS unfortunately), file and directory i/o support, input device support(such as mouse, keyboard, gamepad, touch, etc), software keyboard support for android and iOS, switching display modes for the primary window. it is my hope that i can contain most of the platform specific code here, and minimize the amount of platform specific code modules that depend on this module will require.
LWVideo module is one of the main reasons that i wanted to build this framework, the design of this component is to feature several key features that are to be independent from the underlying architecture that is used but still maintain some of the general requirements for both 2D and 3D games : shader, video buffers, meshs(built ontop of video buffers), framebuffers, textures(2D, 3D, Cubemaps), images, and font rendering. each of these classes will be created from a base video driver class which implements DirectX11, OpenGL3.3, OpenGL ES 2.0, under the hood to present a uniform interface to the application. I'd also like to make note of the font rendering being handled here, although a goal of the framework is not to get very high level, i have come to the decision that rendering text is nearly universal requirment of any application, so it is to be done here, instead of in the highlevel rendering engine.
LWAudio module supports a uniform audio interface for applications to use, each audio component is owned by an AudioDriver object, which controls universal volume. each Audio object controls a series of stream objects, and each stream is actually playing or not playing audio at any time. the audio component will not be very advanced, this is mostly due to my shortcoming in audio handling in general. I'd considered playing with openAL to play wav, and FLAC files, with possible mp3 support(although mp3 support presents potential legal issues).
The networking module is relatively simple, the underlying object is the LWSocket object, which supports either UDP or TCP packets, reading and sending data between sockets. above the LWSocket object is the LWProtocolManager, each socket is tagged with a protocol ID, and when it receives data, it will call the appropriate callback for that protocol, it also supports non-blocking listening for any incoming socket data. finally the LWPacketManager and LWPacket classes support simple encoding and decoding of packets of information, the LWPacket class is intended to be derived by the application for w/e packets it requires, and registering them with the LWPacketManager for any protocol the application is listening for, rather that be a custom protocol, or well known protocol.
These 5 modules are intended to make up the entire framework, and provide applications a simple and uniform code-base that works across all targeted platforms, without having to delve into numerous different languages, and design decisions imposed by different platforms. with phase 1 completion today, i've created the bare-bones for each of my targeted platforms, with a full event loop being ran, and basic window, and input completed, alot of work is still required, but today is the day when i finally start to branch out and flesh out each module. I'll likely update this journal once i've reached another major milestone.