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

Pages: 1 ... 17 18 [19]
By the way, I had to change case 6: to case 1:

Here's the code I used.

Code: [Select]
rampsGrp = new FlxGroup();

ramps = new FlxTilemap(); = FlxTilemap.ALT;
ramps.loadMap(FlxTilemap.imageToCSV(RampMap, false, 1), FlxTilemap.ImgAuto);

var tilesWidth:int = ramps.widthInTiles;
var tilesHeight:int = ramps.heightInTiles;

for (var a:int = 0; a < tilesWidth; a++)
   for (var b:int = 0; b < tilesHeight; b++)
  //FlashConnect.trace(ramps.getTile(a, b));
  switch(ramps.getTile(a, b))
case 1:
r = new FlxSprite(a*8,b*8,ImgRamp);
ramps.setTile(a, b, 0, true);   // set tile to 0 and erase the tile graphic

making a new tilemap for each is creative, but i have a feeling it is a bit resource intensive.

here is my method:


var _room:FlxTilemap = new FlxTilemap();  // <--- your tile map here

var tilesWidth:int = _room.widthInTiles;
var tilesHeight:int = _room.heightInTiles;

for (var a:int = 0; a < tilesWidth; a++)
   for (var b:int = 0; b < tilesHeight; b++)
      switch(_room.getTile(a, b))
         case 6:
            add(new FlxSprite(a * 16, b * 16));   // create a new colored FlxSprite at this location
            _room.setTile(a, b, 0, true);   // set tile to 0 and erase the tile graphic

I used this way because Flixel doesn't seem to support overlap with a Sprite and a levelmap.

I'm using it now.
Thanks everyone for your replies.

I don't think the issue here is the engine, or how he coded it.
I think the issue is that those graphics are clearly taken straight from the Mode demo and not given any credit.

I recently released a Mode Gravity Remix, which I believe I am entitled to do by quoting sources and releasing my own source, but this guy has clearly shifted the hue on some sprites from Mode and claimed it as his own.

I am not very impressed.

help / Re: Rotate A Platform
« on: Tue, Sep 14, 2010 »
My understanding is that quad-tree, which is doing the collision detection works using bounding boxes.
So using rotated boxes will just cause the bounding box to still be box at that isn't rotated.

The Mode demo has "B" set to show bounding boxes. Maybe try showing bounding boxes in your game, and you'll see what happens when you rotate something.

games / Re: Mode: Gravity Remix
« on: Tue, Sep 14, 2010 »
Good catch TestSubject! I left all my debug trace commands running.

Thanks for the feedback on the clunky user controls. I agree with everyone, in terms of playing a fun game, it doesn't really work.

But if you're looking for an example of how to do a HUD with gravity, this game's code might interest you, which is kind of the reason for releasing it.

games / Mode: Gravity Remix
« on: Tue, Sep 14, 2010 »
Hi everyone

I've remixed Mode into a gravity/puzzle game. Obviously there's a tonne of more things I want to do with it, but I want to release the work in progress to get feedback.

I'm really keen to open source it if people are interested.

I'm also looking for pixel artists, if anyone wants to skin this game.

I have a huge list of features I want to add.
*More to come
*Remove all the Mode enemies/spawners etc.

If you have any ideas let me know in the thread.

I'm also keen to hear from Adam Atomic on the legalities of remixing Mode. My hope is that by the time I'm done with this game it is absolutely unrecognizable as Mode. The fact I've left in the enemies and such is because I just haven't changed it yet.

Hello everyone,

I want to ask the help forum first, before I add this to the Flixel 2.5 wishlist thread.

I'm using FlxTilemap to generate a level and it's working great (Going to release Mode: Gravity Remix quite soon!).

Is there are way to use different colored pixels to indicate different items. So for example I use black pixels to indicate level tiles and red pixels indicate enemies, and green pixels indicate items or powerups.

Does that exist already?
I know a solution is just to use DAME or similar, but for me the best level editor would be GIMP with a few different colors to indicate different items.

Also, is there a command in Flixel to determine what version of Flixel you are using. I know this sounds silly but in the Mode example, it comes prepackaged with Flixel in it's ORG folder and there are quite significant changes between whatever one that is using and between that latest one. I spent quite a while unsure why pngToCsv didn't work.
I've looked in the comments of the code and can't find it.

Thanks in advance!

(P.s. Get excited for the Mode: Gravity Remix release)

help / Re: Up to date Game tutorial
« on: Thu, Sep 9, 2010 »
Something that may help is that I had much better luck running the Beta version of Flixel with FlashDevelop, rather than the standard, when copying files into that ORG folder.

help / Re: Up to date Game tutorial
« on: Thu, Sep 9, 2010 »
I'm not sure what the error is, so I can't help there.

The best resource for learning flixel is the five games available for download on the front page. I think there's even more if you look at AdamAtomics github account.

Open each of those up, read the comments (and the are VERY WELL commented), see what each line does, and start messing around with the code.

The game 'Mode' in particular is a fantastic resource, considering it's a full platformer ready to go.

help / Re: Reversing Gravity
« on: Wed, Sep 8, 2010 »
Thanks! I'm going to use that piece of code if you don't mind.
I'm working on a mod to Mode that uses gravity switches. Not an entirely original idea but it's just something to get my head around Flixel

help / Re: Reversing Gravity
« on: Wed, Sep 8, 2010 »
It's as simple as reversing acceleration.

Code: [Select]
acceleration.y = -acceleration.y;
You may need to add
Code: [Select]
this. in front depending on where you place the code, but the above worked for me in the Mode demo.

Thanks for the speedy reply.
This forum is great. I've had answers within the hour for both questions I've had. So thanks Flixel team!

Thanks for the info on casting.
I've never had to cast objects before so thanks! I'll do some reading on the subject.

Hi everyone, I've got another question for you.

I am customising FlxInvaders as a way to learn about all Flixel has to offer and I'm running into this problem. I've been reading all about OOP today and can't figure out if I'm missing a key OOP concept or a Flixel specific concept.

In my Alien class I have:

Code: [Select]
public function fireUp():void
      FlashConnect.trace('Fire Up');

In my PlayState I have:

Code: [Select]
public function overlapped2(Object1:FlxObject,Object2:FlxObject):void

And the error it throws:

Code: [Select]
F:\FLIXEL\Projects\SeekaeVoid\src\ col: 12 Error: Call to a possibly undefined method fireUp through a reference with static type org.flixel:FlxObject.

So the functions kill() and hurt() work fine and are defined and overridden in the Alien class. But creating a new public function, fireUp, in the Alien class and trying to call it from PlayState doesn't work.

Any help would be greatly appreciated.

This greatly improves my understanding of what Flixel is doing.

Mods, consider this thread solved!

Hi everyone,

This is my first post. I just have got Flixel up and running and it's fantastic (obviously!).
I just have a question about FlixelInvaders.

Here's a piece of code from it:

Code: [Select]
//This is how we do basic sprite collisions in flixel!
//We compare one array of objects against another, and then if any of them overlap
// flixel calls their 'kill' method, which by default sets the object to not exist (!exists)
FlxU.overlap(_playerBullets, _aliens);
FlxU.overlap(_alienBullets, _player);

The comments say that FlxU.overlap calls the kill method. But I don't understand where or how it does that.
I understand that overlap returns a boolean, which I don't see would help calling kill. And the bottom two lines do not use the callback function.

Can anyone shed some light on this?


Pages: 1 ... 17 18 [19]