Jump to content
  • entries
    18
  • comments
    69
  • views
    553042

LightWave - Phase 1 finished.

Sign in to follow this  
slicer4ever

740 views

Today i'd like to talk about a new framework i've been working on. Honestly i expect myself to be the only person to ever reasonable use this framework, but it is a challenge that i one day hope will not only be beneficially to me, but to others as well. After about 2 months of work, i've finally finished the first phase, today i intend to write about the end goals of my framework, and what the framework will do.

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:
-LWCore-
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.

-LWPlatform-
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-
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-
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).

-LWNetwork-
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.
Sign in to follow this  


6 Comments


Recommended Comments

Sounds like a nice (and big) challenge. Is it just for learning? I'd say there's an audience for a high level (in a positive way) framework like this. Good luck on the development

Share this comment


Link to comment

Sounds like a nice (and big) challenge. Is it just for learning? I'd say there's an audience for a high level (in a positive way) framework like this. Good luck on the development

partially for learning(never branched much outside of programming for windows), and because i wanted to do things that my previous frameworks would have required a massive changes to accommodate. as well this one has the intention of eventually being released for use with the public, so it's being heavily documented at the same time.

Share this comment


Link to comment

Keep up the good work.  I do however wish there was a link to this thing somewhere (or maybe I don't ... cause i don't want to be too influenced by what others are doing) ...

 

But you may want to consider a name change, you are very likely to get into a trademark dispute with 1 of the original top 3d modeling applicaitons / engines ... http://en.wikipedia.org/wiki/LightWave_3D

 

I was working on a role playing game system and world named "Amethyst" until a friend showed me the already existing one with same name and dozens of books published ... still haven't decided on my replacement name yet.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!