Oxeye Game Studio » Lua http://www.oxeyegames.com Creative Games Wed, 29 Nov 2017 08:29:26 +0000 http://wordpress.org/?v=2.8.4 en hourly 1 Cobalt v103 Alpha change-log http://www.oxeyegames.com/cobalt-v103-alpha-change-log/ http://www.oxeyegames.com/cobalt-v103-alpha-change-log/#comments Mon, 09 Apr 2012 15:57:04 +0000 thewreck http://www.oxeyegames.com/?p=798 Hi!

Cobalt v103 Alpha is finally ready, and it contains improvements in many spread out unrelated areas, however, the biggest addition is the Map Editor! For the people who have accessed the editor previously, there is a huge amount of unlisted changes that have been made, but for the others, this will simply be the first encounter with making your own maps.

Bugs discovered post upload:

  1. Due to the reorganization of the maps, there are some oddities if you are updating from v102. You might see some duplicate maps with different names in your menu. If this happens, reinstall the game from a v103, or clean out the maps folder prior to updating. (all map files that does NOT have a .localization file next to it are old.)
  2. The map editor will crash if you try to place a tile that has a default ID (which goes for a lot of important tiles). This crash is bad enough that if you are already using the map editor, it is advisable to keep separate installations.

If you find bugs, please post them at http://getsatisfaction.com/cobalt/ we will be making another update tomorrow!

Hit more to read all about it!

As of this writing there is no official manual on how the editor works, and since many things are likely to change, it is unlikely this will be written anytime soon. However, I know the community has been experimenting and documenting like crazy over at www.cobaltforum.net/. and while some of that will be outdated with the changes in v103, many concepts will be very relevant, and the forums are also likely to be your best bet for finding help on this topic.

To get you started, here is a quick guide how to create your first map:

  • Open the editor from the main menu.
  • Goto [File] and select “New”, pick “Outdoors” and “Small”
  • Goto [File] and select “Save As…”, name the map “dm_myfirstmap”
  • First thing you need to do is make sure you are in the correct layer. Press and HOLD Z, hover over “Collision” and release Z.
  • Press T, select “Actors” from the list on the left, scroll down until you find the “Spawn Point” and click it
  • Place a couple of spawnpoints around the map
  • Press T again, now select “Boxes” and pick a box you like on the right.
  • Place a couple of boxes around the map
  • Press esc to stop placing boxes, then select a spawn point by clicking it. Then open [edit] at the top menu bar and click “Expand”. This will select all spawn points.
  • Right click one of the spawn points, select “Spawn Settings” from the context menu. In the dialog, put a check next to all the teams to make this spawnpoint valid for all teams.
  • Goto [Stage] and click “Set Game Mode”. Select “scorematch” from the list on the left, pick “kills” in the objective list on the right. Set the goal to 10.
  • Goto [Stage] and click “Set Camera Mode”. Click “apply preset” and select pick “versus” list that pops up.
  • There should be a gray tile looking like a character with a green outline somewhere on the map. Select it! If you cannot select it, it might be in a different layer than the one you are in. Hover the mouse over it, and press the middle mouse button to instantly go to the layer the tile you are hovering is in. If it does not exist, you can find it by pressing T, hitting ENTER, and writing “playerspawn”.  Right click the tile, click “Set Spawn Action”. In the dialog, check all the teams and hit OK!.
  • Goto [File] and select “Save & Copy to Menu”
  • Goto [File] and select “Close Editor”
  • Find your map in the deathmatch list under after play!

For the prospective mappers out there, we have added rudimentary support for populating the in-game menu with your custom maps! If you are working on a map in the editor, you simply go to [File] and select “Save & Copy to Menu” and your map will show up in the menu! Keep in mind that the menu only loads maps that have one of the following prefixes in their name:

  • ctp_ Capture the Plug
  • dm_ Deathmatch
  • sur_ Survival
  • bo_ Bounty

If you have downloaded maps from the internet, place the maps in your /maps/ folder and they will be added to the menu (as long as they have the correct prefix!). The name and the description screen that comes up when you select your map will default to its filename, but there is support for editing this as well! First, under [Stage] in the menu in the editor, there is a button called “Edit Meta Data”. In the dialog  that pops up, you can define the follwing:

  • author will show up as “by YOURNAME”
  • workInProgress will add a strong red Work in Progress warning
  • difficulty describes the general difficulty of the map
  • minPlayers lowest suggested players
  • maxPlayers highers suggested players

If you leave any of these as their default value, they will be omitted from the description of your map. Finally, to change the actual name of the map in the list or to write a flavor text, you must create a brand new file with the file extension “.localization”. For example:

dm_coolmap257.map
dm_coolmap257.localization

The reason this is needed is because the name and the description has to be custom written for each language that the map will support, while difficulty for example will be translated centrally by us for all maps. Edit the localization file with a text editor of your choice and paste the following:

{
    eng = { --English Translation
        name = "Cool Map", --Name of the Map, will show up in the list
        description = "This is a cool map", --Description of the map
    }
}

The map will work fine without a localization file, but it offers greater customization. I recommend you keep this file in maps_dev and use the “Save & Copy to Menu” action under [File] as it will copy both your map and localization file to the menu.

change-log

Alterations:

  • Custom levels placed in maps with either ctp_ dm_ or sur_ will now be loaded into the menu.
  • Removed all girders from cannon arena and tweaked design and weapons.
  • Improved head flying off rendering, also made all body parts be colored by the original actor.
  • Objects and items that are destroyed (by explosions and heat for example) now have better feedback
  • Tweaked object healths
  • Added new deathmatch map, Gladiator
  • Added new ctp map, Frozen
  • Added new ctp map, Volcano
  • Added new bounty map, Rumble in the City
  • New preference in profile for always showing your player name under your actor
  • Plug now has health and will die from sustained explosions and lava, and will respawn when destroyed.
  • Jet shoes now do less damage initially, but also do heat damage over time.
  • Extended the map filters for future use.
  • Added bounty AI and better bounty hud.

Bug-Fixes:

Safest gate left door is now lockable again.
Garbage Collection has been turned off by mistake. This has been a big since v101. This is likely the cause for many periodic performance drop issues.
Score hud being incorrectly scaled in some resolutions.
extended magazined and other ammo increasing upgrades now also add ammo as they used to.
burners no longer generate bullet time warnings
thermal bombs that were destroyed by lava and plasma for example would not explode.
spare ammo icon no longer shown for salvaged weapons
fixed some clipping metal hit sounds
smoothed out a glowing trail jaggedness bug.
  • Safest gate left door is now lockable again.
  • Garbage Collection has been turned off by mistake. This has been a big since v101. This is likely the cause for many periodic performance drop issues.
  • Score hud being incorrectly scaled in some resolutions.
  • extended magazined and other ammo increasing upgrades now also add ammo as they used to.
  • burners no longer generate bullet time warnings
  • thermal bombs that were destroyed by lava and plasma for example would not explode.
  • spare ammo icon no longer shown for salvaged weapons
  • fixed some clipping metal hit sounds
  • smoothed out a glowing trail jaggedness bug.
]]>
http://www.oxeyegames.com/cobalt-v103-alpha-change-log/feed/ 27
Secret Gifts – Part Two – Heads-up http://www.oxeyegames.com/secret-gifts-part-two-heads-up/ http://www.oxeyegames.com/secret-gifts-part-two-heads-up/#comments Fri, 05 Feb 2010 08:36:29 +0000 http://www.oxeyegames.com/?p=238 I just wanted to give you a small heads-up on the next Project B secret gift!

The next gift will be sent to somebody who creates something interesting in our Lua prototyping engine, DaisyMoon. We haven’t decided on the hows, whens and whys yet, so the challenge hasn’t officially started yet. We’re waiting until the documentation is more complete and we have a Mac build working again (progress has been made).

Anthony Salter of Viridian Games has planned to do a small video blog series about DaisyMoon. Something to keep an eye on! :)

/jeb

]]>
http://www.oxeyegames.com/secret-gifts-part-two-heads-up/feed/ 1
Horror Tactics (Prototype) http://www.oxeyegames.com/horror-tactics-prototype/ http://www.oxeyegames.com/horror-tactics-prototype/#comments Mon, 23 Nov 2009 11:39:33 +0000 http://www.oxeyegames.com/?p=115 Hey

We’ve made a new game prototype called “Horror Tactics”. It’s a “move’em’up” kind of game inspired by Games Workshop’s old Space Hulk board game.

The game has been scripted in our DaisyMoon Lua engine, so you can view and edit the source code if you want to change settings or difficulty. The music has been made by Blackspawn.

Please give the prototype a go and give us feedback on what you think about it!

Windows: http://www.oxeyegames.com/files/HT/HorrorTactics.zip

You may also discuss this in our forums.

Cheers!

/jeb

]]>
http://www.oxeyegames.com/horror-tactics-prototype/feed/ 1
Lua Binding Woes http://www.oxeyegames.com/lua-binding-woes/ http://www.oxeyegames.com/lua-binding-woes/#comments Tue, 20 Jan 2009 19:21:19 +0000 http://www.oxeyegames.com/lua-binding-woes/ Lua LogoAs you know, we’ve been using Lua to make prototypes and add mod support to Harvest. However, I’ve always thought that the C++ binding we’ve used hasn’t really worked the way I’d like it to. Basically we’ve used simple C functions to create our own Lua library for callbacks, and some Lunar objects in Harvest. Lunar allows you to do stuff such as this:

local stuff = lib.getStuff()
stuff:foobar() — call C++ member method

However, it doesn’t allow you to do this:

local stuff = lib.getStuff()
stuff.onEvent = function(self) print(”Recieved event!”) end

The problem is that with Lunar all objects of the “stuff” class share the same meta table. It’s possible to modify the meta table in Lua by calling getmetatable(), but then you will be modifying the meta table of all instances of “stuff…”

In other words I needed a new solution. A friend over at #gamedev (at QuakeNet), Joris “Interface” de Gruyter, gave me a link to a Lua in C++ article at CodeProject. That was great, it had all kinds of useful stuff, but it required the script to be run for each object because it used a “this pointer” method, such as:

this:foobar() — call C++ member function
this.onEvent = function(self) end — create callback function

I can imagine this kind of system is great for certain kinds of projects, since it cleans up the Lua code and places different objects into different Lua files. However, this was still not what I wanted! So I scratched my head a while and looked around in the code of the two options… and then I realized they were combinable!

So the solution I used was to create a new Lunar-like class (called “Lunamatic,” after a famous Akarra/Harvest player), since it had that nice member-function pointer stuff, but instead of placing the meta table information in the global scope I recreated the table for every instance of the class. As you can imagine, this is less efficient than using a shared table, so it’s not useful in every situation, but sometimes. This way I could achieve what I was really looking for, namely:

local button1 = gui.createComponent(”button”)
local button2 = gui.createComponent(”button”)
button1:moveTo(100, 100)
button1.onClick = function(self) print(”foo”) end
button2.onClick = function(self) print(”bar”) end

Since our WordPress skin isn’t suitable for code dumps, I have put the juicy stuff in our forums. For the interested, pleace follow this link: http://www.oxeyegames.com/forum/viewtopic.php?f=13&t=346

/jeb

PS. The RTS article series will continue “in 2009″ :) DS.

]]>
http://www.oxeyegames.com/lua-binding-woes/feed/ 0
House Globe, Space RTS in the Second Dimension http://www.oxeyegames.com/house-globe-space-rts-in-the-second-dimension/ http://www.oxeyegames.com/house-globe-space-rts-in-the-second-dimension/#comments Sat, 30 Aug 2008 19:00:22 +0000 http://www.oxeyegames.com/house-globe-space-rts-in-the-second-dimension/ Remember “Because it’s fun, Fay?” It was a game we made for the TIGSource Procedural Generation Competition, held earlier this summer. We created it using our Lua script engine, Daisy Moon, which we usually use when we want to prototype different game ideas (we also use Multi-media Fusion sometimes, depending on the situation). The game turned out to be a two-player platform game with one character living in a rotated dimension, and with a JRPG end-boss fight. Maybe not our greatest game, but if you haven’t tried it, you can find it here.

Now it’s time for a new TIGSource competition and a new game! This time the theme is Bootleg Demakes, and people have posted over 100 threads about competition projects. A “bootleg” means “inofficial copy” and “demake” means “that is made to look as though it were running on older-generation hardware”. We could obviously not resist competing again and, using our Daisy Moon engine once more, created House Globe.

Hit the jump for the full story!

Artifact’s House Globe – 2D Real-time Strategy Game

Our competition entry is a demake of the classic Homeworld by Relic. If you haven’t played it, the short story is that Homeworld is a real-time strategy game in space. Your fleet is centered around your Mothership, which constructs units and is the drop-off zone for resources. In the game you are travelling through space in order to find your homeworld, while evil aliens attempt to destroy you (obviously).

When we began making the game we set our hardware target at the PC games of the mid-ninetees, think Dune 2 (i.e. the 320×240 resolution is intentional). We wanted to translate Homeworld’s 3D view to a flat 2D version, while keeping the key features that made Homeworld the game it is. That means your Mothership (called Maternal Vessel in House Globe) is the center piece of your fleet and will construct all units. It also means that we wanted to keep the tactical/strategical toggle that Homeworld has.

Beyond those initial concepts, we felt quite free to design our own game. We put much effort on making the “micro” part interesting (good control/response when moving units), and having a balanced technology tree. In the end we believe we managed to make a really good game in only 10 days or so.

Features:

  • 2D RTS
  • Single-player practice vs the computer
  • 1on1 online multi-player
  • Replay recordings of multi-player games

Screenshots:

Downloads:

Check the readme for game controls (it’s fairly inituitive). If you play any multi-player games, please send us the replay files! And… have fun! :)

/ jeb

]]>
http://www.oxeyegames.com/house-globe-space-rts-in-the-second-dimension/feed/ 15
Harvest Update, Version 1.14 http://www.oxeyegames.com/harvest-update-version-114/ http://www.oxeyegames.com/harvest-update-version-114/#comments Wed, 18 Jun 2008 17:50:22 +0000 http://www.oxeyegames.com/harvest-update-version-114/ It’s time for another “Harvest: Massive Encounter” update. The new version is numbered 1.14, and is a non-crucial patch that adds mod support to the Creative Mode. We have started a whole new section on the forums related to Harvest modding, head over there now and check out all the mods that are being made! The forum section also contains all the necessary information needed to get started with making your own mod. For example, check out How To Create Mods or How To Create Custom Graphics to get you going. All mods are open source and easily changeable in any text editing tool.

The patch contains the following mods:

  • Emulate Normal Mode: A mod that works just like the Normal Mode.
  • Emulate Rush Mode: A mod that works just like Rush Mode.
  • Emulate Wave Mode: A mod that works just like Wave Mode.
  • Starhawk: A mod that allows the player to send in a small fighter jet with custom graphics by entering “starhawk” in the input field that appears after pressing Enter ingame.
  • Super Gun: A mod that allows the player to upgrade defense towers into bullet spewing super guns! These guns don’t require energy, but instead eat credits when they need to refill ammo.
  • Infinite Credits: A mod that gives the player infinite credits.

Here’s the Mac OS X updater for registered users (2.6 MB). Open the dmg and run the patcher, then simply drag and drop the Harvest application on to the patcher’s window.

The Windows update is available here (1.3 MB). This patcher requires a previous installation of Harvest, simply use the same application folder when you run it.

Happy Modding!

]]>
http://www.oxeyegames.com/harvest-update-version-114/feed/ 12
Because it’s fun, Fay http://www.oxeyegames.com/because-its-fun-fay/ http://www.oxeyegames.com/because-its-fun-fay/#comments Mon, 02 Jun 2008 21:29:24 +0000 http://www.oxeyegames.com/because-its-fun-fay/ During the last couple of weeks we’ve been working on a small game for TIGSource’s Procedural Generation competition. The deadline is tonight, and we are just finished! The game’s called “Because it’s Fun, Fay”, and is about a woman called Fay who has been trapped in a tower by a lonely fairy known as Cornipolous. Not interested in being anybody’s pet prisoner, Fay decisively begins to find her way out of the tower. Cornipolous knows there are many dangerous monsters around, and he doesn’t want her to get hurt, so he’s forced to assist in her escape.

You can either play yourself or cooperatively with a friend, but in both cases the objective is to get Fay and Corn to the top of the tower, where an evil boss awaits. The topic of the competition was that the game should be different every time you play, so the game’s level and boss are randomized when the game begins. Download the game here:

Like the mods for Harvest, this game has been written completely in Lua. This has been an interesting experiment, and feels like an easy and quick way of testing new game ideas. You will probably see more of this from us :)

Hit the jump for a screenshot from the game…

]]>
http://www.oxeyegames.com/because-its-fun-fay/feed/ 17
Modding Harvest http://www.oxeyegames.com/modding-harvest/ http://www.oxeyegames.com/modding-harvest/#comments Wed, 30 Apr 2008 10:49:11 +0000 http://www.oxeyegames.com/modding-harvest/ Lua LogoAs some of you might already know, we’ve been working (experimenting) with adding Lua to Harvest. The mods allow you to alter the game rules in Creative Mode, and can be used to add new effects, triggers and even gameplay elements. While there still is a lot of work to be done (such as modifying alien AI), it’s already running nicely.

The mod support has its own forum category, where you will be able to find documentation and other people’s mods. So far we’ve released a “beta patch” for those who wants to try the mods or make their own ones. You find the patch, and some basic example mods, here: http://www.oxeyegames.com/forum/viewtopic.php?f=19&t=246

/jeb

]]>
http://www.oxeyegames.com/modding-harvest/feed/ 0