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 - nitram_cero (2bam)

Pages: [1] 2 3 ... 25
1
You could use addAnimationCallback() from FlxSprite to receive a function call each time the animation is updated.
It get's you the frame index (of the spritesheet) and frame number (the thing you want)

It might also de-sync because of almost unavoidable mp3 decoder silence when starting the sound. Check that too, tweak the start position of the sound you want to play.

3
games / Re: Survive Quest released!
« on: Mon, Jul 15, 2013 »
Hehehe, hello old friend :)
Yeah, our user ids are under 200 while there is over 90 thousand users!
I'm not around much anymore but ended up logging and checking the replied messages (forum tic). Was surprised to see some topics from 5 years ago still going on!

What have you been up to? If you like (and use twitter), add me @iam2bam.



Gama11, thanks for your feedback!

The game was almost finished by 2011 and last week I ended up translating it to english and fixing a bunch of accessibility issues, the font and mouse-walk mostly, and polishing some gaps in the "logic". That's why I used 2.34, no point in wasting time updating it now, but was a shame to leave it almost complete and never release it :)

The aesthetics are on purpose to copy the Sierra games era: 16 color palette, rectangular pixels. Sound hipsterish but if you aren't over 25 years old you probably never felt the pain of these games. My love for this genre comes from nostalgia.

You're right, it is very quiet and the non diagonal keyboard walk was just old code, an easy fix.
The "go to" by clicking "use" was a last minute modification rendering the "go to" action redundant.


4
games / Survive Quest released!
« on: Sun, Jul 14, 2013 »
It's a short adventure game, homage to the hardness of Sierra's classics like Space Quest, King's Quest, Leisure suit Larry, etc. from the CGA era.
In english and spanish.

Made using Flixel 2.34, Graphics Gale, a Kaossilator 1, SFXR and Audacity.

Click here to play
http://2bam.com/play/SurviveQuest


5
Edit: Btw, why is this thread in help instead of releases?

I believe the reason is because in 2009 when I started the thread there was no releases subforum ;D

It's great all the updates and upgrades you guys added!

Btw, in the github version:
* nitram_cero and Martín Sebastián Wain are the same person, me  :)
* The licence is missing. It should be there:
Quote
Copyright (c) 2009 Martin Sebastian Wain
License: Creative Commons Attribution 3.0 United States
(http://creativecommons.org/licenses/by/3.0/us/)

Quote
4.a. (...)You must keep intact all notices that refer to this License and to the disclaimer of warranties. (...)
4.b. (...)You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied(...)

Thanks

6
help / Re: Flash develop and right click
« on: Fri, Jul 12, 2013 »
Thanks for this code!


Regarding the build error, try updating FlashDevelop (it also downloads the latest SDK)
Then target the build to 11.7.

If that wont work, you need to find the appropiate playerglobal.swc somewhere in the SDK folder and copy it to:
Quote
C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\frameworks\libs\player\11.7

The one you must look for might be in the following folder (where I found the 11.4 I'm using):
Quote
C:\Program Files (x86)\FlashDevelop\Tools\flexlibs\frameworks\libs\player

Good luck & best regards!

7
help / Re: Sounds
« on: Mon, May 9, 2011 »
Using the Flash IDE to export a SWC with sounds seems a good solution.

If I'm not mistaken, it turns WAVs into MP3 but also saves enough info to make seamless loops work (MP3 file format doesn't).
Anyway, it's always a pain in the ass to work with loops and flash, has always been the same.

You'll find this link very useful:
http://blog.andre-michelle.com/2009/pitch-mp3/
(The example Flash takes a while to load, no preloader or anything to let you know)

It implements pitch shifting and seamless looping. The tempo will go up, but so will the pitch. If you don't like this effect, you'll just have to use several different mp3s.

8
I'm working on a project (w/deadline) using Flixel v2.34 and can't afford migration to the new code. Just posting this for any of you in the same situation.

The bug goes like this: If the tilemap is not at (0,0) position, any object colliding with the rectangle hull of the tilemap will weird up (In my case, it was pushing back an object where it was clear that the tilemap was empty).

preCollide() set's incorrectly the colOffsets for FlxU.solveXCollision() to work with.

To solve the issue, change this line at FlxTilemap.preCollide():
Code: [Select]
colOffsets[col++] = new FlxPoint(x+c*_tileWidth, y+r*_tileHeight);
For this one (removes x and y)
Code: [Select]
colOffsets[col++] = new FlxPoint(c*_tileWidth, r*_tileHeight);

Regards
-Martín

9
This fix is for 2.35, but I've checked github and seems that Flixel still uses the same code.

If you change these lines @ FlxSprite.getScreenXY():
Point.x = FlxU.floor(x + FlxU.roundingError)+FlxU.floor(FlxG.scroll.x*scrollFactor.x) - offset.x;
Point.y = FlxU.floor(y + FlxU.roundingError)+FlxU.floor(FlxG.scroll.y*scrollFactor.y) - offset.y;


For these new ones:
Point.x = FlxU.floor(x + FlxU.roundingError + FlxG.scroll.x*scrollFactor.x) - offset.x;
Point.y = FlxU.floor(y + FlxU.roundingError + FlxG.scroll.y*scrollFactor.y) - offset.y;

Overall it looks less jittery.
I tend to use FlxG.scroll directly (no FlxG.follow()) and in some specific positions the followed entity was jittering back and forth all the time.

Your milage may vary. I hope it helps!

Regards

10
help / Re: DAME - a new map editor made using flixel!
« on: Fri, Mar 18, 2011 »
Wow, so good to find out that somebody has time, will and experience to create a good full-featured 2D map editor.

Nice work :)

11
Wow, it's been a while. :-[

I'm working with PixelJam now.
I patched up Flan some time ago to work on Corporate Climber.
And now we started a new project and beefed up Flan Alfred (the branch you all know and learned to tolerate  ;D) to avoid some common annoyances I had last time.

A couple of important changes:
* Now it exports everything to a single "generic" as3 file (CSV strings instead of files, objects and arrays for layers and sprites, etc.)
* Supports sprite sheets for sprites (not tilemaps)
* Exports more info and has some basic templating features so you can tweak the output of exporting.
* Disable exporting of layers for mockup graphics.

If anyone REALLY want's me to keep exporting to independente csv-txt files, let me know.

I'm releasing it in a couple of days.

Regards!

12
releases / Re: Is Flixel being maintained?
« on: Fri, Jul 30, 2010 »
Hahahaha, you got me there ;D

I'll resume the Flan project by the end of August, as I'll be more relaxed at work.

13
releases / Re: Is Flixel being maintained?
« on: Thu, Jul 29, 2010 »
Just to clarify, I didn't want to sound aggressive.
And I would propose for the job myself if I wasn't as busy as I'm.

Sorry for any misunderstandings!  :)

14
releases / Is Flixel being maintained?
« on: Thu, Jul 29, 2010 »
Sorry, I haven't been around the forums for a while (work, work, work).
But from time to time when I find a bug in Flixel (as I work with it) I post it on the github issue tracker system. Usually with a solution.

But months go by and I read no replies.

Here are some:

Critical bug (w/fix) - createBitmap "unique" parameter is not respected, making FlxFlash work incorrectly.



Critical bug (w/fix)- calcFrame raises an exception if there is an animation callback but not an animation being played



Bug (w/fix) - FlxObject.overlaps() incorrectly checks against FlxSprite's image-frame width/height instead of the object's real collision box (offset/width/height)


Request - preCollide to return a boolean to avoid checking collisions altogether between objects given certain conditions.

Maybe Adam is too busy to do it himself, and thats cool, but I think this project has a lot of users and maintenance should be delegated in order to make these updates more frequent.

Thanks for the read.

-Martín

15
help / Re: I need help with selective collisions.
« on: Fri, Jul 2, 2010 »
Ok, I fixed it like this:

Changed preCollide to return a boolean value (true by default)
And in FlxU.solveXCollision/solveYCollision, I check if preCollide returns false, in which case I just quit the function.
Code: [Select]
public function preCollide(Object:FlxObject):Boolean
{
return true;
}
Code: [Select]
if(!Object1.preCollide(Object2)) return false;
if(!Object2.preCollide(Object1)) return false;

I'll leave it here in case anyone finds it useful.
I believe it's the best way as preCollide will avoid hardcore operations and discard the checks altogether if two objects are non-compatible.

16
help / Selective collisions, a solution.
« on: Fri, Jul 2, 2010 »
Hi guys, It's been a while  ;D

I've been working a lot so I hand't got much time to (ever again) release Flan or post on these forums. And the question I'm asking is also for work...


I remember in Flixel 1.x that you could "return false" on a collision routine override to avoid the collision ever happening (back in the day when they had no parameters and returned a boolean, and "hitBottom" was called "hitFloor"..etc)

I can't find a way to do that now. I avoid calling the "super.hitWhatever()" but that doesn't seem to work.
I want to selectively collide (or not) different kinds of objects depending on their state, and making FlxGroups for each is prohibitively slow.

Any ideas?
Thanks :)
-Martín

17
help / Re: Double-click help.
« on: Mon, May 17, 2010 »
Yeah, I dunno what's happening. Anyhow, I ended up doing it in a more flixel-happy manner:

Code: [Select]
package editor {
import org.flixel.*;

/**
* Call this class' update() function FIRST on your FlxState's update() override
* DO IT BEFORE EVERYTHING ELSE SO IT GETS THE FIRST UPDATE!
* @author nitram
*/
public class DoubleClickWorkaround {

static public var dblClick:Boolean = false;

static private var clickDelay_:Number = 1000;

static public function update():void {
dblClick = false;
clickDelay_ += FlxG.elapsed;
if(FlxG.mouse.justPressed()) {
if(clickDelay_ < G.DoubleClickPeriod) {
dblClick = true;
trace("Double click!");
}
else
clickDelay_ = 0;
}
}

}

}

Just needs to get called before anything else in the overrided update from a state class via "DoubleClickWorkaround.update()".
Then to see when it has been issued a double click anywhere in the code:
"if(FlxG.mouse.justPressed() && DoubleClickWorkaround.dblClick) { ... }"

Regards!

18
help / Re: Double-click help.
« on: Fri, May 14, 2010 »
Thanks, I did (you can see that in the code) but it didn't work neither.

I ended up doing it by hard and having a global flag to know if the last mouse button press was a double click or not. I'll post the code soon.

19
help / Double-click help.
« on: Wed, May 12, 2010 »
I'm trying this but it doesn't seem to work:

Code: [Select]
private function handleMouseDblClick(event:MouseEvent):void
{
trace("DblClick");
}

override public function destroy():void {
super.destroy();
FlxG.stage.removeEventListener(MouseEvent.DOUBLE_CLICK, handleMouseDblClick);
}

override public function create():void
{
super.create();
FlxG.stage.doubleClickEnabled = true;
FlxG.stage.addEventListener(MouseEvent.DOUBLE_CLICK, handleMouseDblClick);
}

If anyone succeeded in doing so, I'll appreciate your help.
I'm trying to avoid nasty Flixel hacks (timing clicks and such); I wanted to go with the Flex way of doing it just to avoid having to merge a customized version with the next flixel releases.

Thanks and best regards!

-Martín

20
Cool, thanks man!
I don't need rotation for those so it should work :)

Pages: [1] 2 3 ... 25