Author Topic: v2.50 beta thread!  (Read 29635 times)

3WG

  • Active Member
  • ***
  • Posts: 110
  • Karma: +0/-0
    • View Profile
    • Jeux.MU
Re: v2.50 beta thread!
« Reply #100 on: Fri, Apr 29, 2011 »
Hi Flixelers,

I'm trying the new 2.5 flixel and something miss for me with the new isTouching()

The old way to check hitTop(Contact:FlxObject,Velocity:Number) as the ability to retrieve to objects type we are touching ...

What the best way to do this with 2.5.


P.S. : Maybe one day i will master English and another Flixel (only the second is a dream ;)

Flash games are FUN !
Jeux.MU

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.50 beta thread!
« Reply #101 on: Fri, Apr 29, 2011 »
aweosme suggestions ubergeorge!  would you be inclined to punch them into the github issues queue?  i will be more likely to keep track of them there, i like how most of that sounds though

3WG - the way to check that stuff in v2.50 is to do it similar to how FlxU.overlaps() used to work.  you just write a custom callback or handler and pass that in to FlxG.collides()

UberGeorge

  • Member
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: v2.50 beta thread!
« Reply #102 on: Fri, Apr 29, 2011 »
Great, I added them as four individual requests. Thanks.

auriplane

  • Snails!!
  • Contributor
  • ****
  • Posts: 497
  • Karma: +1/-0
  • Snails!!
    • View Profile
Re: v2.50 beta thread!
« Reply #103 on: Fri, Apr 29, 2011 »
I have a bunch of little things I can contribute, if anyone wants them, that I hacked into 2.43 for my current project as I went.  But I really want to try updating to 2.51, because this fixed timestep stuff seems like it would help with a lot of little physics bugs in my game!  (Like, a current bug: not being able to jump into one-tall corridors, because you pass over it in the space of one frame!  Happens at 20fps or lower.)

A couple tiny things I did: changed FlxText shadow to have a _shadowDistance var, added a FlxText outline (behaves like shadow, but draws on all four sides instead of +1+1), added a separate music volume, added a ringbuffer to keyboard to give me the last N keys pressed, added some missing keys, separate console enable/disable flag in FlxG...  So mostly small things.  Should I post any of my horrid hackery?

I had this idea that I should try to serialize the tilemaps to AMF via ByteArray, then embed those to reduce the startup time for a map, but I never got that working :-(

Looking forward to trying 2.51 tonight :-D

P.S. My CAPTCHA to sign up for the forum had a Greek letter in it, which I dutifully entered, and it said I was correct!

auriplane

  • Snails!!
  • Contributor
  • ****
  • Posts: 497
  • Karma: +1/-0
  • Snails!!
    • View Profile
Re: v2.50 beta thread!
« Reply #104 on: Fri, Apr 29, 2011 »
Yikes!  Changing the collision stuff from 2.43 to 2.51 is pretty daunting.  

The bounces for hitleft etc., I take out entirely replace with elasticity?

useDefaultHotKeys -> useSoundHotKeys?
showBounds -> FlxG.visualDebug?
FlxState.bgColor -> FlxG.bgColor (including alpha?)
Okay, _pause has been broken into a bunch of things.  That makes sense.  Why is _focus just a Sprite?  My old FlxPause was used only for lost focus, and looks like this:

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

    public class PauseLayer extends FlxGroup
    {
        public var pauseText:FlxText;
        public var bg1:FlxSprite;
        public var bg2:FlxSprite;

        public function PauseLayer():void
        {
            // snip a bunch of code to set up a little pause box
            // ...
        }

        override public function update():void
        {
            if (FlxG.mouse.justPressed() ||
                FlxG.keys.justPressed("Z") ||
                FlxG.keys.justPressed("X") ||
                FlxG.keys.justPressed("J") ||
                FlxG.keys.justPressed("K") ||
                FlxG.keys.justPressed("P") ||
                FlxG.keys.justPressed("ESCAPE") ||
                FlxG.keys.justPressed("SPACE") ||
                FlxG.keys.justPressed("ENTER"))
                FlxG.paused = false;
        }

I went ahead and took a screen shot of my old pause screen, though I'm not sure what to do from there--I've got no update()!

Some actors bounce off walls, but not floors.  They need separate X and Y elasticity!  Can you make it a vector instead of a scalar, by any chance?  (EDIT: Well, it only took a minute to add it to my own copy, so it's no big deal :-)

Moving platforms are the only place where I actually used the flxobject passed in by hitleft/hittop etc.  Most of the time, it looks like I want justTouched(), rather than isTouching().  Looks good!

My project is an exciting 31000 lines of cruddy code, so it'll be a little while before I get it working, I think, so I don't actually know how well it works yet :-)
« Last Edit: Fri, Apr 29, 2011 by auriplane »

axcho

  • Active Member
  • ***
  • Posts: 174
  • Karma: +0/-0
    • View Profile
    • Evolution Live!
Re: v2.50 beta thread!
« Reply #105 on: Fri, Apr 29, 2011 »
Some actors bounce off walls, but not floors.  They need separate X and Y elasticity!  Can you make it a vector instead of a scalar, by any chance?
This would be a nice change for v2.52... ;)

misko28

  • Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: v2.50 beta thread!
« Reply #106 on: Sat, Apr 30, 2011 »
My tilemap doesn't work for tiles above index of 15 :(

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.50 beta thread!
« Reply #107 on: Sat, Apr 30, 2011 »
My tilemap doesn't work for tiles above index of 15 :(

is it on auto-tile?  i'm pretty sure the tile types are enumerated by total number of tiles...

misko28

  • Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: v2.50 beta thread!
« Reply #108 on: Sat, Apr 30, 2011 »
I've changed

Code: [Select]
map.startingIndex = 1;
map.loadMap(new levels[FlxG.level-1], tileImg, 16, 16);

to

Code: [Select]
map.loadMap(new levels[FlxG.level-1], tileImg, 16, 16, 0, 1, 0, 0);
And now I can't see tiles with index 15

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.50 beta thread!
« Reply #109 on: Sat, Apr 30, 2011 »
can you post your level data and tiles?  if you want to keep them secret just email them to me and i'll figure out whats up :)

misko28

  • Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
« Last Edit: Sat, Apr 30, 2011 by misko28 »

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.50 beta thread!
« Reply #111 on: Sat, Apr 30, 2011 »
I have a bunch of little things I can contribute, if anyone wants them, that I hacked into 2.43 for my current project as I went.  But I really want to try updating to 2.51, because this fixed timestep stuff seems like it would help with a lot of little physics bugs in my game!  (Like, a current bug: not being able to jump into one-tall corridors, because you pass over it in the space of one frame!  Happens at 20fps or lower.)

A couple tiny things I did: changed FlxText shadow to have a _shadowDistance var, added a FlxText outline (behaves like shadow, but draws on all four sides instead of +1+1), added a separate music volume, added a ringbuffer to keyboard to give me the last N keys pressed, added some missing keys, separate console enable/disable flag in FlxG...  So mostly small things.  Should I post any of my horrid hackery?

I had this idea that I should try to serialize the tilemaps to AMF via ByteArray, then embed those to reduce the startup time for a map, but I never got that working :-(

Looking forward to trying 2.51 tonight :-D

P.S. My CAPTCHA to sign up for the forum had a Greek letter in it, which I dutifully entered, and it said I was correct!

these are super good ideas, do you want to punch them into the github issues queue?

misko28

  • Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: v2.50 beta thread!
« Reply #112 on: Sat, Apr 30, 2011 »

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.50 beta thread!
« Reply #113 on: Mon, May 2, 2011 »
ok pushed up a bunch of stuff to beta branch as v2.52, mostly some timer fixes and a new function FlxSprite.replaceColor()

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: v2.50 beta thread!
« Reply #114 on: Mon, May 2, 2011 »
Just grabbed 2.52 and added it to 2 of my games, both work perfectly with it. In fact one I was having performance issues with is now running a lot smoother. Will try it on my work machine tomorrow (where the issues were more evident).
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

Bennett

  • Member
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: v2.50 beta thread!
« Reply #115 on: Mon, May 2, 2011 »
I can't get the console to appear by pressing ~... am I missing something really obvious, or is it not working right now?

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: v2.50 beta thread!
« Reply #116 on: Mon, May 2, 2011 »
On my keyboard (UK English) it's the ' key (same as the @ key, not ~) but works fine.

I have to add forceDebugger = true to my FlxGame class though, without it it doesn't work because I don't use the FlxPreloader.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

Bennett

  • Member
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: v2.50 beta thread!
« Reply #117 on: Mon, May 2, 2011 »
thanks, that did it.

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: v2.50 beta thread!
« Reply #118 on: Mon, May 2, 2011 »
Just grabbed 2.52 and added it to 2 of my games, both work perfectly with it. In fact one I was having performance issues with is now running a lot smoother. Will try it on my work machine tomorrow (where the issues were more evident).

I found a bug where I had put in unnecessary floating point correctiosn that were occasionally causing tilemaps to basically redraw the buffer every single frame.  pretty ****ty for performance it turns out!!

Geti

  • Active Member
  • ***
  • Posts: 143
  • Karma: +0/-0
    • View Profile
    • 1 Bar Design
Re: v2.50 beta thread!
« Reply #119 on: Mon, May 2, 2011 »
FlxSprite.replaceColor()
Freaking awesome.