Showing posts with label game. Show all posts
Showing posts with label game. Show all posts

Thursday, 30 December 2010

Half Day Challenge: Melee


Got distracted there for a while so things ran on for more than half a day. Still, this is the last update.

Just to round things out I added in melee. Very simply when a unit activates it scans for adjacent enemy units and then distributes its melee attack across them. By rights it should also lock movement, but that's for another time.

The end result is a skeleton for a more advanced system. At the moment there are no real rules, but I've tried to use a modular system that would make it easier to expand. The visuals are also more at the abstract end of the spectrum, but they could be replaced with small figures or, maybe in an OpenSim megaregion, full-size models.

Half Day Challenge: Ranged

Unable to display content. Adobe Flash is required.

The video shows the basic movement and ranged combat.

This first system is as basic as they come. The player selects a target and the unit uses the llSensor function to see if it is within range. If it is then it informs the target that it has taken damage.

Of course usually there would be a random check made based on the distance to target and units skill, and possibly random damage as well.

Half Day Challenge: Movement


A few overheads in setting up, but I now have a HUD that controls orientation and movement. I'm using the llDetectedUV function for both.

For the rotation this touch coordinate needs to be converted to an angle, which you can do using the llAtan2 function - just remember to subtract 0.5 from both x and y to move the origin to the centre.

vector touchPoint = llDetectedTouchUV(0);
float angle = llAtan2(touchPoint.y - 0.5, touchPoint.x - 0.5);

The angle will need adjusting so that clockwise is positive 0-180, and anticlockwise is negative. The OpenSim version that I'm using (0.7.02) returns inconsistent results for the four 90 degree quarters, so it might take some trial and error depending on what system you're using.

For movement, I'm just passing on the x component. Since this is just a number between 0 and 1 I'll use it to scale the movement. While on the subject, moving objects "forwards" is very easy using the built-in functions:

// Get the current rotation
rotation myRot = llGetRot();

// Get the vector that is pointing "forwards"
vector fwd = llRot2Fwd(myRot);

// Get the current position
vector myPos = llGetPos();

// Move forward a distance based on variables maxSpeed and movementScale
myPos = myPos + (fwd * maxSpeed * movementScale);


Just remember that an objects forward direction is along its positive x axis.

Time for lunch.

Half Day Game Development Challenge

I've found some free time over the Christmas break, so I thought that I'd devote half a day to working on a game project - it is the title of this blog after-all.

SL-based platforms aren't a good choice for real-time games. Basically, unless you're running a dedicated sim in SL with very little on it, then lag is going to be a major problem. As much as I love OpenSim, its performance would be even worse.

I've always thought that SL is a better platform for turn-based games. If you think about real-life, apart from sports, most games are turn-based, from hopscotch, to Monopoly, to Warhammer, to poker, to spin-the-bottle. Although this is hardly an epiphany, since most of the games that I've come across in SL were turn-based.

Anyway, since New World Notes reported that SL's new CEO had worked on some Open Source miniature wargame rules, that seemed like a perfect fit. I'll update on progress.

Wednesday, 25 February 2009

Store Locations

**Update 2009-06-22: I ran out of Lindens and the stores closed. Now I'm back in the black I might open another, but nothing is decided yet. **

I've been looking into setting up a store for a while; and now I have two. They are 'stores' more in the literal sense of being places to store my games, rather than being shops, since everything is FREE.

The locations are:

Wild Hollow: SLURL


Celebration: SLURL

The Wild Hollow store has a higher prim allowance and so there are some extra decorations, but both will have identical content. Tell your friends.

Friday, 13 February 2009

Pocket Battler: Faery Update

... and the faery graphics/model - which still requires some work. In fact it's taking the most work in all respects; control, attack effects, attack coding, and texturing. Let's just say its not my favourite.

Pocket Battler: Pirate Ship update


... and here's the updated graphics/model for the pirate ship.

Wednesday, 11 February 2009

Pocket Battler: Tank Update

Just a quick update to show the tailored HUD and new model for the tank Pocket Battler. Area effect damage is now also working.

Monday, 19 January 2009

Pocket Battlers - Generation 1 prototypes

At the moment I'm just getting a few ideas out of my head, and into working prototypes. One of these is Pocket Battlers, in which you control a small 'Battler' (as a sub-avatar?) that can move around and launch various attacks. A major feature is that these Battlers can be very different, for example in the first generation with be a tank, a pirate ship and a faery; all with appropriate movement and unique attacks.

The second major feature is the power bar, through which attacks are activated. Power gradually accumulates over time, and each attack requires a certain amount of power before it can be used. When an attack is used then a portion of the power is used up. You can see it in action at the end of the video below (there's no sound so don't go fiddling with your volume control).



They still need a bit of dressing up, but after a few small tweaks they'll be at the stage where they can be fought against each other (I just need to add in area-effect damage).

Credits: The particle systems used for the faery are based on free examples available at 'The Particle Lab' in SL, and the faery's wings are by Jane Mc Carthy.

Saturday, 6 December 2008

Cannons and Castles

Version 1 of the game is all but complete, and provided an excuse for my first Machinima production. As expected more time was spent learning the tools than making creative decisions, but it turned out well.



In the game two players compete to destroy each other's castles. It's basically an extended version of rock-paper-scissors. You pick one of three of your opponent's towers to attack with your cannon, and one of three of your own towers to defend with your wall. The towers add a level of strategy since each one can only be hit twice, and you need 4 hits in total to win.

IM me in-world to try it out.

Wednesday, 25 April 2007

Spider-Fly game nearing completion


Above is the Spider-Fly game that I have been working on recently. It is a 2 player game, where the objective is to be the spider and catch the fly.

Players sit on the coloured stools and the matching coloured ring identifies the creature they control - which is set randomly when the game starts. Players can issue 3 moves each turn (via a HUD), and the role of spider/fly can also switch randomly between turns.

The scripting is done, so all that's left is to add a lick of paint and it'll be ready to play. Expect an update soon.

Thursday, 28 December 2006

Next Project

SL Buttonmen has moved to a promotional stage, which I hadn't really thought of and am still not sure how to proceed. However, while I have the luxury of being in-world for hours at a time I thought I'd continue making.

Shown in the image is a four-player game called Droid Arena. Players issue a series of instructions through their individual consoles to a robot in the arena (a 5x5 square grid). The robots then act out the instructions in sequence. There'll be power-ups and missiles and landmines etc.

But still early days

Saturday, 23 December 2006

SL Buttonmen V1- Beta released

The Beta version of SL Buttonmen has been finished. In the image above you can see my avatar (19th century flavour) wearing one of the buttons, and the rezzed dice set in front.

There are currently 3 Buttonmen from the soldiers series available: Karl, Avis and Bauer. The remaining soldiers should follow soon after, and then other sets with their unique features (no decision on which ones yet though).

Above is the free button vendor (my first), and I'm currently looking for places to house it. It also gives notecards on how to play the game and use the SL system.

------------------------------------------------

Buttonmen is a two player game, where each has a set of dice, and the aim is to capture your opponent's and gain a higher score. The set of dice each player uses depends on the Buttonmen character that they choose. In SL the button can also search for players in the area, and the dice values are displayed in text hovering over the dice objects.

Full details of the real-world game can be found online at http://www.cheapass.com/bpu/start.html