WTF. Is my level too big?

8x8n88x8n8 Member Posts: 81
edited November -1 in Working with GS (Mac)
So I completed the first level of my game, and now certain actors are crapping out on me, i.e. not working. I have multiple instances of the same enemy actor throughout the level, and when I test the game they act like they have no rules or behaviors. The player can just move through them, all collision behavior is gone etc. I've tried replacing them with new instances, and when I double click on each individual instance, all the rules and behaviors are there. But when I play test no dice.

The only thing I can think of is that my level is 4000x5000 and has hundreds of actors. Could this be pushing GS too hard?

Comments

  • JGary321JGary321 Member Posts: 1,246
    You have hundreds of actors in one scene???? Wow, yea that might be a problem. Hope you didn't plan on releasing anything like that for the iPhone =) You would kill your poor device! First degree murder.

    BTW... If you are wanting to port to the iPhone, remember you cannot have ANY images over 1024 x 1024. So if you have one BG image that is 4000 x 5000 break it up into multiple pieces. Just wasn't sure if you knew.
  • 8x8n88x8n8 Member Posts: 81
    Well for now I'm just building a version for Web play, since I don't have an iPhone to playtest on.

    My scene is 4000x5000, all the images I'm using are rather small. It's a platform jumper game, so yes each level has hundreds of platforms, enemies, doodads etc. I suppose I'll have to break each scene up into multiple smaller scenes. I'm not sure of a better way to keep the game size down.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have a game with scenes that size and hundreds of actors and it works pretty well. How many of the actors are movable? When I had a bunch of movable actors it was a major problem. With only a handful of movable actors I was able to have hundreds of non-movable actors no problem.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Yeah I messed around with a platform idea that was 320 x 15,000. It did ok on 3 gs. For me the key was to use spawners and have enemies only come alive when I was near. Also have them destroyed or stop moving when off screen as well. It can be done. Gs is capable. I think the trick is just to bring stuff to you rather than goto it. If you build with that in Mind things go smoother. At least for me anywyas.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I used magnitude so that animations, particles, and movement only happen when objects are in view. You can also make an invisible actor the size of the screen and constrain it to your main player's X and Y. Then use this as a "trigger" - in the other moving actors have a rule wrapped around all movement behaviors saying "when overlaps with invisible trigger actor"
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    another idea. I am working ona game with moving rocks and boulders. I wanted them all throughout the level but with so many moving objects that collide with each other it was an instant crash on the iphone. So I ended up having 5 moving rocks that when they go off screen their X and Y position is changed to on front of the main player just off screen. So it feels like their are rocks all throughout the level, but really it is the same 5 rocks being "recycled." This is probably better than spawning and destroying as spawning drains memory.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I have been having a problem where I have a rule "when X key is down" and everything works fine. Then I make a new level and it's not working so I check the instance and it now says "when mouse button is down" for no reason! So it may just be some weird bug like that and not your fault!
  • JGary321JGary321 Member Posts: 1,246
    I have seen rules literally change before. Like right in front of my eyes, so I can verify what you are saying scitunes.
  • patm1982patm1982 Member Posts: 50
    I did something similar to scitunes, but for firing bullets. re-spawning every bullet was killing iphone performance, so I set it up so there is a series of bullets offscreen, and when you fire it just changes their location & adds velocity. I timed it so that the bullets continue to cycle through as long as your holding down the fire button. I never thought of doing it for enemies, but thats a great idea.
  • patm1982patm1982 Member Posts: 50
    another tip that helped performance, if enemies are constantly checking the players location to know when to attack, you can add a timer so they only check once a second instead of constantly. Also make sure your using 'constrain attribute' only where you need them. A lot of times 'change attribute' will do the trick.

    I'm curious what the balance between having actors already in the scene vs spawning is. At what point is it better to spawn actors instead of just having tons of them (inactive) in the scene?
Sign In or Register to comment.