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 - c023-DeV

Pages: [1] 2 3 ... 9
help / Re: Angle problem(?)
« on: Sun, Aug 17, 2014 »
The Flixel Power tools have an Angle between mouse...

playerAimAngle = FlxVelocity.angleBetweenMouse(Registry.player, true);

is what I use and then check:

                     if ( playerAimAngle > -90 && playerAimAngle < 90 ) {play("gunmoveR");}
                     else if (playerAimAngle < -90 || playerUpper.playerAimAngle > 90 ) {play("gunmoveL");}

somethin like that.

But keep camera offsets(scrolling) and so in mind when doing this... you might need to look out if you are using screen coordinates or world coordinates...

help / Re: File I/O and Adobe AIR
« on: Sun, Aug 17, 2014 »
I sort out all the saving in my registry (a class that only stores global variables and stuff) like this:

Code: [Select]

public class Registry

public static var scoreTotal:int = 0;

public function Registry() //nothing in here


public static function save():void //Save function
//registerClassAlias("Item", Item);

try {
var so:SharedObject = SharedObject.getLocal("ffotr01"); = scoreTotal;

} catch (error:Error) {
trace("Error Saving", error);

public static function load():void//load function

try {
var so:SharedObject = SharedObject.getLocal("ffotr01");

if ( != null) scoreTotal =;

} catch (error:Error) {
trace("Error Loading", error);



Then i just call or load() from anywhere I want...

and on windows the data gets stored in: c:\users\youruser\AppData(hiddden folder)\Roaming\yourappname

help / Re: Strange sound help
« on: Fri, Aug 8, 2014 »
Here is how I use sounds:

the vars:
private var AttackSound:FlxSound;
      private var IdleSound1:FlxSound;
      private var HurtSound1:FlxSound;
      private var DeathSound:FlxSound;
      private var RageSound:FlxSound;

the creation:

         RageSound = FlxG.loadSound(ZooAssetReg.audio_sfx_kadaver_rage01MP3, 1);
         AttackSound = FlxG.loadSound(ZooAssetReg.audio_sfx_kadaver_attack01MP3,1);
         IdleSound1 = FlxG.loadSound(ZooAssetReg.audio_sfx_kadaver_idle01MP3,1);
         HurtSound1 = FlxG.loadSound(ZooAssetReg.audio_sfx_kadaver_hit01MP3,1);
         DeathSound = FlxG.loadSound(ZooAssetReg.audio_sfx_kadaver_death01MP3,1);

         RageSound = null;
         AttackSound = null;
         IdleSound1 = null;
         HurtSound1 = null;
         DeathSound = null;


AttackSound.proximity(x,y,Registry.player,250, true);;

maybe that helps ? This way I kind of make sure that all classes have their own references to the sounds that need them... and for some sounds I have a global sound manager to make sure they only get played once or let me pick random sounds... not sure but that might help in your case?

help / Re: Dynamic Lighting problem
« on: Mon, Dec 2, 2013 »
The way flixel works has changed a bit...

The the pre/post processing (draw() function to override) is part of the FlxState now. So you'll have to do that move in the Playstate I guess.

help / Flixel and Resolume Avenue4 ( FlxVJ )
« on: Thu, Aug 8, 2013 »

since my journey started a few years ago with flixel, I have come a long way... but put short I could use some help here and I guess you could enjoy it.

I would like to rework a little flixel setup for use in Resolume Avenue 4, that is a VJ tool for use with live beat synch visuals that can be controlled via MIDI and that supports dynamic AS3 (!)

There are a handful of other tools out there that do this too, like GrandVJ... most handle the communication via ExternalInteface handlers, so I guess there could be a good base for "cross platforming" among those tools too.

And because I am no "real" programmer I came here in hope to maybe find someone who would like to take part in this (mostly the base code) - Open Source For Sure!

I will provide all grafix and as much 'interlectual' code input as I can. As well as write the documentry and Help files and host a "Product Page" on giving credits.

For someone who has a lot of Flash/Flixel Experience I hope this would be a pretty trivial thing to do. But the impact of such a framework will surely reach deep into the small but growing VJ community. And I would be honoured to do my best in order to contribute and dedicate myself to this on your side!

Here is a link to the thread on the Resolume forum:

What do you think?

Things to Do:

  • Removing the preloader and state handlers (because we want to directly trigger a state when the file launches)
  • Then start adding in FX and features, maybe Pixelbender plugins?!
  • Remove FlxSound? Maybe later it would be cool adding it again with the stereo panning
  • Re-rout some "default" controls like: 8 Switches/constantValue and 8 Float Parameters per Stage and remove mouse and keyboard to avoid conflicts (MIDI conform - maybe even standalone?)
  • Remove Pause Function to avoid conflicts
  • Remove/re-route and rethink Debugger
  • Generally speaking: Stripping it down to some bare-bones first

My setup looks like this:

Ableton live for sequencing MIDI and Audio -> sends trigger and float parameter values to the assigned flixel stage in Resolume ... so a live performing electronic artist or any tool sending MIDI data can control the setup. Imagine that on live gigs!

And here's some inspiration:

I'll post a preview of my testruns soon! A Demo of resolume can be downloaded from their website (A/V Watermarked but fully functional)

The greatest value of this project would be that we indie developers woud have a new medium to share our work and content with... the music industry ;)

And anyone who has ever seen good live visuals on BPM sync knows that it is a great experience! Now imagine the potential of video games in that combination!

FlixelVJ Repository

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.

The mp3 Loop utility HERE works pretty well for me.

And for the function I go along with:

if ( == "daddyslap" && _curFrame == 3 ) triggerSlapSFX();

in the FlxSprite's update but getting the index frame could save me the first check, so might use that in future, thanks!

help / Re: Problem. Big, strange, problem.
« on: Wed, Jul 10, 2013 »
But what i would like to know is what assets can you get in Flash that you can't in FD?

Some easy visual editing and the mp3 "loop" magic ... the wysiwyg editor... but other than that its kinda messy to combine with flixel.

I only had to use it for packaging (swc) my sounds, but now I got the mp3 loop utility working I am glad not having to use the IDE.

Maybe it is useful for making cutscenes with custom actions too...

Overall FD rox!

try making your world -4000 to +4000 on both axis and work from the center... place all to 0,0 and give it a walk and you see what the camera does...

if you "place" your cam to an object - you are actually "scrolling" it therefore the layers get misplaced.

The trick is to use a visual editor like dame or your own to help visualize displacement, otherwise by working from 0,0..

help / Re: Curved Paths
« on: Tue, Jul 9, 2013 »
Guess you could try with some 3.point or "trigonometry" calculation to generate a path, like if you have start and end point then a "curve" could be to make another new point somewhere in between and push that off to a side ... then, when you make the move you blend in the y and x values of the third point ... worth a try, and anyway the math will get you going =)

But there are several ways to get something done... you gotta figure out what works best for you! Like a granade mechanic can also be made with the influence of velocity.y = negative value and so on...depends a lot on what you want

Looks nice! Thanks for sharing!

help / Re: DAME - a new map editor made using flixel!
« on: Mon, Jul 8, 2013 »

first of all DAME ROX ... still, been working the hell out of it, great tool, you get my full recommendation! =)

I have one problem with the complex exporter, it seems to ignore different scroll values for sprite layers. When I have background maps that should only scroll like: y:1 and x:0.9 the result in the final .as is 0.9 on both axis =(

It works with tilemaps, its just the sprite layers that do this, and my project is getting too big to change them manually, any fix for this?


help / Re: How does destroy() work?
« on: Mon, Jul 1, 2013 »
Some more questions, just for clearification:
destroy() is no fancy thing that really "destroys" your stuff, its merely for the classes it was called in to null out internal variables?
super.destroy() inside a state calls destroy on all classes and their instances inside it?
you dont have to null out integers or booleans (numbers,...)?

I'd like some advice on that too, from reading here I assume I have to do something like:

Code: [Select]

public var target:String = "";
public var targetObject:Object = null;

override public function destroy():void
                        remove(targetObject); (but there is no such function =)
targetObject = null;

I always did it without the remove...

For what types and what situations ('level' transitions?) would you reccomend removing and 'nulling' them?

I think that is a known issue they are working on see:

help / Re: Flicker Rate at 120fps
« on: Sat, May 11, 2013 »
Thank you! Means a lot to me. And it that version is pretty old, got massive explosions in there too now and gunfire, vehicles and geneticly generated giant genitals ... ... hrhr

All done by one person and flixel :)

help / Re: Flicker Rate at 120fps
« on: Sat, May 11, 2013 »
Oh man I cant wait to share this game with you all once I have a nice round demo =D

help / Re: Flicker Rate at 120fps
« on: Sat, May 11, 2013 »
Ok, I'm stupid part 4:

Just to clear this up, I was running a native AIR game, fullscreen and had the compiler set to CPU!!! (I forgot about it).... Somehow then increasing to 120 hz made my game seem smoother...

Now I tested on my girlfreinds notebook, and it ran like SH*T (bad)...

After a lot of code optimising and self punishing crunch I found that option again, set it to GPU and its smooth like a pussycat  @ 60Hz... Auto worked too... (Talking about the AIR App Proporties ->Initial Window -> Non Windowed - Render Mode)

I feel so stupid... awefull side of developing alone...

edit: good sideeffecccttt: I optimised my code a lot and cleaned up a lot of updates that could be avoided

help / Re: Noob canīt go on
« on: Mon, May 6, 2013 »
Sorry I cant pick it apart, but I may say that some of the tutourials in the dojo are a bit outdated, so maybe try a different one? EZ Platformer is cool...

And Download a flixel flash develop template for flixel 2.5, have a look at some finished projects, like the PowerTools Test suite (it comes with the source)

Hope that helps a bit.

Or try this one:

help / Re: [Help Needed] Preloader not working :(
« on: Sun, May 5, 2013 »
Hey I guess your problem is that you are testing it locally and all files are loaded. Try it on some online server. And Preloader should not be the document class as said. Your rather looks like the document class.

And you can have a look at to see how it works.

help / Re: Flicker Rate at 120fps [SOLVED]
« on: Fri, May 3, 2013 »
Yipie, thank you auriplane!

it's an ugly hack but heres what I did:

"sc" as an int for the stepcount

Code: [Select]
if(_flickerTimer != 0)
if (FlxG.framerate >= 70)
if (sc <= 1) {}
if (sc >= 2)
_flicker = !_flicker;

sc = 0;
if (_flicker)return;
_flicker = !_flicker;

Throw stones if it's junk but for now it was the only thing I could think of...

help / Re: Flicker Rate at 120fps
« on: Thu, May 2, 2013 »
Just flashed my bios, disabled EIST, made sure that Windows is going for performance... Flixel runs smooth @60Hz but has some stuttering, @120Hz it IS smoother and has no noticeable stutter on this machine (i7 3930K, windows7) ... anyone else notice this? I've noticed it on a few flash games with this machine.

Anyway back on topic, how can I modify the flicker rate?

Pages: [1] 2 3 ... 9