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.


Messages - Kytin

Pages: [1] 2
1
games / Re: The Great Minimum [finished]
« on: Tue, Feb 7, 2012 »
I didn't really get the poem, but I appreciate the artistry. Kind of like Today I Die, even though The Great Minimum didn't speak to me like it did.

2
games / Re: DragonFlight (prototype)
« on: Sun, Dec 11, 2011 »
Update!

I have decreased the amount of time the player has to wait between flaps (which has the side effect of increasing the heights that they can reach with each flap), and added a fudge factor that creates perfectly timed flaps as long as it is within a tenth of a second of actually being perfect.

Decreasing the flap time has had the effect that if the player just keeps flapping, they can rise to any height without gliding at all. This was a bad thing when the player had infinite stamina, but does not matter so much now.

3
games / Re: DragonFlight (prototype)
« on: Fri, Dec 9, 2011 »
Hi, Kytin. The sprites look very nice! I played it a little bit and in my opinion the controls still need some work. It isn't easy jumping from a place to another, and when I did, i slided through the plataform and fell. Also, sometimes you're standing in a plataform and the dragon starts to slide =P ...Maybe its just a matter of adjusting the values of gravity, drag, etc. And waiting for that yellow bar to refill is a little frustrating, sometimes it seems the controls aren't responding. I'd work on that before diving into effects, sounds, levels, etc. Waiting for the next version!

The sliding is intentional. It was added to prevent the oddity where the player could stand on the edge of a block and not fall because he had one toe still on solid ground. That said, I may have overdone it. I have toned it down so that the player won't slide unless at least half of their body is off the ground. I have also added some more starting stamina to make it easier to get around, and to give people a better idea of how the movement is supposed to work.

All the art is (so far) my own, so thanks. I appreciate the all the feedback.

Updated swf

4
games / Re: Muli Camera Platform Puzzle Game
« on: Fri, Dec 9, 2011 »
I think it could be quite good. Might be good if you can put in a story reason for the the odd cameras. It reminds me of K.O.L.M. a little bit.

5
games / DragonFlight (prototype)
« on: Fri, Dec 9, 2011 »
Thought I would share what I have so far for my 2d platformer. It's still at the prototype stage so it is still missing some significant features (such as sound and music).

DragonFlight
Arrow keys move. 'Z' attacks.
'UP' flaps your wings. Press and hold 'UP' to glide while moving through the air.
Eating dead enemies restores health.
Eating white bats increases maximum stamina (the yellow bar).
'DOWN' interacts with environmental objects (doors and save points).
'ESC' will return you to the main menu.





Major features still needed:
Breath weapons
Sounds
Music
Scripted/cinematic events
Additional enemy types
Complete series of levels

6
help / Re: FlxSave only works locally [Fixed!]
« on: Tue, Dec 6, 2011 »
Fixed! Turns out that the problem was using containers for the variables I was saving (i.e I was saving player data as _save.data.player.x rather than as _save.data.playerX). Still don't know why it worked on my computer but not online.

7
help / Re: FlxSave only works locally
« on: Tue, Dec 6, 2011 »
Seems I made a mistake earlier. The FlxSave is successfully binding (or at least returning true when it binds), but when I go to load a game it finds that the save.data is null.

8
help / Re: moving a block help
« on: Mon, Dec 5, 2011 »
So I only want the block to move if ( hero._y + hero._height > block._y )

Shouldn't that be if ( hero._y + hero._height < block._y )?
The way you have it, the block only moves when the player is above it.

Also, I did a collide test with level to level because the blocks fall through the platform if I don't.

Is there a better way to do this?

Create a separate group for the blocks and collide that group against the level. This also has the advanage that you can collide them with the player separately, using a different function if you choose.

9
help / Re: Keep Enemy On A Simple Platform/Floor
« on: Mon, Dec 5, 2011 »
This code causes the enemy character to turn around whenever it walks into a wall, or is about to walk off a cliff.

Code: [Select]
//turn around when you encounter a wall
if (isTouching(facing))
{
turnAround();
}

//check if you are about to walk off a cliff
var lowerCornerCheck:FlxPoint = new FlxPoint(x, y + height + 6);
if (facing == LEFT)
{
lowerCornerCheck.x = x - 1;
}
else
{
lowerCornerCheck.x = x + width + 1;
}

//when walking, turn around if you are about to walk off a cliff
if (isTouching(FLOOR))
{
if (!Registry.level.mainLayer.overlapsPoint(lowerCornerCheck))
{
turnAround();
}
}

The turnAround function does what it sounds like - swaps the way the character is facing, and reverses the horizontal velocity.

10
help / Re: Spike ground: ¿tile or sprite?
« on: Mon, Dec 5, 2011 »
While you could set the properties for the spike tiles to use a customized collision function (to give a different sized/shaped bounding box, and kill the player if said collision is detected), it might be easier to just use sprites.
On the other hand, if the spikes are part of the tileset then you will probably have an easier time adding lots of them when creating your levels. It might depend on how many spikes you plan to use.

11
help / Re: FlxSave only works locally
« on: Mon, Dec 5, 2011 »
Ok, I checked flash in the control panel. It was already set to allow flash player to store data on my computer. I deleted the data from a few things I don't need anymore, and checked my uploaded swf again. I still have the same problem.

12
help / Re: FlxSave only works locally
« on: Mon, Dec 5, 2011 »
I changed my settings to allow unlimited storage space and it made no difference. I also checked where the sharedobjects were being saved, and there was only one, even after several save/load attempts.

13
help / FlxSave only works locally [Fixed!]
« on: Sun, Dec 4, 2011 »
I recently got my game prototype to the stage where I'm happy to start showing it around. Unfortunately, after I upload it to a hosting site, I find that it no longer saves and loads the way it does when I run the swf from my computer. I'm using FlxSave, and as far as I can tell, I have done everything correctly.

I figure I'm probably just overlooking some simple thing, but I really haven't been able to determine what. It's quite frustrating as I can't use the debugger to see what all my code is doing.


Anyway, here's the relevant code:
Code: [Select]
package 
{
/**
* ...
* @author Stephen Ashby
*/
import org.flixel.*;
import flash.utils.*;
 
public class PlayState extends FlxState
{
public var level:BaseLevel;
//public var player:Player;

private static var _save:FlxSave; //The FlxSave instance
private static var canUseSave:Boolean = false; //Did bind() work? Do we have a valid SharedObject?

public static function initSaves():void
{
_save = new FlxSave();
canUseSave = _save.bind("savegame");

Registry.initializeEventFlags();

//if the save file has never been used before, create the eventFlags array
if (_save.data.eventFlags == null)
{
_save.data.eventFlags = new Array();
for each(var f:Boolean in Registry.eventFlags)
{
(_save.data.boxPositions as Array).push(f);
}
}
}

override public function create():void
{
if ( canUseSave == false)
trace("Failed to initialize savestate! Your game cannot be saved!");

if (Registry.level == null && Registry.nextLevel == null)
Registry.setLevel(DemoLevel1);

if (Registry.player == null)
Registry.player = new Player(34.000, 448.000);


FlxG.worldBounds = new FlxRect(0, 0, 80 * 16, 30 * 16);
}

public function PlayState():void
{
super();
initSaves();
}

override public function update():void
{
super.update();

if (FlxG.keys.justPressed("S"))
{
Registry.saveTheGame = true;
}

if (FlxG.keys.justPressed("L"))
{
loadGame();
}

if (FlxG.keys.justPressed("D"))
{
//do debug stuff
level.alive = true;
}


if (Registry.saveTheGame)
{
Registry.saveTheGame = false;
saveGame();
}
//if Registry.setLevel() has been called, but not acted on
//change the level to the new one
if (Registry.nextLevel != null)
{
levelChange();
}

if (FlxG.keys.justPressed("ESCAPE"))
{
Registry.gotoMainMenu = true;
}

if (Registry.gotoMainMenu)
{
  Registry.gotoMainMenu = false;


clearPlayer();
clearLevel();
FlxG.switchState(new MenuState());
}
}

//clears the currently loaded player character
public function clearPlayer():void
{
//destroy current player character, if there is one
if (Registry.player != null)
{
Registry.player.destroy();
Registry.player = null;
}
}

//clears the currently loaded level
public function clearLevel():void
{
//destroy current level, if there is one
if (level != null)
{ level.destroy(); }
remove(level);
Registry.level = null;

}

private function levelChange():void
{
//clear the current level
clearLevel();

//load new level
level = new Registry.nextLevel();
level.addPlayer();
add(level);
Registry.level = level;

Registry.currentLevel = Registry.nextLevel;
Registry.nextLevel = null;
}

private function saveGame():void
{

if (canUseSave)
{
_save.data.player.x = Registry.player.x;
_save.data.player.y = Registry.player.y;
_save.data.player.maxHealth = Registry.player.maxHealth;
_save.data.player.maxStamina = Registry.player.maxStamina;
var levelName:String = flash.utils.getQualifiedClassName( Registry.currentLevel );
_save.data.level = levelName;

var counter:uint = 0;
for each(var f:Boolean in Registry.eventFlags)
{
_save.data.eventFlags[counter] = f;
counter++;
}
}
else
{
trace("Savestate was not initialized. Your game cannot save.");
}
}

public function loadGame():void
{
clearPlayer();
clearLevel();

if (canUseSave && _save.data.player == null)
{
//if there is no saved game, start a new game
Registry.player = new Player(304.000, 202.000);
Registry.setLevel(Level2);
}
else if(canUseSave && _save.data.player != null)
{
//load the game properly
Registry.player = new Player(_save.data.player.x, _save.data.player.y, _save.data.player.maxHealth, _save.data.player.maxStamina);
Registry.setLevel(flash.utils.getDefinitionByName( _save.data.level ) as Class);


for (var i:uint; i < Registry.eventFlags.length; i++ )
{
Registry.eventFlags[i] = _save.data.eventFlags[i];

}
}
else
{
//if the save file does not load (corrupted?)...
trace("Savestate was not initialized. Your game cannot load.");
//... start a new game
Registry.player = new Player(304.000, 202.000);
Registry.setLevel(Level2);
}
}
}

}

EDIT: fixed a bug that was unrelated.
Also, a link to the swf: http://megaswf.com/serve/1385343/



After looking at things a bit closer, it appears that the FlxSave is failing to bind. Would this be due to my local flash setting, and if so, what do I need to change?





14
help / Re: Enemy movement question/bug.
« on: Thu, Dec 1, 2011 »
I have to echo c023-DeVs comment. Are you using collide or overlap checks to detect collisions between the player and enemies? You should be using overlap, if you aren't already.

15
help / Re: Flipping sprites Ingame and hit flashes?
« on: Sun, Nov 27, 2011 »
I'm looking to add hit flashes as well, but the method here only seems to work for making them darker, and was hoping to make them flash white. Am I missing something, or is it just not possible?

16
My inclination would be to put all instances of explosion objects in their own group, and in the update for the playstate call an overlap check of that group against the player, with a callback to a function that kills the player if an overlap is detected.

e.g. "FlxG.overlap(explosionGroup, player, killPlayer);"

17
Just thought I would say that these are great.  :-*
Nicely made and easy for people to understand.

18
help / Re: Bullet Origin from a Rotating Gun Barrel
« on: Tue, Nov 22, 2011 »
Get the angle of the turret as a normalised vector (or point), mutiply this vector by the length of the turret, and add it to the origin of the turret. This is the position of the tip of the barrel.

Actually, the Powertools have a function that would do most of this for you (more or less). Call FlxVelocity.velocityFromAngle, but for the speed parameter put in the length of the barrel. That will get you the position of the tip of the barrel relative to the origin.

19
Hmm. I've been using Paint.net. It's pretty basic, but I don't think I would use much more than what it has anyway. About the only thing that I would like is something that would allow me to easily preview animations while I am working on them.

20
chat / Re: Awesome sound effects generator web app
« on: Thu, Nov 10, 2011 »
Nice. I expect I will make significant use of this. Thanks for the link!

Pages: [1] 2