A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: 2D AS3 Tile Engine with physics

  1. #1
    Member
    Join Date
    Aug 2007
    Posts
    61

    2D AS3 Tile Engine with physics

    I'm working on a 2D Tile Engine with the following capabilities:
    • 100% AS3 - can be built and extended with open source tools
    • Physics System
    • Particle System
    • Very large scrolling level support > 1000x1000 tiles
    • Enemy AI tool kit
    • Projectile/Weapon system
    • Very efficient CPU/Memory usage


    It is, in part, based on a number of projects and articles available to everybody:
    • Collision detection - The metanet N tutorials
    • Physics - Ideas from APE: Alec Coves Actionsctipt Physics Engine
    • Various blogs (Andre Michelle, Michael Baczynski etc)
    • Wikipedia :-)


    I'm building it as generic as possible - if anybody wants to help out (theres lots to do) then let me know.

    You can find the demo & source here: http://yaa-blog.blogspot.com/

  2. #2
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    Good work, friend.

    Your engine could be used for a sweet 'Exile' remake..

  3. #3
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    nice engine,
    though personally I prefer tutorials instead of fix kits. Are you planning on breaking some elements apart from it like Sandy did with their distorsion class? or explaining in depth how some things were approached?

  4. #4
    Member
    Join Date
    Aug 2007
    Posts
    61
    Quote Originally Posted by EvilKris
    Good work, friend.

    Your engine could be used for a sweet 'Exile' remake..
    Thanks, well spotted - That is exactly why I'm writing it....

    Now I just need somebody who has the original map generation algorithm....

  5. #5
    Member
    Join Date
    Aug 2007
    Posts
    61
    Quote Originally Posted by renderhjs
    nice engine,
    though personally I prefer tutorials instead of fix kits. Are you planning on breaking some elements apart from it like Sandy did with their distorsion class? or explaining in depth how some things were approached?
    Well, it is in part based on other tutorials. I really wanted an engine to recreate a game (see previous post). I noticed a lack of 2D game engines that had the features I needed to I wrote this as functional engine rather than tutorial.

    The trouble I find this physics engine/kits is that they are trying to solve a general case - that can be expensive in terms of CPU. I found that with APE and Fisix (2 AS3 physics toolkits), not much CPU left to implement all the things I need.

  6. #6
    Senior Member
    Join Date
    Aug 2007
    Location
    Spencerville, Ontario, Canada
    Posts
    146
    Wow this is really neat rje! I really like what you have done, this is similar to what I was planning on doing for my games battle mode. Good work man!

  7. #7
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Excellent work, rje! I like to see some new up and coming Flash engines, even though I'm through with all that. Are you planning on physically simulating the boxes (i.e. implementing rotation) and if so how? It was a pain in the butt to get one of my projects to resolve collisions correctly, but I think it was because of the way I simulated the boxes.

  8. #8
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    Thanks, well spotted - That is exactly why I'm writing it....

    Original map algorithm? Ever tried writing to the original creators? You'd be suprised at how responsive they can be sometimes. I wrote to Archer Maclean (IK+) about 10 years ago just for a little advice about a game and he was a nice guy, we swapped mails for a while.

  9. #9
    Member
    Join Date
    Aug 2007
    Posts
    61
    Quote Originally Posted by OpethRockr55
    Are you planning on physically simulating the boxes (i.e. implementing rotation) and if so how? It was a pain in the butt to get one of my projects to resolve collisions correctly, but I think it was because of the way I simulated the boxes.
    I've been thinking about that for a while. At the moment the collision code is all based on axis aligned boxes. The benefit is that its fast, very fast (see the N tutorials). If I wanted to rotate things then I'd have to recalculate my projections all the the time. Nice but that's gona eat up cpu. At the moment I can dump >100 boxes into the level and it handles it without any slowdown.

    The other thing I was thinking about is do I need rotations? Whilst its more accurate, it makes the environment more difficult to interact with. I'm writing this engine to recreate Exile - that was great to play, the physics part was fun and there were no rotations.

  10. #10
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    I'm keeping a close eye on motor physics, by the guy at polygonal labs

    http://lab.polygonal.de/2007/07/16/updates-2/

    Yours looks very nice too. Is this supposed to be an Engine which others will use? or just for exile?
    lather yourself up with soap - soap arcade

  11. #11
    Member
    Join Date
    Aug 2007
    Posts
    61
    I've been doing the same. Also APE (Actionscript Physics Engine) is actually understandable (the source is very well structured).

    Its going to be an engine as well, I'll try and maintain the core as a separate project. The source (not up to date) is actually on that page somewhere.

    If anybody wants to help out, let me know, there is plenty to do. One BIG thig to do is a level editor. I think something quite functional could be created on a week or so....
    Last edited by rje; 08-29-2007 at 05:50 AM.

  12. #12
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    That's as sweet as you like, nice work mate ( And looking at it now, I can see why Exile sprung to mind for Kris ).

    Squize.

  13. #13
    Senior Member random10122's Avatar
    Join Date
    Mar 2002
    Location
    Sheffield, UK
    Posts
    1,747
    Just wanted to say, nice work - i was thinking of doing something similar sometime this year but now i don't have to :-) There are a lot of middleware solutions in the console industry but very few for flash..


    The trick will be to make sure that the documentation is good enough that people will actually use it rather than creating their own..

    fracture2 - the sequel
    fracture - retro shooter
    blog - games, design and the rest

    "2D is a format, not a limitation" -Luis Barriga

  14. #14
    Senior Member charlie_says's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    508
    Ha, that's very nice!

    Although, not flash, there's an exile remake in the offing...

    http://exile.ovine.net

  15. #15
    Member
    Join Date
    Aug 2007
    Posts
    61
    Quote Originally Posted by random10122
    Just wanted to say, nice work - i was thinking of doing something similar sometime this year but now i don't have to :-) There are a lot of middleware solutions in the console industry but very few for flash..


    The trick will be to make sure that the documentation is good enough that people will actually use it rather than creating their own..
    Thanks, hopefully I'll release the latest source this weekend, with some comments. Documentation will be later (without help)....

  16. #16
    Member
    Join Date
    Aug 2007
    Posts
    61
    Quote Originally Posted by charlie_says
    Ha, that's very nice!

    Although, not flash, there's an exile remake in the offing...

    http://exile.ovine.net

    I didn't realize so many people were familiar with Exile... Does the exile in you homepage mean anything? I went there but go nothing but a black screen...

  17. #17
    Senior Member
    Join Date
    Sep 2006
    Posts
    132
    Very nice physics there. I am still yet to even touch AS3 but I can see what the buzz is all about.

    I see that latest update of the flash beta is mentioned on your blog. This blog then, and flash kit, I will be looking out for mention of the latest full version of the next flash player.
    May 2009 - Working on Thorenzitha RPG - episode 7

  18. #18
    Senior Member charlie_says's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    508
    Just to let everyone know.
    The exile remake is now available for download here

  19. #19
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    Well well, excellent work. Wonder if that's still AS3. Seems to run at a good fps even though it's full screen.

  20. #20
    Senior Member charlie_says's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    508
    no, I don't think it was done in Flash, I was really just pointing it out in case anyone was interested.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center