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 - zez

Pages: [1] 2
1
help / Handy dandy tile randomizer.
« on: Wed, Jan 5, 2011 »
I dunno about the rest of you, but I pretty much hate setting a million CSV values for tiles that basically act the same way, but have some minor difference visually too break up the 'grid'.

Thus, I made this helper class. It has two basic uses. The first is fairly simple and just generates a tile map that has a flood fill of random tiles. The later will take an embedded tile map, and randomize any tile(s) you tell it too.

Usage is fairly simple, you either flood fill like so
Code: [Select]
add(new randomtiles(tilesheet, true, a number between 0 and 1 that is the likelyhood of any given tile being random, the width in tiles, the height in tiles, the number of tiles on the sheet/ the last tile on the sheet you want too randomly show);

or you load an embedded tile map and randomize it like this
Code: [Select]
var ranmap:randomtiles = new randomtiles(tilesheet, false);
//make any changes too collideIndex or drawIndex or what have you the old fashioned way
ranmap.randomize(new embedded_map_csv, [tile, values, you, want, randomized], [range, of, tile, randomization], [chance, of, randomizing, tile]);
add(ranmap);
This bit should probably have the disclaimer that your arrays have to line up meaning tile[0] should be the first tile in whatever range of tiles the variation is for, randomrange[0] should be how many tiles away the last possible tile from tile[0] is, and variation[0] is how likely it is too change tile[0] too another tile.
Thus if tile[0] = 5, randomrange[0] = 5, and variation[0] =0.23, you have a 23% chance of changing every tile with a value of 5 too a tile with a value between 5 & 10.

Final bit of explanation, variation should be a number between 0 and 1. A value of 0 or less will NEVER randomize a tile, so you may as well just use FlxTilemap, and a value >= 1 will always randomize the tile (in the case of the second usage the tile corresponding the variation index.) You may very well want to use 1 sometimes, and in those cases there isnt really anything stopping you from using 1 billion instead of one, other then it being kind of silly.

Anyhow, heres the class in case anyone else wants it.
Code: [Select]
package com
{
import org.flixel.*;
public class randomtiles extends FlxTilemap
{
private var _tilessheet:Class;
public function randomtiles(tilesheet:Class, autogenerate:Boolean, variation:Number = 0, map_width:int = 0, map_height:int = 0, tiles:int = 0)
{
if (autogenerate == true)
{
var mapstring:String = "";
for (var i:int = 0; i < map_width * map_height; i++)
{
if (i % map_width == 0)
{
if (i > 0)
{
mapstring += "\n";
}
if (FlxU.random() < variation)
{
mapstring += (int(FlxU.random() * tiles)).toString();
}
else
{
mapstring += "0";
}
}
else if (FlxU.random() < variation)
{
mapstring += "," + (int(FlxU.random() * tiles)).toString();
}
else
{
mapstring += ",0";
}
}
drawIndex = 0;
loadMap(mapstring, tilesheet);
}
else
{
_tilessheet = tilesheet;
}
}
public function randomize(mapdata:String, tiles:Array, randomrange:Array, variation:Array):void
{
loadMap(mapdata, _tilessheet);
for (var t:int = 0; t < tiles.length; t++)
{
for (var i:int = 0; i < totalTiles; i++)
{
if (getTileByIndex(i) == tiles[t] && FlxU.random() < variation[t])
{
setTileByIndex(i, tiles[t] + int(FlxU.random() * randomrange[t]));
}
}
}

}

}

}

Should I maybe give it a user interface and make it just spit out CSV files, thus making it a "randomize tile map csv files" app instead of a flixel exclusive "make your maps randomize themselves on load" class?

It loads pretty quick and isnt particularly system intensive, even when doing the silly for loop in a for loop thing well randomizing existing maps (adds about 3ms to update on my box well doing stress tests, and doesnt change ram usage for long enough for me too read or notice the change,) so that isnt really an issue....

2
So... My current project, on a shoddy laptop from a while back (duel core amd turion @ 803 mhz, 960 megs of ram, running XP service pack 3,) is pretty much unplayable in flash player 10.1, whereas it runs kind of sort of mostly perfectly in 10.0 (I have some of the more system intensive stuff set up to only fire well FlxG.elapsed is < something, so the first thing to go is visual fluff, and it still runs most of it.)
In 10.1 it drops down to around 15 fps, and pretty much becomes unplayable.

I tried modifying FlxSprites advanced render stuff, and basicly just changed buffer.draw(_framePixels, stufffff) into buffer.draw(new Bitmap(_framePixels), that same stuff) and umm... got pretty much zero results. The game does render about twice as fast when I do it that way, but looking at the dev console, I dont really think thats whats breaking it (unless Im doing something totally bassackwards, always a possibility)

Anyhow, heres about the situation;
with "fix"
10.1
42~ ms update
8~ ms render
45~ ms flixel
60~ ms total
15~ fps
cpu - 50% ish
memory - starts at 40 megs, quickly jumps to 75, then rises to about 100 megs, idles there for a second, and then drops down too 75. It does this regardless of advanced rendering.

10.0
9~ ms update
6~ ms render
14 ~ ms flixel
20~ ms total
50~ fps
cpu - 50% ish
memory - 40 - 50 megs, fairly consistent.

without fix
10.1 mostly the same, render is about double when doing advanced rendering, frame rate is still around 15.
cpu - 50% is
memory 75 megs - 100 ish and then back.
10.0 no noticeable difference.
cpu - 50% ish
memory - 31megs - 76 ish and then back.

3
chat / Whats my motivation?
« on: Sat, Jul 24, 2010 »
Alright, so for about a million years, I have been working on this totally rad game. Its super gritty and set in a post-apocalyptic dystopian future, where WW3 happened a good while ago, all government fell, France got nuked by America, and pretty much all that remains as far as controlling forces go is one mega corporation and a few rival street gangs.
As far as backstory goes, Im set. As far as actual game plot goes, Im also set. Both are full of twists, deception, and heart break, and all tie together rather nicely (there are branching plots depending on how you play. Whoopdedoo.) I have motivations and origins for the supporting roles, but one is pretty much totally lacking.

The Main character has no name, and no reason whatsoever to be interesting or part of the game, other then that the player controls. That being said, he quickly gets swept up the course of events right after he takes a job for the last remaining mega corporation.

So, why the hell does he take the job?
The options I have given thought to are
1. Someone he loves is dying of cancer. The mega corporation have a cure (this part is totally true regardless of why he took the job.) He takes the job, cancer goes byebye. Game ends up being a tragedy.
2. He's totally motivated by getting the green. Fairly self explanatory, he wants the good life, american dream and all that. He's some sort of ruthless mercenary, cue anti-hero.
3. R-E-S-P-E-C-T find out what it meaaans too....
I dun really like this option to much, to be honest. Im not really sure how to write a character who's sole motivation is what other people think of him. Sounds like someone I would probably slap.
4. Sex. Yup, plain and simple, nookie is in short supply, and taking the job will get him laid. Kinda like Mario rescuing the princess. Thats cool. Kinda simple, but fairly relatable.
5. Hunger. For food. Yummy food. Dude is broke and starving, and this payoff could buy him a lot of taco's. I kinda like this option, mostly because (spoiler alert) he never gets payed, and could then spend most of the rest of the game trying to get food, and complaining in the midst of important dialogue about being hungry. Pretty much kills the gritty feeling of the rest of the plot, but thats not all bad. Plus, then I can make the game end with a hero's feast and everyone feeling good about themselves.

You can check out my devlog (theres a link in my signature) to get some clue about the rest of this here game... I dun have a playable build anymore, as I didd some silly stuff to make it easier to load levels into the game engine for testing, and as of such nothing loads if the permissions arent set up right, but its FAIIIRLY far along, just missing levels, some slight tweeking, more enemys, and the dialogue.

4
chat / flex builder for freeee
« on: Mon, Jul 5, 2010 »
http://www.adobe.com/devnet/flex/free/index.html?sdid=GXVTO

So yeah, Flex Builder is free if you meet a few criteria.
You must either be unemployed, a student, or an educator.
I fall into the latter category, so I get it for free, along with as many licenses as I need (want), just as soon as I get around to scanning my ID, but I would put money on many people on this board falling into at least one of those categorys.

5
help / FlxGamepad?
« on: Sun, Jun 20, 2010 »
So, this looks pretty rad, near as I can tell its designed to handle button mapping. Im assuming I would use FlxGamepad.bind(whatever,somethingelse,anotherthing, etcetc); to do that, but Im a little unsure on how to access it. It looks like there is an array in FlxG that is supposed to work like flxG.keys, but for gamepads, but I just get the usual array options with it. Is there a trick to setting it up for input? Is it just not totally implemented yet? Im curious, its a new toy.

6
help / filling an area with a sprite?
« on: Wed, May 19, 2010 »
So, my problem is basically this, Im trying to set it up so that there is water in the game Im working on. I need the player to be able to go both above and under the water, and have it have some effect on movement and such. Im thinking Im going to use a semi transparent sprite for the water itself, and use FlxU.overlap to modify the movement well under it. That part isnt tooo tricky at all, but it would be nice if there was a way to basically make the water fill an area. I know I can get it to basically make a giant rectangle using scale and adjusting the height and width to the final values, and I can even use getTile to figure out where to make the rectangle stop forming, but is there a good (by good, I mostly mean CHEAP) way to make it then create more sprites to fill the rest of the area (any area that is say, not in the rectangle?)
Maybe I could loop around the corners and make more water sprites that also fill a rectangle when its done? That seems like it would WORK, but might lead to tuns of sprites if there is a particularly oddly shaped underwater area...
Is there a way to generate non rectangular flxsprites I just dont know about?
It would be pretty easy to generate an array that was basicly "every square that water could possibly be" and fill that in with 16x16 squares, but then I would either need to make a billion tiny sprites and destroy my fps (I think... I mean... moves = false might go a long way, but still) or use draw to make a giant sprite, but then it would still actually be a rectangle, and the player would no doubt end up underwater at inappropriate times by overlapping transparency...

7
help / overriding flxpause, odd issue (dur... fixed)
« on: Thu, May 13, 2010 »
I forgot to set true in share scroll when I added the stuff that was vanishing... heh.
So, I have an inventory screen that is activated by pausing the game, as that seemed like the easiest way to do what I wanted to do. It works totally fine like, 9/10 times, but sometimes it only half loads, and I end up with essentially an empty inventory screen (sometimes it will load some of the text, but not all of it, or most icons but not all of them, sometimes it will just load the background and the bit that says "inventory" and nothing else.... sometimes it gets stuck in whatever half loaded state its in for the whole time Im playing, other times it fixes itself as soon as I close and then re-open it...)
The class itself looks like this V
Code: [Select]
import org.flixel.*;
public class inventory extends FlxGroup
{
private var txt:FlxText;
private var txte:FlxText;
private var stats:FlxText;
private var bg:FlxSprite;
private var bg2:FlxSprite;
private var item:FlxTilemap;
private var eqitem:FlxSprite;
private var i:int = 0;
private var select:FlxSprite;
private var field:int = 0;
private var delay:uint = 0;
[Embed(source = 'data/inventoryicons.png')] private var icons:Class;
[Embed(source = 'data/static.png')] private var imgstatic:Class;
public function inventory()
{
scrollFactor.x = scrollFactor.y = 0;
bg = new FlxSprite();
bg.createGraphic(FlxG.width, FlxG.height, 0xffaa00cc);
bg.blend = "difference";
bg.antialiasing = true;
bg.alpha = 0.8;
bg.scale.x = bg.scale.y = 1.05;
add(bg, true);
bg2 = new FlxSprite(FlxG.width / 10, FlxG.height / 10);
bg2.loadGraphic(imgstatic, true, true, FlxG.width * 0.8, FlxG.height * 0.8);
bg2.color = 0x552399;
bg2.alpha = 0.2;
bg2.antialiasing = true;
add(bg2, true);
txt = new FlxText(0, FlxG.height /8, FlxG.width, "Inventory");
txt.alignment = "center";
txt.size = 24;
txt.color = 0xaa1111;
txt.font = "kremlin";
add(txt, true);
txte = new FlxText((FlxG.width / 8), (FlxG.height / 8) + 32, 100, "Equipment");
txte.size = 12;
txte.color = 0xaa1111;
txte.font = "kremlin";
add(txte, true);
stats = new FlxText((FlxG.width / 8), (FlxG.height / 8) + 64, 100);
stats.size = 12;
stats.color = 0xaa1111;
stats.font = "kremlin";
add(stats);
eqitem = new FlxSprite(FlxG.width / 8, (FlxG.height / 8) + 48);
eqitem.loadGraphic(icons, true, false, 16);
eqitem.frame = 1;
eqitem.color = 0xaaaaff;
add(eqitem, true);
item = new FlxTilemap();
item.x = (FlxG.width / 8) + 24;
item.y = (FlxG.height / 8) + 48;
item.loadMap("1,1,1,1,1", icons, 16);
add(item);
// add last
select = new FlxSprite(FlxG.width / 8, (FlxG.height / 8) + 48);
select.createGraphic(1, 1);
select.origin.x = select.origin.y = 0;
select.alpha = 0.5;
add(select);
}
override public function update():void
{
//select
if (delay > 0)
{
delay -= FlxG.elapsed;
}
if (field == 0)//main-items
{
if (select.scale.x != 104)
{
select.x = FlxG.width / 8;
select.y = (FlxG.height / 8) + 48;
select.scale.x = 108;
select.scale.y = 16;
}
if (FlxG.keys.C || FlxG.keys.V)
{
field = 5;
select.scale.x = select.scale.y = 16;
select.x = (FlxG.width / 8) + 24;
FlxG.resetInput();
}
}
if (field > 5 && field < 9)//submenu-items
{
if (FlxG.keys.Z || FlxG.keys.X)
{
field = 0;
}
if (FlxG.keys.LEFT && delay == 0)
{
delay = 1;
field -= 1;
select.x -= 16;
}
if (FlxG.keys.RIGHT && delay == 0)
{
delay = 1;
field += 1;
select.x += 16;
}
}
if (field == 5)//wraparound
{
if (FlxG.keys.RIGHT && delay == 0)
{
delay = 1;
field += 1;
select.x += 16;
}
if (FlxG.keys.LEFT && delay == 0)
{
delay = 1;
field = 9;
select.x += 64;
}
}
if (field == 9)
{
if (FlxG.keys.LEFT && delay == 0)
{
delay = 1;
field -= 1;
select.x -= 16;
}
if (FlxG.keys.RIGHT && delay == 0)
{
delay = 1;
field = 5;
select.x -= 64;
}
}//end item submenu, mostly
if (FlxG.keys.C || FlxG.keys.V)//selecting from menus
{
//item selection
// be damned sure to update this when more items are added.
if (item.getTileByIndex(field - 5) == 1)
{
if (FlxG.scores[8] > 1)
{
FlxG.scores[8] = 1;
}
if (FlxG.scores[9] > 1)
{
FlxG.scores[9] = 1;
}
}
if (item.getTileByIndex(field - 5) == 2)
{
if (FlxG.scores[8] > 0)
{
FlxG.scores[8] = 2;
}
if (FlxG.scores[9] > 1)
{
FlxG.scores[9] = 1;
}
}
if (item.getTileByIndex(field - 5) == 3)
{
if (FlxG.scores[8] > 1)
{
FlxG.scores[8] = 1;
}
if (FlxG.scores[9] > 0)
{
FlxG.scores[9] = 2;
}
}
}

//make menus
if (FlxG.scores[8] > 0 && i < FlxG.levels[12])//jetpack/wings
{
item.setTileByIndex(i, 2);
i += 1;
}
if (FlxG.scores[8] == 2)
{
eqitem.frame = 2;
}
if (FlxG.scores[9] > 0 && i < FlxG.levels[12])//gravity shoes
{
item.setTileByIndex(i, 3);
i += 1;
}
if (FlxG.scores[9] == 2)
{
eqitem.frame = 3;
}
if (FlxG.scores[8] < 2 && FlxG.scores[9] < 2)//no item, update when there are more items
{
eqitem.frame = 1;
}
if (FlxG.level == 0)
{
FlxG.pause = false;
}
//stats!
stats.text = "STATS" + "\n" + "Fire Rate: " + FlxG.scores[0] + "\n" + "Attack: " + FlxG.scores[2] + "\n" + "Jumps: " + FlxG.scores[10];
bg.draw(FlxState.screen);
bg2.randomFrame();
bg2.facing = FlxU.random() * 2;
super.update();
}
}

}
Im not really sure what Im doing wrong here, and like I said, it works most of the time, just sometimes it breaks itself for no real reason, as far as I can tell.[/s]

8
help / A tip, placing sprites based on a CSV file.
« on: Wed, May 12, 2010 »
So, I had kind of a weird problem just now. Im workin on a game with a small team. The primary level designer in this team is not a coder. He is a hardcore gamer, and comes up with awesome idea's for levels, and builds them well, and can use a tile editor to make CSV files. I wanted a way for him to easily place sprites, along with tiles, without making a separate xml file or some other such nonsense. Anyhow, I figured this took some thinking to get working, and someone else might need something like it, so here it is.
Code: [Select]
public function enemysloaded(enemydata:Event):void
{
enemyarray = (enemydata.target.data as String).split(",");
for (var i:int = 0; i < enemyarray.length; i ++ )
{
if (i % _map.widthInTiles == 0)
{
eY += 1;
}
if (enemyarray[i] == 1)
{
_bloodwolf = new bloodwolf ( (i - (_map.widthInTiles * (eY - 1))) * 16,eY * 16, _player, _map);
enemys.add(_bloodwolf);
}
}
if ( i == enemyarray.length)
{
eloader.removeEventListener(Event.COMPLETE, enemysloaded);
}
}
about the only thing missing from that, is that I used a urlloader object to load up the csv file in the first place, with a complete event that triggers the function. Bloodwolf is just one of the enemys in the game, they need the player and map data for AI, eY is int = 0, I use eY - 1 because the if (i % _map.widthInTiles == 0) bit fires when i == 0, I could have made eY int = -1 and not done that, but I didnt think it would fire at zero for some reason or another, and didnt want to scroll up and change it.
*EDIT* I probably should mention, I didn't split the initial data with "/n", so doing it this way would require you to add commas to the end of each row in the csv, the alternative would be to first split the data with "/n" then split the data in your new array (at each index) with "," then merge them all into the array you use to place sprites. I didnt do this, mostly because I was exited to have something that worked and running late to a concert and a pretty girl, and well, priority's.

9
So, the bug, is that during collisions, sometimes objects are forced into walls, then hurled off screen well overlapping the wall (its on the far walls, they either fly straight up and off the map, or straight down, every once in a blue moon they fly straight through the colliding tile and out the other side as well...) It generally occurs well the object against the wall is facing away from it, and happens more often (although not exclusively,) during collisions where the colliding object (not the one being forced through the wall,) is above the other. Its also pretty much driving me insane. It happens pretty much regardless of what sprite is being collided as well, so Im fairly sure it isnt something to do with the object itself. Im using flixel 2.34, and making the collide calls the usual way (I think,) right before the update, I basically have group.collide(other group) a few times (sprites, objects, walls, basically all colliding with each other, although objects and sprites dont collide...)
Im not really sure whats going on with this, and its driving me friggin nuts.
Should I just upgrade to 2.35? Is this a known bug? Am I just doing something friggin wonky? A lot of my sprites have velocity.x = speed, or = -speed, as apposed to += speed *flxg.elapsed or -= speed * flxg.elapsed, mostly because I want them to go from not moving to full speed instantly as apposed to easing into it and sliding around, could that be related? ???
Ima pull out my hair now. KTHNX bye.

10
http://zez.herobo.com/gangs/gangs.swf
Controlls:Move with arrows, X jumps, C Shoots, V is melee attack, wasd are debug keys for gravity, eventually gravity will be set in some area's, and you will eventually get a powerup that makes it re-orientate itself to the nearest tile well it is activated (probably either z or b, depending on what feels more comfortable and how much I care about Germans,) ala grav E tea.
Motorcycle is steal-able, btw. Try to kill the rider and then jump on the seat to surf on it.
This is a work in progress on the basic engine of my new game. There is a bunch of stuff happening in this that isnt immediately apparent (read, totally impossible to tell from this build)
First off, the weapon system. Each weapon (melee or projectile) is basically just a collection of equip able, stacking power ups. These powerups range from doing things like making projectiles home, melee attacks autolock (turned on right now) too shots bouncing or melee attacks stunning.
Im also playing around with the idea of equipping different weapon types, either that determine the basic behavior of the weapon and dont stack, or that DO stack (Missile-lasers would be kinda weird tho, as would sword-axes.) In the event that they DO stack, I was planning on having melee attacks pick the most apropriate weapon when you swing it (so if they are in close, a dagger, if they are far away a spear,) out of the equipped types, and then just balancing weapons so that longer weapons take proportionately longer to use then short weapons, thus making it to your advantage to get in close, from a speed point of view, but also legit to attack from afar.

Frankly, I could use a hand realizing this game. I think I can handle the code load, and sound shouldnt be to hard, and I have two other people who have agreed to help with map design, and one helping with plot, but I wouldnt mind a hand in the graphics department.

11
games / Kallista's Dream (my ld17 submission)
« on: Mon, Apr 26, 2010 »
http://www.swfcabin.com/open/1272241863

source http://drop.io/kallistasdream
Its kind of like a cross between some sort of treasure shootemup and NiGHTS, although it was intended to be a whole lot more (I really wanted too add a bunch of melee attacks and special moves to give it sort of a fighter/beatemup feel on top of that, but ran out of time. The idea was to make something in between one of the Guilty Gears, Gunstar Heros, and a weird exploration driven quasi platformer.)

Right now, its playable, although you can beat the game in around 5 mins.
It has a plot, thats kinda depressing (you have been warned,) and I took kinda weird interpretation on the theme, so I figure Ill get a combination of good ratings in that department and really low ratings, depending on the reviewer.
There is a for loop in the code that needs to be optimized, hard. Its in the constructor and basically makes the playstate take to long to load. It SHOULD be xbg<500, have if (xbg%25 == 0) {ybg += 1;} towards the top of the loop, and then all calls to xbg should read as (xbg/ybg) and have ybg start at 1. Instead, its xbg<25 and has
Code: [Select]
if (xbg >= 24 && ybg > 0)
{
xbg = 0;
ybg -= 1;
}
where ybg:int=20; and the loop is for (var xbg:int = 0; xbg < 25; xbg ++)
meaning it actually restarts the for loop 20 times before the game loads. This WORKS, but its kinda expensive and leads to the game loading forever. Unfortunately, I didnt think of this optimization till the deadline was up, so it just takes a bit to load.
I also should polish up the way enemys and bullets and trails are handled. There IS some recycling code, I used if whatever.memberes.getfirstAvail() != null {use that instead of making a new thing} else {the thing Im dealing with = new thing; whatever.add(the thing Im dealing with)}
theres just also is nothing preventing the game from making 7billion new things before one of the old ones get destroyed, so its totally possible to get the fps to drop down to 1, although unlikely in a normal play-through.
This also actually had half way decent random level generation code in it, that wound up getting cut do too the fact that I didnt have time to set up the bounding box on the player correctly,  and was having bit of trouble getting the wall/floor objects set up properly (I had a variable set to 0.5 + flxU.random for the height and width, then zero'd the origins and offsets, set fixed = true, set height and width to the variables/the size of the original image, and set the scale x and y to the variables. This worked about 75% of the time, and about 25% of the time made non colliding objects for some bazaar reason. I also didnt have time to make all the art for them, so they where pretty ugly looking.)
I also was going to add a scoreboard that was based on your largest combo, but once again time constraints.

12
chat / Ludum Dare 17....
« on: Fri, Apr 23, 2010 »
So, its tomorrow. Im doin it, and popping my ld cherry (actually, my any sort of game making competition cherry,) who else is in?
Im really hoping isolation wins. I have an awesome idea for a pretentious art game based on it, although if pretentious art game wins, I have a pretty good idea for a beatemup, (really tho, who hasnt at some point in they're life wanted to kick Picasso in the nuts? That cant just be me...)

13
chat / jesus... is this normal?
« on: Mon, Apr 19, 2010 »
I broke 1.3k unique hits on my diversion game (Grave E Tea,) today, before noon (actually, by the time I woke up) without any advertising (sept umm.. posting about it here, and on my facebook...) and virtually no distribution (its on mochi games, but Im pretty sure thats all) and got an E-mail from the manager of 4399.com.
Is that secretly just how making flash games works? Im utterly new to this, and a little bit dumbfounded, seeing as this is my first game and I really just wanted to try something out...

14
How the hell do you get Mochi Scoreboards to work in a flxstate? Can you? Do I have to just bite the bullet and switch over to a movie clip or sprite and totally restart the game whenever you submit a score? That seems kinda lame...

15
https://www.mochimedia.com/games/grave-e-tea

http://drop.io/graveeteasoundtrack
Aaaannnd the soundtrack is done.
All of those loop pretty well, even in flash, the exception being The game over song, as it just plays once (and usually for less then the total track time.)
They are all compressed to hell, for obvious reasons, but sound pretty much the same as they did in my tracker, probably do to the fact that they are just oscillators, and frequently downsampled anyhow to get more of a retro sound.

There are some much needed updates, Crumpets no longer spawn directly next to the ghost spawner, so you wont jump for that last crumpet only to get a game over when a ghost randomly spawns. Tea also doesnt spawn as close to the ghost spawner, this is kind of a mixed blessing. On the one hand, it makes the first 5 levels easy, and seeing as there the first 5 levels thats good. It also makes it harder to Farm ghosts on the later levels, as you have to run further from the spawner to get more Tea, this strikes me as also being good from a gameplay point of view, but may hurt some diehard players score's.
I also added in a logo for the game on the title screen, and will be working on more music today (Priority number 1 is a game over song, followed by the remaining three maps. Im not really sure if anyone but me has made it past the second map so those are low priority, and seeing as I usually die before the third map anyhow...)
I also am playing around with the idea of adding new enemy types and powerups on later levels. Any recommendations in those departments?

SLIGHT update, Highscores should get much higher, I added in a combo multiplier on the ghosts, and a level multiplier on all points, to encourage people to eat the friggin crumpets.

This is getting kind of ridicules.
new version http://graveetea.site11.com/graveetea.swf
Kind of minor, put in the scoreboard, Fixed some text stuff (anti aliasing on centered text, didnt bother hacking flxtext, just got creative with my alignments.) and fixed the hitbox on the player so you dont get stuck so much.

And now! Beta version 2.3, because its a good number!
http://www.swfcabin.com/open/1271564881
Changes made in this version;
1:There are now levels, that's right, as in, more then one map. Every 5 levels, you get a new map, with a shiny new pallet swap of the tile set!!!
2:There is MUSIC! Mwahahahaha! Im probably going to make more tracks for this game, but for now there is a background loop, its a little over a minute long, and loops remarkably well considering how bad flash is at that.
3:Tweaked the spawn function on the Tea so you spend less time in early levels waiting for it to exist well ghosts accumulate and swarm in such a way that going after those last few crumpets is certain death.
4: On that note, fixed some spelling errors (biscuts, for example, now reads crumpets)
5:Changed the Crumpet graphics, they now look like crumpets, not coins, and are not all identical.
6: Fixed the double Jump, as soon as klembot mentioned it, it started pissing me off every time I played. Before that it had seemed totally natural for some reason.
7:No one will probably notice this, but the gameover screen shows a random message now, previously people just assumed it did, even though there was only one, but umm... seeing as that was a good idea XD.
8:You can restart the game after you die now, making it far more replayable (what with being replayable and all...)
9:Every some amount of points you get a 1up, making this game way easier.
10: Increased the invulnerability time after you die / when the map first loads. I occasionally died as soon as I started playing, kinda frustrating.
11:Nope, I think thats about all I did.

Stuff that still needs doing:
More music, Title Logo, Scoreboard... am I missing anything? Suggestions?
Well, its not totally done. I need to make new maps for it (seeing as there is 1, and I plan to have at least 10) and sit down and write the music but that shouldnt take tooo long, I want a different track to play for each level so it doesnt get too annoying (read; repetitive,) but Im a musician first and a programmer like... maybe 12th or something, so it shouldnt be an issue.
Anyhow, this game is basically Pacman as a platform game. The games intro explains the play mechanics fairly well, and it only uses the arrow keys anyhow, so odds are you should be able to figure it out. Eventually Im going to put a scoreboard into this, but thats lower priority then the levels and music.
http://www.swfcabin.com/open/1271378568

16
This has been baffling and frustrating me for about a week now. I was under the impression that the index of a tile in a tilemap was the tiles y coordinate * the height of the tilemap + the tiles x coordinate, in tiles. This does not appear to be the case in practice, however. I tried setting a tile using setTilebyindex, to (((_player.y/32) * 48) + (_player.x/32)), and got a tile that had very little to do with the location of the player. My reason for doing this was that I wanted to simultaneously set a value in a 1 dimensional array and have it line up with the maps index, so that I could run through it later and update tiles according to some other variables. That part of the code SEEMS to work okay, in that tiles do get updated, and they are the same tiles updated by setTilebyindex.
Anyhow, Im pretty stumped. Stumped enough, infact, that I started another small scale project to distract me from the frustration of working on this one.

17
help / Tile Index doesnt work how I think it does...
« on: Sat, Apr 10, 2010 »
so umm, basically that. I was under the impression that a tiles index would be be the y coordinate of the tile (in tiles) * the total width in tiles, + the x coordinate in tiles. It seems I was wrong however, and as of such Im rather confused.
My code is rather simple, in the playstate I have this
Code: [Select]
if (FlxG.keys.D)
{
plantablemap.plant = 11;
plantablemap.change = ((((tile.y / 32)) * 48) + (tile.x /32));
}
and in my plantablemap (that extends FlxTilemap) I have
Code: [Select]
if (change > 0)
{
setTileByIndex(change, plant);
time[change] = curtime;
change = 0;
}
This breaks in a couple ways, first off (and this is slightly minor) the tile doesnt get updated right away (at least graphically) until a later event hits the point in the time array that got changed, and updates the tile
Code: [Select]
if (time[grow] + growthrate < curtime && (getTileByIndex(grow)%5) != 0 && getTileByIndex(grow) > 4)
{
setTileByIndex(grow, (mapdata[grow] + 1));
time[grow] += growthrate;
}
Where mapdata = the map's actual array, and grow is an int that basically just loops through every index in the map forever. (Im using an if event for this, so that other things can happen at the same time, it makes it take a second to update, but otherwise is fine, and given that ultimately growthrate is going to be a few hours, it wont really be to noticeable)

Basically, what ends up happening, is when the value is set, it updates a tile one below and considerably to the right of where I would expect it to update, and waits for the grow event to actually update the graphic. If I use setTile((tile.x/32),(tile.y/32)) it behaves as expected, but I then I have the same problem updating the time array. I could make time a tilemap inside of the tilemap instead of an array, and just make it invisible and non colliding, but that seems really inefficient, especially when if I use an array, there index's still lineup fine, and all Im storing in time is the timestamp for when things happen, and I really dont need any of the usual tilemap cruft.

18
This may very well be the wrong place for this, but I could use some advice all the same... (If it is the wrong place, I apologies for any inconvenience)
Im working on a top down (ish, its that weird 3/4 top down rpg view,) dungeon crawler (ish, once again, its mostly not in dungeons and you can do things like build houses and plant trees, as well as kill infinite enemy's attacking you from all sides,) and I recently revisited my tilemap generator. It had been doing some annoying things, like making levels that where unbeatable. In the process of fixing it, I came upon a startling realization! The levels it was making, though random and potentially infinite, where boring as all hell.
Thus the help.
What sort of level patterns should I start hardcoding into this baby? Currently, it basically makes caves with random passages to different areas. What sort of levels would you like to randomly stumble upon? The sky is (well, mostly,) the limit.
I was thinking I could make an area that is mostly open, surrounded by a gate, with tombstones placed 1 to 4 squares apart from each other, and maybe generate a (semi randomly sized) rectangle of walls with a floor in the middle of em, a door or two, and roof that gets made transparent if you are inside of the building (overlapping the floor, more accurately) sticking some ghosts in the graveyard, and calling it a church?
Maybe petstores full of evil monkeys? The intestinal tract of a dragon?
Where would you want to go?
(As an aside, the ultimate goal of this game is land ownership, that land being the randomly generated levels, so you can use said land to do things like plant gardens, mine oar, start brothels, you know, the usual, so if you can come up with some reason someone would want to own the intestinal tract of a dragon, that would be even more awesome, although there is nothing wrong with it just having a sword of cholecystokinin to reward you for your efforts.)

19
help / layering with effects...?
« on: Wed, Mar 31, 2010 »
So, basically Im trying to put a blur effect on something in the foreground, and although the effect works fine the way it is documented in flxblur, it shows up behind my tilemap, and sprites, and everything.... is there a way around this? Im assuming it has to do with preProcess being called before the map is added? Maybe?
*edit* Nope, totally has nothing to do with that, it also doesnt matter where I do the blur = new flxsprite stuff (tried it in the start up, tried it after everything else has been initialized, havent tried it in the update because that seems like a terrible idea...) I think it has to do with draw, at this point. I thought it was screen being below everything, but if I draw it on a different sprite, not only does that sprite quickly fade to black, but but the whole screen gets infinite copys of itself layered (basicly, the blur effect without it ever fading out...)*edit*

20
help / FlxSprites playing the same animation?[solved]
« on: Wed, Mar 24, 2010 »
So, Im layering FlxSprites in my game to allow for some character customization, and make the different equipment a bit more appealing, and I ran into a problem.
Currently, all the possible equipment has the same animations, and (almost) the same events triggering them. I say almost, because things like velocity checks are done against the players, as the equipment isnt actually moving. The issue is that occasionally the animations dont trigger at the exact same time, and something ends up out of sync with everything else.

I tried to just say _curFrame = _player._curFrame and _curAnim = _player.curAnim, but I either get an error about an attempted access of inaccessible property error on the player, or if I assign something in the players update to set itself to that value, and then reference that, it doesn't error, but also freezes.

Pages: [1] 2