Author Topic: v2.41 up on dev + beta branches  (Read 6483 times)

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
v2.41 up on dev + beta branches
« on: Wed, Jun 2, 2010 »
Read Release Notes on github

Download dev branch source here

Code: [Select]
V2.41 FEATURE:

> dev console doesn't display, just traces frame timing when FlxG.mobile is set

V2.40 BUG FIXES:

> stupid tilemap stuff
> stupid preloader stuff

V2.38 STUFF:

> Don't have to "Force" an animation to play() if it is both not looped AND finished
> Optimized rotatePoint() and getAngle() with non-trig shortcut maths
> NEW FUNCTION - FlxObject.hitSide()
- called by BOTH hitLeft() and hitRight()
- shortcut since horizontal collisions usually share logic
- can still override hitLeft() or hitRight() independently
- MAY CAUSE FUNNY BEHAVIOR IN GAMES THAT PREVIOUSLY ONLY OVERRODE hitLeft()
> Don't forget to call super.hitSide() and not super.hitLeft()
> FlxEmitter.createSprites() has new parameter "Bounce"
- automatically assign a bouncing behavior to particles
- uses new class org.flixel.data.FlxParticle
> Various general optimizations (should help with mobile versions)
> FlxTileblock extends FlxSprite now
- has new function loadTiles()
- can still call loadGraphic() but has less options
- render times drastically improved (Mode dropped from 3ms to 0ms)
- supports rotation, scaling, tinting, etc
- implicit support for non-square tiles too
> FlxG.mobile - flag this to disable non-mobile features
- currently only disables some stage events and the sound tray
> FlxButtons can no longer be pressed while game is paused
- set FlxButton.pauseProof to true to work while paused
> Fixed annoying problems with bounding boxes
- sprites with offsets appear properly now
> FlxKeyboard has NUMPAD keys now
> FlxTilemap only renders when necessary
- tiles are cached to a screen-sized buffer
- only redrawn when the buffer can't cover the screen
> FlxU got some new color utilities!
- FlxU.getColor() - generate a uint color from RGBA components
- FlxU.getColorHSB() - generate a uint color from HSB components (thanks, trashpaint!)
- FlxU.getRGBA() - return an array of RGBA values from a uint color
- FlxU.getHSB() - returns an array of HSB values from a uint color
> hopefully made FlxU.random() a little safer
- deprecated mutate() in favor of fixSeed()
- BUT you can still mutate seeds like this: fixSeed(seed+mutator);

mostly bug fixes and optimizations, a couple small API changes, and a few new utilities.  trying to get flixel to be a little more Android friendly...
« Last Edit: Thu, Jun 3, 2010 by Adam Atomic »

zuperxtreme

  • Contributor
  • ****
  • Posts: 254
  • Karma: +0/-0
    • View Profile
    • Buddah
Re: v2.38 up on dev + beta branches
« Reply #1 on: Wed, Jun 2, 2010 »
Awesome, your dedication to this is amazing.  ;D
..."without order nothing exists, without chaos nothing evolves"... 
Zoklet.net

Kayn

  • Member
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
    • Heatknives
Re: v2.38 up on dev + beta branches
« Reply #2 on: Thu, Jun 3, 2010 »
Code: [Select]
> NEW FUNCTION - FlxObject.hitSide()
> Various general optimizations (should help with mobile versions)
> FlxTileblock extends FlxSprite now
- has new function loadTiles()
- render times drastically improved (Mode dropped from 3ms to 0ms)
- implicit support for non-square tiles too
> FlxG.mobile - flag this to disable non-mobile features
- currently only disables some stage events and the sound tray
> FlxTilemap only renders when necessary
- tiles are cached to a screen-sized buffer
> FlxU got some new color utilities!

...trying to get flixel to be a little more Android friendly...

These. These are awesome.
Soon as a stable release for Froyo is available I expect to be playing Flixel games on my phone. The implicit support for rectangular tiles and the extention from FlxSprite gives me hope that slopes are going to be in the official pipeline (we can dream...).

Speed optimisation is always a good thing, since the faster the base engine, the more leeway I get when I end up doing my own processor draining modifications.
Restlessness and discontent are the first necessities of progress. -Edison

hima

  • Member
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • My Dev Blog
Re: v2.38 up on dev + beta branches
« Reply #3 on: Thu, Jun 3, 2010 »
Love the way this is heading, especially the android friendly features  ;)

BTM

  • Guest
Re: v2.38 up on dev + beta branches
« Reply #4 on: Thu, Jun 3, 2010 »
Quote
> NEW FUNCTION - FlxObject.hitSide()
It looks like the hitLeft / hitRight functions are no longer called. At least not when an FlxObject hits the FlxTilemap. Is that correct? I've had hitLeft and hitRight overriden in my class and the calls weren't called - changing it to overrider public hitSide did the trick.

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.38 up on dev + beta branches
« Reply #5 on: Thu, Jun 3, 2010 »
hitLeft and hitRight should still both be called, but by default those will just call or defer to hitSide - you should be able to override them independently still...

BTM

  • Guest
Re: v2.38 up on dev + beta branches
« Reply #6 on: Thu, Jun 3, 2010 »
Ok, it does indeed work - must have messed something up in the other parts of the code.

Cheers for making such a wonderfull framework!

werem

  • Member
  • **
  • Posts: 79
  • Karma: +0/-0
    • View Profile
Re: v2.38 up on dev + beta branches
« Reply #7 on: Thu, Jun 3, 2010 »
Adan, can you make a tutorial for Android? I just can't convert my actionscript projects into Air applications.

Thanks!

vieko

  • Member
  • **
  • Posts: 11
  • Karma: +0/-0
    • View Profile
    • LeGrudge & Rugged
Re: v2.38 up on dev + beta branches
« Reply #8 on: Thu, Jun 3, 2010 »
Awesome - I can't wait to try the new features. Thank you Adam!

Here's something that broke immediately and I just resolved: the code below rendered correctly on 235. On 239 it renders only a portion of the FlxTilemap:

Code: [Select]
var background:FlxTilemap = new FlxTilemap();
background.loadMap(new DataMap,DataTiles);
background.moves = false;
background.solid = false;
add(background);

To fix it, I simply changed the order to:

Code: [Select]
var background:FlxTilemap = new FlxTilemap();
background.moves = false;
background.solid = false;
background.loadMap(new DataMap,DataTiles);
add(background);

... and one more thing that works differently now: toggling bounding boxes as previously directed, shows bounds on some items only.

Code: [Select]
// toggle bounding boxes
if(FlxG.keys.justPressed("B")) FlxG.showBounds = !FlxG.showBounds;

Hope it helps!
« Last Edit: Thu, Jun 3, 2010 by vieko »

krix

  • Member
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: v2.38 up on dev + beta branches
« Reply #9 on: Thu, Jun 3, 2010 »
I <3 flixel! :)
With every update a bit more!
Thank you so much for this adam!

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.38 up on dev + beta branches
« Reply #10 on: Thu, Jun 3, 2010 »
Thanks for pulling it and checking it out guys!

vieko: I am looking into the tilemap situation now, that's pretty odd.  the bounding boxes are supposed to draw MORE reliably now, haha, not sure how they happened to get worse...if you notice a pattern let me know!

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.40 up on dev + beta branches
« Reply #11 on: Thu, Jun 3, 2010 »
man good catch veiko :)  let me know if 2.40 fixes the problems -  the tilemap solidity stuff was actually CONNECTED (eeww) to the bounding box issues with the tilemaps...hopefully this works better now!

vieko

  • Member
  • **
  • Posts: 11
  • Karma: +0/-0
    • View Profile
    • LeGrudge & Rugged
Re: v2.40 up on dev + beta branches
« Reply #12 on: Thu, Jun 3, 2010 »
Hey Adam,

Cheers for the wicked fast reaction :) See below for 240 notes:

  • Bounding boxes are back in biz
  • Where I place FlxTilemap.moves/FlxTilemap.solid within the call does not affect the outcome.


I noticed something that might be unrelated: My character sprite has a few white pixels when rendered on screen that are not present on my PNG file. I can reproduce this behaviour with 235, 237, 239. See below:


Ever seen this happen? Let me know!

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.40 up on dev + beta branches
« Reply #13 on: Thu, Jun 3, 2010 »
that is weird O_O  i have never seen that before!

EDIT - also i put up a little change to the dev console when using the new FlxG.mobile flag that will hopefully be more useful for people messing about on Android - instead of drawing the quite costly dev console itself, it just traces the frame timing

vieko

  • Member
  • **
  • Posts: 11
  • Karma: +0/-0
    • View Profile
    • LeGrudge & Rugged
Re: v2.41 up on dev + beta branches
« Reply #14 on: Thu, Jun 3, 2010 »
yah it's weird and here's why: I saved over my sprite with sightly different settings (bah) my bad. Cheers!

keptblue

  • Member
  • **
  • Posts: 57
  • Karma: +0/-0
    • View Profile
    • EXTLABS
Re: v2.41 up on dev + beta branches
« Reply #15 on: Thu, Jun 3, 2010 »
really excellent.

you are doing some big, big things here. keep up the inspiring work.




jeanpier

  • Guest
Re: v2.41 up on dev + beta branches
« Reply #16 on: Fri, Jun 4, 2010 »
Hi Adam, nice update.

Only one problem ;)

Buttons are not working when the state is scrolling. I reproduced the problem with a little test.

Check the swf here: http://www.swfcabin.com/open/1275705503
The grey box is a simple buton and a camera is moving up.

Code: [Select]

package states {
import org.flixel.*;

public class PlayState extends FlxState{
private var cam:FlxSprite;
private var btn:FlxButton;

public function PlayState():void {
}
override public function create():void {
FlxG.mouse.show();

cam = new FlxSprite(140, 3800);
cam.velocity.y = -100; // just moving up...

btn = new FlxButton(20, 20, btnPressed);
btn.scrollFactor.y = 0;
add(btn);

// This makes the button not work any more.
//If I comment this lines the button work but not level scrolling.
FlxG.followBounds(0,0,480,4000);
FlxG.follow(cam, 1);
}

private function btnPressed():void{
trace("Btn clicked");
}
}
}



Ekrifos

  • Member
  • **
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: v2.41 up on dev + beta branches
« Reply #17 on: Sat, Jun 5, 2010 »
Oh, I have exactly the same problem and I didn't know if was or not because my code. The buttons work fine until I scroll down the game and become unclickable.

Sorry to write only to say that sort of things, I love all the rest of new changes :)

xhunterko

  • Contributor
  • ****
  • Posts: 449
  • Karma: +0/-0
    • View Profile
Re: v2.41 up on dev + beta branches
« Reply #18 on: Sun, Jun 6, 2010 »
What I like best is the new front page setup. You can easily access everything all in one go! Love it. :)
Now on twitter: http://twitter.com/xhunterko I made a game that's in alpha you can buy here: http://xhunterko.itch.io/wave-miner-alpha

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.41 up on dev + beta branches
« Reply #19 on: Mon, Jun 7, 2010 »
oh craps, probably something weird broke the buttons again :P  they are the bane of my existence, i made a note to check them out on the next flixel day!  probably it has somethign to do with the onMouseDown handler...