Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - cai

Pages: [1]
1
help / General Help Resources
« on: Wed, May 4, 2011 »
Links

Getting Started

Using FlashDevelop

Using FlashBuilder

Using MXMLC (command line)


If any links are broken or out-of-date, or if you want something added to the list, please send me a private message with your changes!

2
games / Elidia
« on: Sun, May 1, 2011 »

Elidia is a game I made for Ludum Dare 20, a 48 hour game making competition.  The theme for the competition was "It's Dangerous to go Alone!  Take this!"

Many people went for very Zelda-inspired games, but I wanted to do something completely different!  Elidia is an endurance game where your goal is to last as long as possible.  You get items at regular intervals which will help you to survive.

If you participated in Ludum Dare, you can vote on the game here.

Let me know what you think!  I won't be able to update the game while the competition is running, but I will definitely be adding a lot more polish over time.

3
chat / Ludum Dare 20
« on: Wed, Apr 20, 2011 »
Anybody else plan on entering the Ludum Dare game making competition?  The 20th one begins on April 29th, which is coming up pretty soon.

For those of you who don't know about Ludum Dare, it's a 48 hour long solo game making competition, where you create a game from scratch based on a theme which is voted on.  You can read more about it over on their website.

Running at the same time, there is also the Ludum Dare jam where you have 72 hours to complete a game, and you can use teammates.

For those of you who have never done it before, it is a really fun experience.  I would definitely reccomend it all game developers, no matter their skill level!

4
chat / The "Guess That Game" Game
« on: Thu, Dec 2, 2010 »
This has been pretty fun on some other forums, so I figured I'd try it here.

The game is quite simple.  Someone posts a picture of a game, and the person to guess what game that is gets to post the next picture of a game.

So, I'll start.  What game is this?

5
games / Fromulus
« on: Sun, Aug 22, 2010 »
So for the latest Ludum Dare, I made this little game about a wizard.  His name is Fromulus, and he uses elemental magic against enemies.



Play it now!

Press Z to shoot and X to cycle between Water, Fire, Earth, and Air spells.

Currently the earth spell does nothing but shake the ground.  Eventually it'll do something else.

I did all the art and coding in 48 hours, so expect plenty of bugs.  I'd appreciate all feedback you have!

6
chat / Ludum Dare 18
« on: Thu, Aug 19, 2010 »
Anyone planning on doing the Ludum Dare this time around?

Basically you have 48 hours to create a game from scratch.  This time around they're also doing a game jam, which is more lax on rules and has an extra 24 hours, so it makes it a lot easier to enter.

I had an awesome time doing it last time, and highly suggest doing it.  The time constraint definitely makes you get more done than you'd think.

Here's the list of possible themes this time around:
- Bugs
- Cheating Death
- Claustrophobia
- Cloning
- Cooperation
- Darkness
- Double ZOMBIE Rainbow
- Dreams, Hallucinations or Mental Illness
- Enemies as Weapons
- Evolution
- Flight
- Hidden Depths
- Isolation
- Non-standard Game Over
- Panic
- Rain
- Skyscrapers
- Technology in the wrong time period

You can vote for any of the themes now, and the final theme will be announced tomorrow at 9pm!

7
Hopefully the question doesn't need any further explanation... ;)

If you were familiar with ActionScript, how familiar were you?  Perhaps you used it years ago, perhaps you even work for Adobe.
If you were not familiar at all, how much programming experience did you have?  Is the syntax something you picked up easily, or is different from anything you've seen?

I'm putting together a tutorial, and I'd like to gauge how much I should explain syntax and such.  It seems to me like a lot of people start using ActionScript just because they found flixel, but I'd like to get a more measurable response.

Thanks!

8
releases / FlxButtons with push states
« on: Sun, May 9, 2010 »
So I've been needing buttons with a different state when they're pushed.  I decided that rather than write around FlxButton and implement it differently, I would just alter FlxButton to support the normal state, the hover state, and a push state.

There is now a third parameter to loadGraphic() and loadtext().  You still can specify null for the second parameter if you don't have a hover state.
I have also altered it so that the push state is shown when the button is toggled on.

I'd like if some people would test it out and provide feedback.  I've put it as an issue on github, so you can also make comments there.

Here is the updated FlxButton.as:
Code: [Select]
package org.flixel
{
import flash.events.MouseEvent;

/**
* A simple button class that calls a function when clicked by the mouse.
* Supports labels, highlight states, and parallax scrolling.
*/
public class FlxButton extends FlxGroup
{
/**
* Used for checkbox-style behavior.
*/
protected var _onToggle:Boolean;
/**
* Stores the 'off' or normal button state graphic.
*/
protected var _off:FlxSprite;
/**
* Stores the 'on' or highlighted button state graphic.
*/
protected var _on:FlxSprite;
/**
* Stores the 'active' or pushed button state graphic.
*/
protected var _active:FlxSprite;
/**
* Stores the 'off' or normal button state label.
*/
protected var _offT:FlxText;
/**
* Stores the 'on' or highlighted button state label.
*/
protected var _onT:FlxText;
/**
* Stores the 'active' or pushed button state label.
*/
protected var _activeT:FlxText;
/**
* This function is called when the button is clicked.
*/
protected var _callback:Function;
/**
* Tracks whether the button is normal, hovered, or pushed.
*/
protected var _state:int;
/**
* Whether or not the button has initialized itself yet.
*/
protected var _initialized:Boolean;
/**
* Helper variable for correcting its members' <code>scrollFactor</code> objects.
*/
protected var _sf:FlxPoint;

/**
* Creates a new <code>FlxButton</code> object with a gray background
* and a callback function on the UI thread.
*
* @param X The X position of the button.
* @param Y The Y position of the button.
* @param Callback The function to call whenever the button is clicked.
*/
public function FlxButton(X:int,Y:int,Callback:Function)
{
super();
x = X;
y = Y;
width = 100;
height = 20;
_off = new FlxSprite().createGraphic(width,height,0xff7f7f7f);
_off.solid = false;
add(_off,true);
_on  = new FlxSprite().createGraphic(width,height,0xffffffff);
_on.solid = false;
add(_on, true);
_active  = new FlxSprite().createGraphic(width,height,0xffcccccc);
_active.solid = false;
add(_active,true);
_offT = null;
_onT = null;
_activeT = null;
_callback = Callback;
_onToggle = false;
_state = 0;
_initialized = false;
_sf = null;
}

/**
* Set your own image as the button background.
*
* @param Image A FlxSprite object to use for the button background.
* @param ImageHighlight A FlxSprite object to use for the button background when highlighted (optional).
* @param ImageActive A FlxSprite object to use for the button background when pushed (optional).
*
* @return This FlxButton instance (nice for chaining stuff together, if you're into that).
*/
public function loadGraphic(Image:FlxSprite,ImageHighlight:FlxSprite=null,ImageActive:FlxSprite=null):FlxButton
{
_off = replace(_off,Image) as FlxSprite;
if(ImageHighlight == null)
{
if(_on != _off)
remove(_on);
_on = _off;
}
else
_on = replace(_on,ImageHighlight) as FlxSprite;
if(ImageActive == null)
{
if(_active != _off)
remove(_active);
_active = _off;
}
else
if (ImageActive != null)
_active = replace(_active,ImageActive) as FlxSprite;
_on.solid = _off.solid = _active.solid = false;
_off.scrollFactor = scrollFactor;
_on.scrollFactor = scrollFactor;
_active.scrollFactor = scrollFactor;
width = _off.width;
height = _off.height;
refreshHulls();
return this;
}

/**
* Add a text label to the button.
*
* @param Text A FlxText object to use to display text on this button (optional).
* @param TextHighlight A FlxText object that is used when the button is highlighted (optional).
* @param TextActive A FlxText object that is used when the button is pressed (optional).
*
* @return This FlxButton instance (nice for chaining stuff together, if you're into that).
*/
public function loadText(Text:FlxText,TextHighlight:FlxText=null,TextActive:FlxText=null):FlxButton
{
if(Text != null)
{
if(_offT == null)
{
_offT = Text;
add(_offT);
}
else
_offT = replace(_offT,Text) as FlxText;
}
if(TextHighlight == null)
_onT = _offT;
else
{
if(_onT == null)
{
_onT = TextHighlight;
add(_onT);
}
else
_onT = replace(_onT,TextHighlight) as FlxText;
}
if(TextActive == null)
_activeT = _offT;
else
{
if(_activeT == null)
{
_activeT = TextHighlight;
add(_activeT);
}
else
_activeT = replace(_activeT,TextHighlight) as FlxText;
}
_offT.scrollFactor = scrollFactor;
_onT.scrollFactor = scrollFactor;
_activeT.scrollFactor = scrollFactor;
return this;
}

/**
* Called by the game loop automatically, handles mouseover and click detection.
*/
override public function update():void
{
if(!_initialized)
{
if(FlxG.stage != null)
{
FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_initialized = true;
}
}

super.update();

_state = 0;
if(overlapsPoint(FlxG.mouse.x,FlxG.mouse.y))
{
if(!FlxG.mouse.pressed())
_state = 1;
else
_state = 2;
}
if (_onToggle)
_state = 2;
switch (_state)
{
case 0: // Off
_on.visible = _active.visible = false;
if(_onT != null) _onT.visible = false;
if(_activeT != null) _activeT.visible = false;
_off.visible = true;
if(_offT != null) _offT.visible = true;
break;
case 1: // On
_off.visible = _active.visible = false;
if(_offT != null) _offT.visible = false;
if(_activeT != null) _activeT.visible = false;
_on.visible = true;
if(_onT != null) _onT.visible = true;
break;
case 2: // Active
_on.visible = _off.visible = false;
if(_offT != null) _offT.visible = false;
if(_onT != null) _onT.visible = false;
_active.visible = true;
if(_activeT != null) _activeT.visible = true;
break;
}
}

/**
* Use this to toggle checkbox-style behavior.
*/
public function get on():Boolean
{
return _onToggle;
}

/**
* @private
*/
public function set on(On:Boolean):void
{
_onToggle = On;
}

/**
* Called by the game state when state is changed (if this object belongs to the state)
*/
override public function destroy():void
{
if(FlxG.stage != null)
FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}

/**
* Internal function for handling the actual callback call (for UI thread dependent calls like <code>FlxU.openURL()</code>).
*/
protected function onMouseUp(event:MouseEvent):void
{
if(!exists || !visible || !active || !FlxG.mouse.justReleased() || (_callback == null)) return;
if(overlapsPoint(FlxG.mouse.x,FlxG.mouse.y)) _callback();
}
}
}

9
games / Eden Island
« on: Mon, Apr 26, 2010 »
This is a game that a couple of us did in 48 hours for a contest, which I've continued to develop.  Germille did the art, bftd did the sprites and some music, some other guy did the rest of the music, and I did the coding.

Play now!


You can find the full source on github.

I've added a bunch of updates to the game, mainly in code cleanup.  You'll note now that it has an interface!  You can play entirely with the mouse, but the keyboard keys work, too (Q, W, E, R, etc.).

Edit: added link to the source on github; added some updates to the game; rewrote this post

Pages: [1]