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

Pages: [1] 2 3
1
help / Flixel lightning tutorial lost, HELP
« on: Tue, Dec 17, 2013 »
Hello,

I know there was here a tutorial how to achieve this effect in flixel games:
http://www.youtube.com/watch?v=MaDPr2Z1-lM
But I can't find it anymore....
EDIT: Something like this: http://psvilans.wrongbananas.net/dynalight-dynamic-lighting-engine/

2
iOS / how to get started with flixel IOS?
« on: Fri, Dec 6, 2013 »
Hello,
I have made games with flixel (as3) so far.
Now I want to be able to make andorid and ios versions.
I have 2 sollutions:
1. haxe flixel
2. flixel ios+flixel gdx.

My question is for flixel ios, there is a tutorial how to build a hello world, (mode-game?)
what software i need, do i need to own a mac?
thanks.

3
Hello,

I need to modify the FlxButton class in order to check if a other sprite is between mouse and the button and if it is not to execute the function of the button.
I saw here:http://www.funstormgames.com/blog/2012/01/flixel-the-trouble-with-removing-buttons-callbacks/ in comments a function that will do a hittest but it bad written and even after I correct it it doen't work.

Can someone help me?

Thanks.

4
Hello,
Is anyone from US/UK here willing to collaborate, over 18 years old?
Details via PM.

5
help / Flash develop organisation help[SOLVED]
« on: Wed, Feb 6, 2013 »
Hello,
I found out that code inside {} braces can be hidden by pressing a plus sign that appears on the left side(where the lines are numbered).
However if I have
Code: [Select]
{
private var myvariable:Array=[blb, bla]
}
later if I want to write myva... it supposed to appear a kind of drop down menu with myvariable to avoid typos.
However with the code above inside {} myvariable doesn't appear in that drop down menu.
Can you help me?

6
help / Flxbar doesn't updates itself to correct range
« on: Wed, Jan 30, 2013 »
Hi,
I have a problem with FlxBar.
I create the bar by using:
Code: [Select]
gunbar = new FlxBar(0, 0, FlxBar.FILL_LEFT_TO_RIGHT, 32, 4, gun1, "nrdegloantecurentedincartusHUD", 0 , 10, true);lu

After a event(switch weapon) i need to update the max value of the bar to 20 instead of 10.
I tried to use
Code: [Select]
gunbar.setRange(0, 20); but no effect. The bar behaves like it's set to max value 10.

7
help / Rain Effect help
« on: Mon, Dec 10, 2012 »
hello,
I'm trying to achieve a rain effect in my game.
I managed to create this http://active.tutsplus.com/tutorials/effects/create-a-rain-effect-in-flash-using-actionscript-30/  but only with FlxG.stage.addchild.
I want this not above all objects in my game. I;ve tried to put this as flxMovieclip with no succes.
My code:
playstate:
Code: [Select]
var rain:Rain = new Rain();

rain.init(200, 50, 5, 600, 380, "left");


FlxG.stage.addChild(rain);
RAIN.as
Code: [Select]
package com.chipacabra.Jumper
{
/**
* ...
* @author Mihai Morosanu
*/
import flash.display.*;
import flash.events.Event;

public class Rain extends MovieClip
{
[Embed(source = '../../../../art/1/drop.png')]public static var Drop:Class
private var offset:int = 50;
private var dropsNumber:int;
private var dropsVector:Vector.<MovieClip> = new Vector.<MovieClip>();

public function init(drops:int, fallSpeed:int, windSpeed:int, hArea:int, vArea:int, dir:String):void
{
dropsNumber = drops;

if (dir == "right")
{
offset *= -1;
}

for (var i:int = 0; i < drops; i++)
{
//var drop:Drop = new Drop();
var drop:MovieClip = new MovieClip();
drop.addChild(new Drop());

drop.fallSpeed=fallSpeed;
drop.windSpeed=windSpeed;
drop.dir=dir;
drop.hArea=hArea;
drop.vArea=vArea;

drop.x = Math.random() * (hArea + offset);
drop.y=Math.random()*vArea;

//

drop.scaleX = Math.round(((Math.random() * 1) + 0.3) * 10) / 10;
drop.scaleY=drop.scaleX;

//

dropsVector.push(drop);

addChild(drop);
}

inTheDirection();
}

private function inTheDirection():void
{
for (var i:int = 0; i < dropsNumber; i++)
{
switch (dropsVector[i].dir)
{
case "left" :

dropsVector[i].addEventListener(Event.ENTER_FRAME, moveLeft);

break;

case "right" :

dropsVector[i].scaleX*=-1;
dropsVector[i].addEventListener(Event.ENTER_FRAME, moveRight);

break;

default :

trace("There is some error dude...");
}
}
}

private function moveLeft(e:Event):void
{
e.target.x-=e.target.windSpeed;
e.target.y+=Math.random()*e.target.fallSpeed;

if (e.target.y>e.target.vArea+e.target.height)
{
e.target.x = Math.random() * (e.target.hArea + (offset * 2));
e.target.y=- e.target.height;
}
}

private function moveRight(e:Event):void
{
e.target.x+=e.target.windSpeed;
e.target.y+=Math.random()*e.target.fallSpeed;

if (e.target.y>e.target.vArea+e.target.height)
{
e.target.x = Math.random() * (e.target.hArea - offset * 2) + offset * 2;//Check
e.target.y=- e.target.height;
}
}
}
}

Drop.as:
Code: [Select]
package com.chipacabra.Jumper
{
/**
* ...
* @author Mihai Morosanu
*/
import flash.display.*;
dynamic public class Drop extends MovieClip
    {
[Embed(source = '../../../../art/buton/hud/2/levels.png')]public static var Drop:Class
        public function Drop()
        {
            return;
        }

}
}

Can someone  help me traslate this as a FlxMovieclip, or tell me another way to achieve rain effect?
Thanks.



8
games / Feedback for my game on FGL please
« on: Tue, Nov 13, 2012 »
Hello,
I'm looking for feedback for my new game on FGL: https://www.fgl.com/view_game.php?from=dev&game_id=26545
I can give feedback in return for your game.
Thanks

9
chat / native english text correction /rephrase help
« on: Sat, Nov 10, 2012 »
Hi, i need help from a native english person willing to help me with the script from my future game.:
link:https://skydrive.live.com/view.aspx?cid=D5E5776BA36AB301&resid=D5E5776BA36AB301%21264&app=Word
Thanks. and remember only native english(UK, US, Canada)

10
help / A game inside a game
« on: Wed, Oct 17, 2012 »
Hello,
I want to know how can a external swf can be played(as a game not as a movie) inside another swf.
I found this webpage: http://www.onemorelevel.com/game/nonoba_racing.
They host a swf on
http://static.onemorelevel.com/mpgames/racing.swf
And this swf loads the actual game , hosted on nonoba servers.

I remember that I tried in the past with loadmovie functions and it didn't worked.
EDIT: found the solution:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.html
Code: [Select]
var request:URLRequest = new URLRequest("http://*****.swf");
var loader:Loader = new Loader()
loader.load(request);
FlxG.stage.addChild(loader);
Now the new game is loaded on top of the old game. You must also remove the mouse and keyboard event listeners . and if you need to go back to quit the game  add another layer above the game with a button(ha mouse event listener must stay) that removes the game loaded

11
help / Multiple Levels problems and solutions
« on: Tue, Oct 9, 2012 »
Hello.
There are multiple ways to do a level based game:
1. Every level in it's own playstate
CONS:
When you need to change something you change it multiple times
2. One playstate
-
Code: [Select]
[Embed(source = '../../../../levels/1/mapCSV_Group1_Map1.csv', mimeType = 'application/octet-stream')]public var levelMap:Class;
           [Embed(source = '../../../../levels/2/mapCSV_Group1_Map1.csv', mimeType = 'application/octet-stream')]public var levelMap2:Class;
and then:
Code: [Select]
if(FlxG.level==1)map.loadMap(new levelMap, levelTiles, 16, 16)
          if(FlxG.level==2)map.loadMap(new levelMap2, levelTiles, 16, 16)


CONS: you have only one big playstate and lots of if

3. Best solution from here:http://bullettimeninja.blogspot.ro/2011/09/game-level-architecture.html#more
Code: [Select]
public class PlayState extends FlxState
2 {
3      private var gameLevel:GameLevel;
4      // Gameplay Logic
5 }
1 public class GameLevel
2 {
3      // Level Data
4 }
1 public class Level1 extends GameLevel
2 {
3      // ...
4 }

1 public class Level2 extends GameLevel
2 {
3      // ...
4 }

Pro:- every level data has it's own state
Cons:- The gameplay logic cannot be changed. So if you want in one level player can finish the level with 2 coins colected and in other level with 4 coins, you must write an if else code inside the   update of the playstate.
- inside level class you don;t have access to playstate variables/functions

3.1 same as above but gamelevel extends playstate.
- now you have access to playstate variables/functions but for some reason you cannot override public function update():void inside Level1 class
You can but it does not work.

4.Same as 3.1 but the current state is not Playstate but level1
Pro: every level has it's own state where you put input data and different gameplay logic
You switch levels from playstate:
Code: [Select]
if(FlxG.level==1){gameLevel = new Level1();nextlevel=Level2}
if (FlxG.keys.justPressed("E")) { FlxG.level++; FlxG.switchState(new nextlevel); }

5. from bullet time nija blogspot there is a comment about loading data from one big xml.
Pro: -one playstate no level class , the data is auto loaded from xml based on current level
Cons: for specific gameplay per level you would still do a if/else code inside playstate's update.

---------------------------------------------------------------------------------------------------

For me 4. seams the best solution because it looks clean .
please tell me if there are other solutions, if solution 4 has hidden CONS that I don;t see it(because in the bullet time ninja blog it said:"However, you would never want game levels to extend FlxStates.")
What's you're best solution?

12
help / Set "Allow collisions" only for an object?
« on: Tue, Oct 2, 2012 »
Hello,
Is there an easy way to set allowcollisions only for an object?
Let me detail it:
I have an object :object1, and another object :object2.
Object1 must  collide with all sides (ANY) with all other objects in game.
Object2 must  collide with all sides (ANY) with all other objects in game.
Object1 must collide ONLY  UP and DOWN with object2
How can I achieve this?

13
help / Mute all sounds except background music
« on: Sun, Sep 2, 2012 »
hello,
Flixel has a mute function 0 key, but when you mute you mute all sounds.
All games have 2 mute butons, one for the sound effects and one for background music.
In flixel the background music is called by playMusic function.
Is there a easy solution to mute separately all sounds except the music, and mute the music but keep all other sounds?
-----------------------------------------
I manage to do this but is so odd.
1. made a new class FlxSoundunmuted. Copy all from FlxSOund. modify with this :
Code: [Select]
internal function updateTransform():void
{
_transform.volume = FlxG.volume*_volume*_volumeAdjust;//modif pt sound unmuted
if(_channel != null)
_channel.soundTransform = _transform;
}
2. In flxG modify:
Code: [Select]
static public function playMusic(Music:Class,Volume:Number=1.0):void
{
if(music == null)
music = new FlxSoundunmuted();//modif pt sound unmuted
else if(music.active)
music.stop();
music.loadEmbedded(Music, true);

music.volume =  Volume;
music.survive = true;
music.play();
}
and:
Code: [Select]
static public var music:FlxSoundunmuted;
this way when you mute the background music keeps going.

---------------------
Anyone has a better elegant solution?

14
help / FlxBar how to fill like clock?
« on: Wed, Aug 15, 2012 »
Hello everyone,
I'm stuck in one of my tasks.
I need to make the FlxBar (from Photonstorm's plug in) to fill like a clock(it doesn't need to be FlxBar ).
http://i1234.photobucket.com/albums/ff402/mrajfleming/clock%20icon%20tutorial/21.png
Like the image from the link above.
I should provide a png and if heath is 0 the image should be empty, if the heath rises the png should begin to fill the rectangle shape like a clock.
I know it is hard but I hope someone will help me.

15
Hi,
I am trying to make a game based on  the box 2d tutorial: http://flashgamedojo.com/wiki/index.php?title=Box2D,_Implementation_%28Flixel%29
I want to make a check when the ball touches the rotating sprite.
But if I run the pixel perfect check form Photonstorm power tools  the collision is still checked on the basic FlxSprites boxes not on baox 2d fixtures.
Can anyone help?

16
help / Large bitmaps issues
« on: Mon, Jun 25, 2012 »
Hello,
I need to implement large bitmaps on my flixel game.
1. If target FP.10 I should be able to have a spritesheet of ~ 5000x800:
http://www.bit-101.com/blog/?p=1426
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html
However if I have spritesheets over 4000 pixels an error returns about invalid bitmapdata
2. if i target fp11. a small issue appears a flickering image  at a specific point in spritesheet(for facing=left).

Anyway I should be able to target FP10.. is there a hidden value of max width of bitmapdata of 4000 pixels inside flixel code?
Can anyone help me?

17
help / Flash develop and right click
« on: Tue, Jun 19, 2012 »
Hi,
I'm using the latest flash develop 4.0.3 RTM and I'm traying to target flash player 11.2 or 11.3 then the folling error occures:
C:\Program Files\FlashDevelop\Tools\flexsdk\frameworks\flex-config.xml(56): Error: unable to open 'libs/player/11.3/playerglobal.swc'
If i navigate to C:\Program Files\FlashDevelop\Tools\flexlibs\frameworks\libs\player folders 11.2 and 11.3 are missing.
and can't update stage.addEventListener(MouseEvent.RIGHT_MOUSE_DOWN, onMouseDown); Right mouse down is not recognised...
Has anyone succeeded in configuring right click event listener in flash develop?Or is exclusive for flash cs 6?

EDIT:
http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/playerglobal11_3.swc
download this and put in C:\Program Files\FlashDevelop\Tools\flexlibs\frameworks\libs\player\11.3
now it works to compile against 11.3 and right click as an Event listener..

18
help / FindPath only on a portion of map?
« on: Tue, Jun 12, 2012 »
Hello,
Computing a path over the whole(huge) tilemap is very resource intensive..
Is there a way to compute the path only over a portion of map? Let's say from tile 30 to 60 in width and from tile 10 to 30 in height
Thanks for your help.

19
help / Easy way to rewind the game?
« on: Sun, May 6, 2012 »
Hi.
I want the game to play in rewind. Is this possible?
In Flash I found a simple solutions with prevframe function.
CHeck this video http://www.republicofcode.com/tutorials/flash/video/rewind.php:
The problem is that FlxG extend sprite not movieclip and the prev frame function is not available.
How can I rewind the game at the press of a button?

20
help / How to use loadrotatedgraphic?
« on: Sat, Apr 21, 2012 »
Hi.
I found this project http://dylanmeville.com/files/BCAFX/?swf=http://dylanmeville.com/swf/MetroidGame/Main.swf&w=800&h=600
Can someone explain how this is done? If i check bounds the moving arm does not seem to have a flixel bound. Is this a sprite outside of flixel, or is just a loadrotatedgraphic?
If I want the arm to animate, the only solution would be http://flashgamedojo.com/wiki/index.php?title=Mouse-Aim_Tutorial_%28Flixel%29...
But 16 frames will be enough for smooth  transition?
Can you share your opinion?

Pages: [1] 2 3