WEDPlus: bridge from WED to Lite-C

Posted By: Joozey

WEDPlus: bridge from WED to Lite-C - 11/12/10 03:54

Project name may change.



EEK! WHATS THIS!? GET IT OFF ME!
I hear you scream inside. But fear not! This is WEDPlus, an editor I had in mind to bridge the distance between WED and Lite-C. It has bothered me every time, as a programmer, to somehow make up links between level content and code through entity skills, entity actions, and using obscure and soul-cringing workarounds. Be it a group of enemy entities placed in WED that needs to end up in your enemy linkedlist somehow, or a series of stargate models that need to be connected through a space-lane in one way or another, you'll end up being forced to use entity skills (eeww) or something, I don't know, just couldn't stand it anymore. That's why I started this project.

SO WHAT DOES IT DO?!
Well, it's supposed to do exactly what I feel WED is missing, much more interaction with your Lite-C code in the build level. Add a bezier path with a push on the button for your enemies to walk on, or your spacelane to extend over. Able to modify these beziers using control points as if it were Adobe Illustrator (well not really close). Or create a list and click entities to group them to the list. Simple as that. This editor extends your levels with your scripts in an interactive way.

HOW DOES IT WORK EZAKLY?
You create a level in WED with entities, blocks, all that, and compile to .wmb. You also start coding the game and make functions for, say, an enemy dropship to drop enemies in an awesome flight before the player's nose. So dropship in place in WED. Fly ability and Drop actions ready in lite-c, and now comes WEDPlus around the corner. Load your .wmb in the editor, add a nice bezierpath with a few clicks and tweaks to also make it roll neatly on the proper time, and you save. Now there is a code file generated that you need to include in your game code. This file contains the creation of the bezierpath at runtime as you put it in the editor, and is easily referenced from your main game code. Assign the dropship to the bezierpath and see it move over it.

ISN'T THIS SORTA LIKE GED?
Maybe, didn't dare to touch GED. But I suppose GED does not have the ability to add pieces of code by the user. I'm working on a way to script ones own plugins. The plugin config file that you script links your lite-c code to the visual part in WEDPlus. This script is not Lite-C but more of a configuration script where you tell the editor what you need for which function. Does your code require three modifiable vectors to generate an electricity triangle? Then three control-handles is what you get to see and manipulate.

Okay, maybe I'm a bit early to post :D, as I don't have too much to show yet, but it's getting near interesting results. I'd like to have your opinion on the usefulness on such an editor. Spawn ideas at heart.

Take a look for what I have so far here:
http://www.youtube.com/watch?v=3_Vqw9OiDls

This thread shall be updated as I go.

Credits to Lukas and Sp|ke for creating LBGui! It's a relief that I don't need to create my own GUI system laugh always hated that part of gamedesign. It's pretty easy to use and adapt. So far I walked only against some minor issues, which is awesome as I always try to push the limits. Many kudo's for that!

Cheers,
Joozey
Posted By: Nowherebrain

Re: WEDPlus: bridge from WED to Lite-C - 11/12/10 04:21

sounds interesting, I started as pure 3D guy and code more and more....I think there is a big need to run game and change code in realtime......but due to precompiling I don't know how hard that would be to implement...(very, I assume).
Posted By: WretchedSid

Re: WEDPlus: bridge from WED to Lite-C - 11/12/10 09:52

The problem isn't the compiling of the code at runtime, but linking it with the current running code.
A dll could be linked at runtime (thats where its name came from), but it will be hard to control your code from an dll.

Another way would be a two processes that uses inter-process communication (dunno if Windows is good with this, but I really like the message generator of Mach) but this has incredible performance penalties because you need to switch the context (process -> kernel -> process) far too often for this (this is btw the reason why we still have monolithic kernels like Linux and no micro kernels like Mach).


About the editor: Could you please change the skin. I really like LBGUI, but the skin is awful.
Posted By: Lukas

Re: WEDPlus: bridge from WED to Lite-C - 11/12/10 22:02

Looks nice. But will it also be able to reload a generated code file and manipulate the bezier paths?

Nice to see a project ready to be showed that actually uses my LBGUI. laugh
Posted By: Joozey

Re: WEDPlus: bridge from WED to Lite-C - 11/13/10 00:56

The editor does not realtime load your level with your game code. It loads purely the .wmb, and the added code extension. The tool is not meant to be a realtime editor, but for extending the level with code that have an interaction/visual purpose. I meantioned beziers for creating curved paths, but also collision/trigger areas, manipulating a terrain, sculpting a metablob in a specific form, anything that runs on code but requires more advanced manipulation controls than WED offers.

Sadly I found no way to extend a 3dgs application with new lite-c code without the use of DLL's (which I'm not gonna do), so the game still needs to be compiled separately to really see the results, but the generated code file will load all the code as you configured in the editor. That's what I mainly wanted to make easier.

@Lukas:
Yes, what is stored are the settings of the controls manipulated in the editor. These settings are applied to and used by your code at runtime, and only applied on the controls and code in the editor.

It's really easy to extend LBGUI with, say, a view or a list used to display and select files from a folder, without any glitches. I really like it laugh.
Posted By: TechMuc

Re: WEDPlus: bridge from WED to Lite-C - 11/13/10 07:44

GED once was able to handle and parse user code laugh doesn't matter i would love to see such an working editor that can handle any user-code..
Posted By: Joozey

Re: WEDPlus: bridge from WED to Lite-C - 11/20/10 00:40

Quote:
GED once was able to handle and parse user code laugh doesn't matter i would love to see such an working editor that can handle any user-code..

As long as you don't have expectations on "handling user code" too high, it will work tongue. Still figuring a bit how to best approach it to be convenient of use for the user. Maybe a little wizard where users can generate an ini file for their additional codes helps. Shouldn't be too much work with lbgui.

For now I'm still stuck at properly loading a user defined script into a structure. Lite-C sucks pretty much at that. For one I will be bound by a set amount of arguments to be passed at a user defined function. I guess most can live with that.
© 2024 lite-C Forums