Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

J3SU to L3SU

Sign in to follow this  


I've started the porting of the code, it looks to have gone pretty smoothly all things told, but that's mostly down to the way the orignal script was written.

For the most part I'm done, however it still won't run as I'm missing a few things, as show by my 'todo' list;

- keyboard input hookup
- add a main loop somewhere
- alpha blending support!!!

- create various font packs as required
-- gui
-- gui2
-- instructions

OK, so not a HUGE todo list but still things I need to fix up.

The keyboard input is a matter of creating a table to act as something for the code to call; I forgot that in the orignal code I just registered an instance of a Java class as 'keyboard' in Lua and used that to query key state. So, I'll throw in a table and the same functions todo the same job in Lua and just drive it via the events hookup I've got.

Alpha blending is something I forgot I had in the orignal; Bonsai does have alpha test however I was going for a real fade so I guess I should add this in. It'll only be a matter of a couple of functions so shouldn't take long.

The various fonts are required for text printing; in the original Java version the internal routines were used to draw text, however as we don't have them nor any dynamically rendered font support I'll just have to use the Anglecode BMF tool to create a few fonts to use.

Finally, a main loop is required, this'll probably go in the l3su_startup.lua file.

The startup sequence is basically;
- run 'Startup.exe'
-- this creates a Lua enviroment and loads startup.lua
- startup.lua includes the engine.dll (which in turn loads the windowmgr.dll) via a 'requires' statement at the top

Startup.lua is then pretty much free to do what it likes to bring the game up. What I'll probably do is 'require("l3su_startup")' which will do all it's startup and then enter a loop.

Once the loop exits (via whatever means) "l3su_startup" will effectively exit, which will cause "startup.lua" to exit and the whole system shuts down.

So, tomorrow afternoon (sunday) I'll get the missing bits in and then work on getting the game workable.

Once the game is workable my next two steps are;
- sounds and music
- alternative input (joysticks and Xbox360 controller)

With those two added to the engine.dll I will add the functionality to the game to give them a real test. After that it'll be a case of adding a method to save/restore user options (such as screen size, input method, sound options, that sort of thing); for this I'll probably use Sneftel's 'pluto' addon to do the required streaming in and out.

Once those are done, pending anything else which needs adding C++ wise, I'll effectively have a small game engine and, more importantly, a test game built... huzzah!

Who knows, with this all in place maybe I'll enter a game contest at some point, it's always much easier when you've some backing technology to work from [smile]
Sign in to follow this  


Recommended Comments

There are no comments to display.

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!