It starts to lag when cpu usage gets too high. Like, around when I fill the paths with little people.
(How do you define lag?) Because for me, I define lag as when the framerates look like they're low (and when the movement looks choppy).
Pretty good engine so far.
Odd that it's not lagging for any of you... maybe that's one of the blessings of working with an underpowered computer!
What I meant by lagging is that every six isometric redraws it would pause for a half-sec, even with the scenario speed up at max. I believe it has something to do with the fact that I was using a try-catch system every redraw, which Java is not good at doing quickly. This happened at as few as 10 people.
Fixed it now, so hopefully that means I can add some extra logic to the little people.
You and your isometric engine :P very nice looking, even if it is a bit fast right now! Can't wait to see where this goes, right now it has kind of a RollerCoaster Tycoon feel to it :)
A new version of this scenario was uploaded on Tue Nov 17 23:26:54 UTC 2009
I use to play roller coaster tycoon all the time!
Really cool! When you scroll though, the edges aren't drawn.
Wouldn't you be able to draw everything that would fit even partially?
I think the reason why the edges arent drawn is because they're objects in the world, (and the x,y of the images can't go out of the world as far as i know.)
I've seen a work around done on another scenario though. I still haven't figured it out though xD.
Hm yeah I noticed, but i think that's the same concept in Zerg's scenario. Even though the object can go off the screen, according to your wandering class (the one in your rts game), I don't think it's able to show itself when it leaves the edge of the world. But in your rts, you covered for this by adding the gray borders. In zerg's case, there's no gray border covering up for the actor going out of the world.
There are 2 ways to do the 'wandering' you guys speak of. One way is to have the gray borders that keep track of objects and add/remove them to the world. The other way is to create a support class to override the get/set position methods so that the limits are removed without any necessary change to code.
I don't think either of those are the problems though (although no source, so :P) I am guessing you are writing images to the background to take care of the workaround you did with pacman? Correct me if i am wrong
No the gray borders in my rts game now are irrelevant. They just serve the purpose as a border for where things such as the buttons to go.
Before I found the wanderer class, the borders were even wider so to hide the objects as they get removed or added.
A problem with the latest idea of using WSAD is that obviously the 'a' key no longer works for the zoom. Might want to change what key you use for that (or have you already and just not updated the topic description?). Otherwise keep up the good work, game is coming along nicely :)
Actually, I wound up starting from scratch. My pacman game was useful in some regards, especially with determining offset constants, but it had a few fundamental limitations. And yes, kenshinakh is correct as to why I cannot draw the tiles partially. I am not writing the images directly to the background for layering purposes. I could theoretically do this, but since you can't draw the objects on it then anyway, there is not much point.
Builderboy, you are almost correct. I am actually using a third method: storing all the isometric objects in an array. Each time it needs to be re-layered(e.g. a person goes to a new tile) it redraws the objects from the array. If it happens that an object would need to be added outside the world, it then just ignores it. Each act cycle then the world tells each object in the array that is not actually visible to run its act cycle.
A new version of this scenario was uploaded on Thu Nov 26 06:42:48 UTC 2009
Very nice! I like placing trash cans, the 3D is so fun!
But i got an error when moving the trash can near the center
java.lang.ArrayIndexOutOfBoundsException: 10
at Park.getObjectsAtTile(Park.java:329)
at Park.act(Park.java:182)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:332)
at greenfoot.core.Simulation.run(Simulation.java:178)
:(
Very nice! I like placing trash cans, the 3D is so fun!
But i got an error when moving the trash can near the center
java.lang.ArrayIndexOutOfBoundsException: 10
at Park.getObjectsAtTile(Park.java:329)
at Park.act(Park.java:182)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:332)
at greenfoot.core.Simulation.run(Simulation.java:178)
:(
Exception here when i try scrolling with wasd:
java.lang.NullPointerException
at Spawn.act(Spawn.java:44)
at Park.runCycle(Park.java:105)
at Park.act(Park.java:131)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:332)
at greenfoot.core.Simulation.run(Simulation.java:178)
A new version of this scenario was uploaded on Thu Dec 10 00:40:22 UTC 2009
2009/11/17
2009/11/17
2009/11/17
2009/11/17
2009/11/17
2009/11/17
2009/11/17
2009/11/17
2009/11/19
2009/11/19
2009/11/19
2009/11/23
2009/11/24
2009/11/24
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/25
2009/11/26
2009/12/4
2009/12/4
2009/12/4
2009/12/4
2009/12/4
2009/12/9
2009/12/10
2009/12/22
2009/12/24
2010/11/7
2012/10/12
2012/10/18