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 - Adam Atomic

Pages: 1 [2] 3 4 ... 43
21
releases / Re: v2.50 beta thread!
« 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?

22
releases / Re: v2.50 beta thread!
« 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 :)

23
releases / Re: v2.50 beta thread!
« 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...

24
help / Re: How To : One Way platform in 2.5
« on: Sat, Apr 30, 2011 »
.allowCollisions = FLOOR;  i think...

25
help / Re: Overlap and the issues I have therein
« on: Fri, Apr 29, 2011 »
hmmm my guess is maybe the objects are on tree boundaries, so they're ending up in multiple trees.  i'm actually not entirely sure if there's a good way to deal with this from the quad-tree perspective - originally i had it so that objects were only added to a single tree no matter what, but walking that tree and doing the comparisons was prohibitively slow.

i ended up getting much better performance by just adding objects to each tree they are even partially in, and just comparing them multiple times.  those 4 if statements are the tree you're in recursing down into each of the 4 quadrants.

in practice, frequently this is not a super big problem, because usually objects that overlap are either separated, so they no longer overlap, or are !.exists or something, so those additional overlap checks don't actually come through.

i would actually prefer that the tree be structured in such a way that objects are only added once, but I would have to think really really hard about how to then walk that tree and do all the appropriate overlap checks in an efficient manner...

hope that makes sense.  i think this is a real "bug", but i'm not sure how to fix it without making the quad tree super slower...

in the meantime, if all you need to do is check the overlap between like the player and 3 enemies, you can try out the updates to FlxObject.overlaps(), which can handle and recurse groups now.  for large groups, it'll start to have performance issues, but for small groups it should be fine, and you should only get single overlap notifications.

26
help / Re: Any help resource for 2.5 now?
« on: Fri, Apr 29, 2011 »
no upgrade guide, but lots of open source projects!  if you poke around the forum more there should be some ugprade notes, but a new thread devoted to that is probably a useful thing !

27
releases / Re: v2.50 beta thread!
« 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()

28
releases / Re: v2.50 demo activity
« on: Fri, Apr 29, 2011 »
This is pretty awesome you guys, we have three demos started already! You can check em out on the features page http://flixel.org/features.html (groups and tilemaps should be up in a few minutes anyways) Feel free to give feedback or fork the projects to help make them as awesome as possible :)

29
help / Re: FlxCamera Documentation?
« on: Fri, Apr 29, 2011 »
FlxTilemap.follow() should be fine still, as well as FlxG.camera.follow()

30
help / Re: Flash Game Dev Tip #6
« on: Fri, Apr 29, 2011 »
just double-check the order of parameters for FlxButton, make sure the label and callback are in the right order

31
help / Re: Overlap and the issues I have therein
« on: Fri, Apr 29, 2011 »
although i tlooks like you're using version 2.43, the v2.51 that's up on github dev branch should address this :)  i had a LOT of as far as i can tell COMPLETELY unnecessary colllision code in quad tree!

32
help / Re: Overlap and the issues I have therein
« on: Fri, Apr 29, 2011 »
that is strange.  my theory is that because nothing happens to the enemy or player after they overlap you are getting two overlaps:

  • enemy overlapping player
  • player overlapping enemy

i thought that it wouldn't work like that but now I'm not entirely sure... let me poke around a bit

34
help / Re: Converting Sprite to FlxSprite
« on: Fri, Apr 29, 2011 »
that's definitely the right idea there - in version sof flixel without .dirty or .drawFrame() you should be able to just reassign the bitmap I think.  so if you added one last line of code there:

Code: [Select]
wallHolder.pixels = temp;
I htink that might work!

35
help / Re: Converting Sprite to FlxSprite
« on: Thu, Apr 28, 2011 »
this is a bit of a crazy process, but very doable.  what you have to do (i think) is create a new FlxSprite the same size as the Sprite, then get a reference to the FlxSprite's associated bitmapdata with something like:

Code: [Select]
var mySprite:Sprite = URLWhatever();
var myFlxSprite = new FlxSprite().makeGraphic(mySprite.width,mySprite.height);
var myBitmapData:BitmapData = mySprite.pixels;

Then, you need to use DisplayObject & flash graphics draw calls to stamp or draw the Sprite onto that BitmapData object.  I don't remember actually what calls those are but it would be something like "myBitmapData.draw(Sprite);" or something like that.  Then, as long as you set:

Code: [Select]
var mySprite.dirty = true;
Then that FlxSprite should draw/render fine in the flixel game loop, and you can dump the Sprite from memory

UPDATED - hope that helps more!

36
releases / Re: v2.50 beta thread!
« on: Thu, Apr 28, 2011 »
I just pushed v2.51 to the dev branch, the main changes are to overlaps(), and a new function overlapsAt().

overlaps() is now smart enough to call tilemap collision if necessary, and recursively loop through groups.  FlxG.overlaps() is still going to be better performance, probably, but sometimes overlaps() is handier, especially for prototyping.

overlapsAt() is a new function that takes and X and Y value, it's a sort of "what if" function that some people have requested.  you would use it something like this:

Code: [Select]
if(overlapsAt(x+10,y,walls)) { trace("within 10 pixels of right wall"); }
overlapsAt() has the same upgrades overlaps() got, meaning it handles groups and tilemaps pretty well.  i did some cursory testing and everything seemed ok, but if you guys can help me check it tonight and tomorrow then folks should be able to use it for Ludum Dare... thanks!

37
help / Re: Flixel 2.50 Flashdevelop Template
« on: Thu, Apr 28, 2011 »
public github repo for the template sounds like a pretty great idea to me!  i could link that from the downloads page or something even

38
releases / Re: v2.50 beta thread!
« on: Thu, Apr 28, 2011 »
i'm not sure i follow (no pun intended) - you have a fast-moving object and you are giving it a new path to follow each frame, or?

39
releases / Re: v2.50 demo activity
« on: Thu, Apr 28, 2011 »
i'm not sure what to say about it really, its not really for anything in particular, just for putting stuff in if you feel like.  doesn't have any automatic behavior or anything, just a container for stuff that is common...

40
help / Re: Bug when changing states
« on: Thu, Apr 28, 2011 »
in your FlxStates, make sure you are overriding create() rather than the constructor!

Pages: 1 [2] 3 4 ... 43