My FlashPunk 2 Beta (because of stage3D support)

(Martí Angelats i Ribera) #1

Hello guys,

As most of you know, i was making the stage3D support for the FlashPunk (wanted to make the 1.8 version). The problem is that i need to modify entirelly the way the render works. The code i was making was a big mess and was too hard to keep the backworsds compativility (there are a tone of static functions refering to the way of rendering wich wouldn’t work in stage3D). At this point i though it was way better to make a FP 2 version, hardly inspired from FP 1.7 but made from scratch.

Right now the features i want to include are the following ones:

  1. Stage3D support.
  2. General deep clean-up.
  3. Multiple Screens (every screen can have its own render mode).
  4. Multiple worlds (a screen renders an specific world).
  5. Remove most of the static variables and some functions.
  6. The static getters/setters are shortcuts, not getting/modifying values directly.
  7. Draw functions using stage3D (draw a square, circle, etc. using the GPU :smiley: )
  8. Polygonal masks.
  9. Animated masks.
  10. Improve the documentation.
  11. Unflirking and unsynchronized resize (allow direct call from the event handler).
  12. GUI (or at least simplify how to make it)

Also (but i’m not 100% sure about it), i’ll try to improve the recycle system as well as the particle system.

I just started this colosus project and it’s easy to modify. So please, give me your opinions about it.

Edit log:

  • Added GUI (suggestion by @Adamwpe in another topic)
  • Added unflirking resize (suggestion by @kolibri250) [21-03-2015]
  • Multiple corrections (Every time i read it i find an error >.<) [09-03-2015]

(Zachary Lewis) #2


Before your edits, all I could think of was this:

(Martí Angelats i Ribera) #4

LMAO. This is what happens when i don’t sleep enough…

(reopucino) #5

wow, that’s gonna be cool +1

(Ultima2876) #6

Yeah, the biggest challenge with Stage3DPunk was definitely keeping backwards compatibility :slight_smile:

(Jacob Albano) #7

Ditching API parity was the best decision I ever made for my C# port. It’s “Flashpunk-inspired”, rather than being a 1:1 copy. For this project, of course, compatibility is very important. I’m glad I don’t have to worry about it. :wink:


flicker-free resizing would be a good idea… probably it should be irrelevant for you, but not for everyone…


calculation of probabilities i´m missing… at the moment i use self-programmed workarounds… but i think it goes better than it… :slight_smile:

(Jean) #10

I don’t think that the Engine needs to have every single math and/or physics thing inside it. Soon people will ask to have built-in gravity, friction, etc Those are simple things that can be made by hand.

(Martí Angelats i Ribera) #11

What? There will be nothing about physics there. I don’t know if you missunderstood something or i wrote something wrong.


locales/handling of different languages was interesting too, i think.

(Martí Angelats i Ribera) #13

Isn’t this more an utility class than something to be in the core?


ah… is only the core new-written??? okay… then should the version-number of flashpunk increased in minor-release…

the increase in major release brings to mind it could be a complete new flashpunk :wink:

(Jean) #15

Cant find it, but I remember pretty clear that zach uses a versioning pattern that would increase the FP to 2.0 because would be a major change, without full backward compability.

(Martí Angelats i Ribera) #16

The pattern is the following one (in a.b.c)

  • Increase c if no functionality had being modified (modified internally, like bug solving and efficiency improving) (patch).
  • Increase b and reset c to 0, if some functionality had been added, mentaining the backwards compativility (minor change).
  • Increase a and reset b and c to 0 if the new version don’t mantain backwards compativility (major change).

I’m making a hard change becouse it was impossible to allow some functionallities already there with stage3D, so if we do this major change, let’s improve all we can forgetting about backwards compativility.

PD: Adding a utility is a simple minor change.

PD2: I can’t find it but i remember that file.

(Zachary Lewis) #17

Semantic Versioning


okay… thanks for the infos… i´m now informed… :slight_smile:

(Jean) #19

Remember a feature that would be nice…

There was even a topic asking how to do it with current FP, this one Spritemaps in Masklists

No big deal, but being able to set a individual collision mask for each index of the Spritemap would be nice if I ever dare myself of doing a game like Megaman with a character like Zero.

Can you have two worlds open at the same time ? And performance question
(Martí Angelats i Ribera) #20

You mean animed masks… :wink:

(rostok) #21

Guys, have you seen Sos’s FP GPU mod?

FunkPunk - Flashpunk that works on mobile!