A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: [AS3] missile comando engine

  1. #1
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599

    [AS3] missile comando engine

    http://img404.imageshack.us/my.php?image=mcepu6.swf
    Allright, this is the product of my free time, all as3...
    Inside a browser and scaled looks slower...i hope the final version run faster cos the tiles will not be sprites, but just data
    Please let me know if you find some bug

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    slow indeed- I wonder why. Shouldn´t it be possible runnning this way faster? got 5-10 fps here

  3. #3
    SaphuA SaphuA's Avatar
    Join Date
    Oct 2002
    Location
    The Netherlands
    Posts
    2,182
    Yep.. way too slow.

    You might want to dig a bit more into AS3 and actualy learn it's advantages. Are you even using bitmaps in this game?

  4. #4
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    New version
    http://img487.imageshack.us/my.php?i....swf&width=320
    Anything is cachedAsBitmap
    I may be wrong but maybe the problem is not the speed to calculate things but the speed to draw so much missiles
    I will cut some ones and see what happens, this engine is just to see what is the limit, anyway, the real game will have a lot less missiles

  5. #5
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    If you only have one or two kinds of missiles, it would be in good interest to draw them with the drawing API, it will give you a lot of cpu resources back.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  6. #6
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    I used to think that bitmaps were faster then vectors

  7. #7
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    So, how's the second one running?

  8. #8
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    I dont mean to crit. but wouldn´t be checking box collision (or first bouding box) way faster as the brute- force method it looks like now?- as soon as it hits with a bounding box it already tells AS what particular cells, pixels or shapes to watch out for.

  9. #9
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    Brute force was the first thing i tryed and was slow as hell
    The way the hitTest is now is based on tiles, as you could see in the first post
    I am not a fan of tiles but i have to use them cos they are fast
    Last edited by Cimmerian; 03-12-2007 at 12:04 AM.

  10. #10
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    Allright, latest version!!
    http://img401.imageshack.us/my.php?i....swf&width=320
    Now runs a lot faster, damn tiles shouldn't listen to anything

  11. #11
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    It should run a lot faster if you don't have any missiles firing.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  12. #12
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    so you trashed the tile- thingy?- was wondering anyway why using it here for the collision.
    Tiles seem to be a hype lately they dont fit always. It runs alot faster now. Just an idea about a double region cloud? think of a cloud as a mass with a inner region and an outer region (some thick border)- depending if the missle hits either in the core of the cloud (inner shape) or outer border it destroys different or takes different damage.
    I´d like to see some partciles (either coded or animated) as soon as a missle gets hit to get more action on the screen.

  13. #13
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    ImprisionedPride: i will cut some missiles, in fact, i cant image why i need so much missiles in a real game
    renderhjs: I didnt trash the tiles, its just that in the old way each tile was listening to an "enterFrame" event and now i figure out a way without it
    In this game tiles has nothing to do with the graphics, the only reason i have used them is because, the first thing i ever tryed was making each missile math-circle-hitTest all explosions, and it was slow like hell
    The second thing was draw the explosions on a bitmap data and make each missile see if his his xy pixel, as if they were in that bitmapData, was not white, if not it was a hitTest, and this was slow too
    Now, the 'tiles' way is like this, each missile only has to see if the tile he is in has the property isInFire == true, and when a explosion happens all it does is calculate what are the tiles under that circle and fire them
    Personaly, i would rather that the first ways were not so slow cos i really dont like tiles that much, but i have to admit they are good to solve problems
    I will put more particles and stuff as soon as i get rid of all the code, wich is the real chalenge for me
    See Ya!

  14. #14
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    What I meant was the last link you posted did not fire ANY missiles, unless I'm just stupid I couldn't get it to fire. (using FF?).
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  15. #15
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    this one
    http://img401.imageshack.us/my.php?i....swf&width=320
    ?
    I dont understand, is working for me

  16. #16
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    I just tested in IE, and it works fine. The gods seem to dislike FF, dispite it's awesomeness.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  17. #17
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    Location
    over there
    Posts
    599
    I've tested it in firefox...really dont understand

  18. #18
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    Hmmm... whatever that thing is in the top center does not appear when I test in firefox. I've cleared my cache to ensure it's not an old version, but I still see nothing in ff.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

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