Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Vehicle Plug-in :: DBP

Author
Message
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 28th Mar 2007 17:02 Edited at: 28th Mar 2007 17:07
Vehicle Plug-in WIP

What it is:

Basically? Its a plug-in for DBP, that provides a large command-set to help with creating vehicles - in both 2d and 3d - for your games. The system is based on "entries". You create an entry, set it's position and other various options, and the plug-in will provide you with a lot of info; if someone is in-range of an entry, if they're entering, who is in an entry, etc. You can even set the scancode required to be pressed to enter the vehicle, and the amount of game-loops the entry will wait before completing the entry (if you'd like to play enter/exit animations for example).

The entry system is the first half, tags are the second. Basically, a tag is what represents a possible passenger in the game. You call the handle entry(x#,y#,z#,tag) command, providing your player's xyz location (or xz and no y for 2D) and a tag ID (can be any integer). If a tag is detected entering an entry, the entry stores the tag in it's passenger list, for access later.

Along with the setup and handling commands, theres a tonne of data-retrieval and helper commands as well. Below is a list of all of the commands currently;

Setting Commands >>


Retrieval Commands >>


Helper Commands >>


Using the above commands, creating a rudimentary vehicle system is really simple;




The system is almost finished, Im just adding a few more helper commands and I need to tweak the entry loops system to work better for animations. Other than that, possibly an addition of a timer for the enttry key being pressed instead of a toggle, and it'll be done.

The idea is, of course, to take it further. Ideally you'd set up limbs at seats in your vehicle model. You'd then position entries at the limbs, play enter/exit animations when the user is entering/exiting, use the camera travel command to pan the camera back when the user enters a vehicle, and then detect when a user is in a vehicle using the in entry() command, handling vehicle physics/control appropriately if so.

I might charge for it, depending on how useful people think it might be. If I do it'll only be 4 or 5 dollars (unless I pimp it out with a lot of other commands), but we'll see.

Please post any ideas for other commands, comments on the system, etc here. Im pretty much looking for feedback before I polish it off.
- RUC'

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 28th Mar 2007 23:59 Edited at: 29th Mar 2007 04:23
Command-set Update

Glue/Unglue Object to Entry

Just added a variation on the current glue commands. Now, you can either glue an entry to an object to have the entry constantly follow the object around, with local offsets, just like a limb, but also, you can glue as many objects as you want onto an entry. Glueing an object to multiple entries will result in the object being glued to the most recently created/glued entry. And of course unglueing commands are in as well.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Apr 2007 14:51
Hold on... Will this handle vehicle physics as well? I'm kinda confused on what exactly this does.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 3rd Apr 2007 15:20
No, it handles entering/exiting vehicles, locking characters into vehicle seates, giving different vehicle seats different options (like a gunner seat vs a driver seat), and has some generic vehicle movement commands to handle vehicle movement quickly.

Basically you could set up an entry on a motorcycle for example, what key to be pressed to enter, the radius of the entry point activation area, etc, and the plug-in will tell you when a user is activating an entry, if they're entering, exiting, entered, or exited, if an entry is occupied, a bunch of stuff like that.

This way setting up vehicles is really fast, you model your vehicle, add a limb to it named something like "driver seat", find the limb number that has the name driver seat in your program, create an entry / glue it to the driver seat limb, set all the data for the entry in 1 line, call handle entries in the main loop, and then retrieve data on the entry at any time. You could do a quick if in_entry(1,1) then vehicle movement code here else person movement code here.

Although its on hold until I get a better grasp on C++ seeing as PurePLUGIN isnt an option for me anymore.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Apr 2007 18:08 Edited at: 3rd Apr 2007 18:08
Oh I see. Sounds useful!

Login to post a reply

Server time is: 2024-11-27 17:59:27
Your offset time is: 2024-11-27 17:59:27