Jump to content
  • entry
    1
  • comment
    1
  • views
    4,354

RogSys and Leadwerks -- the first month...


Michael_J

2,136 views

 Share

blog-0253340001396499326.jpgHi all,

 

Although I have forums for RogSys where I typically post development updates, I thought I'd start a blog here that covers the Leadwerks-specific aspects of it. Maybe someone will find an odd bit of information here and there that might be useful. For this first entry I'll give you a bit of history on what brought me to Leadwerks, and how the first month of engine integration has gone. A casual warning: I'm typing on the fly and I don't have much edit time, so you'll excuse any fairly blatant typos smile.png

 

An engine change was not something I'd planned on AT ALL. I spent several months trying out different engines early on in order to avoid such a situation. I checked their features (and lack of) until I finally found one that fit the bill. For a long time that engine worked very well, at least while it was being supported. However, back in December, after having just signed with Image Space Incorporated to bring some funding to RogSys development, it became readily obvious that the author of the engine had bailed on it (despite many emails and promises to the contrary).

 

I broke out my notes about the other engines I'd looked at and created a short-list of possible replacements. The list was VERY short, actually--zero in fact. So, I started looking at fresh alternatives. It HAD been a couple years since I was on the market. During the search I happened to recall a sim titled Combat Helo; and having liked what they had accomplished to date, AND since RogSys is VERY sim-like, I decided to give Leadwerks a look.

 

Version 3.1 was getting ready to come out, I'd discovered, and the deferred renderer caught my interest. I knew there was somewhat of an overhead with a deferred system, but the lighting possibilities quickly make up for that. Also, after spending a few evenings with the online API reference I realized Le's command set was similar to what I'd been using. I knew there could be some issues with a fresh engine version (bugs, etc), but based on the forum communication from Josh I felt the support was there and any potential problems would be fixed up.

 

Understandably, ISI began to get a tad nervous about the situation. I told them about my decision to go with Leadwerks. They were fine with it as long as I could get some momentum going ASAP. I'd already started re-coding my old engine wrapper based around the Le API, but obviously it was impossible to test until I had something I could compile against. So, Josh managed to hook me up with the C++ project template for the Indie version.

 

The first item to tackle was getting my foreground and background worlds rendering over top of each other. Because of the scale of RogSys (an entire galactic arm) I render the celestial objects at one scale in the BG world, and all the local elements at 1 to 1 in the foreground world. Klepto2 and Shadmar were gracious enough to help with this early implementation. While it works well enough for now, with a deferred renderer two worlds probably isn't the most efficient method. If Josh can add support at some point to allow me to force certain objects to render behind others (or some other method of manual sorting) I can move everything into one world. But, for now, I at least had a system that allowed me to move forward.

 

The next step was to get all of my data files to play nice with Leadwerks. All of the ships in RogSys are built from different systems that can be mixed and matched, so nothing is predetermined. The same ship hull could have a slew of different components added to it (internally AND externally) and thus no two ships are rarely alike. Also, a BIG feature is the ability for the user to mod it--adding new ships, ship systems, missions, etc. It's all externalized.These are features that aren't terribly important in the initial release, but in the first update I'll be adding a sandbox-like exploration mode and that's when these will play a major role. But, they're very low-level and so have to work from day one.

 

So, once I read in the data from my LUA tables I had to get Leadwerks to build materials on the fly from various shaders and maps, all of which are defined in the setup files. This took about a week. When loading and using resources on the fly probably the biggest note I could make is to remember to release the temporary elements (textures, shapes, etc).

 

By this time I had a pretty good grasp of the basic engine, but as I moved into the low-level stuff I had lots of questions. I can tell by the editor and LUA scripting that Josh has worked hard to allow novices the ability to bring game ideas to life and to keep them "safe" from the lower API. But for my needs, I had to get down in there. A big thanks to Josh and others for always being Johnny-on-the-spot with answers. smile.png My item of advice here is to always do a forum search first. While I had lots of questions, I can tell you I answered MOST of them on my own with a quick search. It was the ones when I got "no results found" where I had to ask for help.

 

On the C++ side, one of the things that tripped me up a lot at first was the format:

 

someShape = Shape::Create();

 

I can't tell you how many times I would type:

 

someShape->Create();

 

which compiles, but does not give the results you'd expect. Silly, I know smile.png

 

Once I had objects loading and being surfaced the way I needed things became a bit more straight-forward. I can now walk around inside my station interior, load and position docked ships to the proper stalls. I have ray casting working so the player can look at and use items. The online tutorials were a big help getting familiar with some of these basic things--thanks to Aggror, Rick and Josh for those. USE them--they help.

 

And, I think I've been typing for a while now, and I have to get back to work, so I'll end this here. I was really going for a general overview of what brought me here, and I think I have that covered smile.png From here out I'll try to focus a bit more on specific items and how I handle them in Le. I'll probably talk about various hooks first--I'm already finding them very useful.

 

One last note, and it's probably most important, thanks to Shadmar for offering to help me out with some shader work. Not having to get my head around GLSL right now is a HUGE time saver; and I appreciate it! And again, thanks to Josh and anyone else who's helped me out over the past couple of months.

 

Cheers....

  • Upvote 11
 Share

1 Comment


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...