A new version of this scenario was uploaded on Mon Oct 14 15:24:10 UTC 2013
Added the game:
- Civilians, cars, leaders
- Snipe Scope
- Shooting and bullets
A new version of this scenario was uploaded on Mon Oct 14 15:47:28 UTC 2013
More screens and stuff
To create a zoom effect properly with so many actors will unfortunately end up very laggy. Just using 'getIntersectingObjects' on the magnifier, I believe will display the intersectors from top-left to bottom-right by their world coordinates (not by the order placed in the world). I do not know if there are any other ways to solve this except by the following. You would have to use 'getWorld().getObjects(null)' and iterate through that list to see if the list returned by 'getIntersectingObjects' contains each object and paint them in the order found (this would be a time consumer). This still does not do anything for any 'setPaintOrder' you may have set. If you wish to see an example, I can upload one.
One thing I was thinking of here (and something I've thought for my Magnifying glass as well) is have a class or something in the world that looks at all the actors, and adds their picture to the world bakground, and never really adds the actors to the world (or they're really somewhere else). I'm not sure how laggy this would get, and I'd probably need to make a subclass for actor too. The problem here is that there's a lot of actors. It'd probably work fine with a few, but it'd get laggy here. Maybe I can have it specifically change actors within a certain range of the actor? I'll be working on that possibly tonight and later this week.
You can also just draw all the actors that you want to magnify onto a copy of your background image, and magnify that image. That way you still add actors to the world, so collision detection still works.
Oh, and you have to post source code as well at some point (challenge rules).
Also that'd help when I try implementing the Magnifying methods to a large amount of actors, if you really want to do that with your scenario.
@SPower, I stated that the list from getObjects would need be iterated through and only draw the actor if the list from 'getIntersectingObjects' contains that element. Therefore, you are only drawing those actors that are intersecting the magnifying glass. This process is needed so that the intersecting objects can be drawn in the proper order.
Okay, thanks for all the awesome examples guys! I'm work a little on this now and let you know how it goes
A new version of this scenario was uploaded on Tue Oct 15 20:08:15 UTC 2013
- Added a slight zoom, needs a lot of work.
- Made Open Source
- Thanked Danpost for code
- Added more to screens, started making more levels but will release them soone enough
- Re-drew scope to make it more even, but it still needs to be evened more.
- Asked people to chill out because this is a WIP!
- Had some lemonade
I noticed that you are using my XWorld XActor super-classes; but not using them to there full advantage. For details, start a discussion thread and name it something like "On 'Sniper Fi' by joeschmoe". Then indicate here that it was started (I will probably see it anyway; but, it might help for others to see it).
A new version of this scenario was uploaded on Thu Oct 17 00:36:20 UTC 2013
changed paint order
2013/10/14
2013/10/14
2013/10/14
2013/10/14
2013/10/14
2013/10/14
2013/10/14
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15
2013/10/15