Main Page

From vx
Jump to: navigation, search

Contents

About vx

vx, (preferably pronounced 'vee echs' since it's an acronym -- although 'vex' is okay too) a "[v]erge e[x]tension", attempts to give a sophisticated interface with the free Verge 2D Game Engine. It wraps the raw LuaVerge library that comes with Verge in a more modern, object-oriented approach, to cater to those of us who like lightly sprinkled object-orientation rather than purely procedural code in their Lua programs.

vx is something made by Overkill, one of the Verge engine developers, so you can be sure it's fairly up-to-date with the engine!

To use the vx library, simply make sure that the vx folder is contained as a subfolder in your game directory, and type:
require "vx"

This'll import the vx library, plus some other neat and very useful global functions. One of these useful things is overriding of Lua's builtin print(...) function, so it'll properly direct the output to the "v3.log" file. Note to self: these need to be better documented

It's also garbage collected! So any resources you no longer need will eventually be removed without the worry or need to explicitly free things (although the option for that is still here).

Downloading and Using vx

To get the latest version of vx, go to: http://www.bananattack.com/vx/vx.zip It contains all the library goodies which allow vx to work.

There is a bit of setup required to use it with your project, but nothing colossal:

  1. For now, the latest Verge executable that has stable Lua support can be acquired from http://www.bananattack.com/stuff/verge.exe
    (there are a few major issues being worked on behind the scenes, caused by incompatibilities with our Lua binding library, and efficiency concerns that want to be looked at)
  2. To ensure that everything setup-wise goes smoothly, please make a folder with only the bare minimum to get Verge running (verge.exe, verge.cfg, fmod.dll, I think that might be it!).
  3. Edit verge.cfg and ensure that lua 1 is in there somewhere to make Verge run as LuaVerge.
  4. Extract vx.zip to your workspace. If you do this right, you should have a subfolder called "vx" in the folder as all your verge jump.
    • Note: You should not have a folder called "vx" within this "vx" folder. if that happened please fix that. LuaVerge can't load vx otherwise.
  5. Copy the Hello World! example as a way of testing that you've set everything up properly.

And with that, you should be done! Code a game to your heart's content! Read the tutorials and examples for inspiration.

Prod at the documentation to understand what variables, function and objects are in vx, and what attributes and methods belong to each object.

Finally, if you have any questions, ask! If you have questions or concerns, go to the Verge Help Board at http://www.verge-rpg.com/ or join the channel #vergehelp on irc://irc.lunarnet.org/

Contributing to vx

To get the most recent development build of vx, you will probably want a Subversion client (like TortoiseSVN for Windows).

Then checkout this repository using the SVN client.

Contents of the vx namepsace

Examples using vx

Little code snippets that document and explain things about vx.

Please, feel free to add new examples to this list. Fresh examples are what keep people informed and motivated!

Tutorials

A list of helpful guides to use in making games with vx.

If you write any tutorials, please tack them on here. I'm in the process of writing my own.

More information

If you're curious about Verge, check out this:

Some other useful guides to Lua include the following:

  • The Lua Manual is the official API documentation, which has the formal description of its code, but has very little examples.
  • Programming in Lua (PIL) is a good reference for examples on various language features, though somewhat awkward to read.
  • lua-users wiki is extremely helpful. The library descriptions are fairly well done. A word of caution though: some of their "workaround" code is kind of hairy.
Personal tools