Setting priority of attributes and actors
tekkendp
Member Posts: 49
Running 0.83 now - after a fews hours work, it does seem to be less crash happy (but the slow down is still there - but hey baby steps).
Anyway, I have had to big changes to the way my game pauses, as it looks like the preserve scene function has now been removed.
I'm now pausing by using a game.paused boolean attribute, with a rule for all actors that spawn, animate or move. The change attribute works like this :-
if paused pressed
change attribute game.paused from 0 to (game.paused+1)%2
(had to do it this way as just assigning 0 to 1 didn't work too well)
However, the above works somewhat randomly (sometimes one click works, sometimes it takes 3 or 4 clicks). So, is it possible to give the priority to specific attributes or actors, as I think this may help me out.
Cheers (hope the above isn't as clear as mud)
Anyway, I have had to big changes to the way my game pauses, as it looks like the preserve scene function has now been removed.
I'm now pausing by using a game.paused boolean attribute, with a rule for all actors that spawn, animate or move. The change attribute works like this :-
if paused pressed
change attribute game.paused from 0 to (game.paused+1)%2
(had to do it this way as just assigning 0 to 1 didn't work too well)
However, the above works somewhat randomly (sometimes one click works, sometimes it takes 3 or 4 clicks). So, is it possible to give the priority to specific attributes or actors, as I think this may help me out.
Cheers (hope the above isn't as clear as mud)
Comments
All my actors (moveable ones) attributes are encapsulated in a rule that checks if paused is pressed. So before any action associated with the actor is performed, the check is done.
Not sure how I could include a timer into my pause system, as it more of reactive function, rather than a preplanned on. Reactive in that you don't know when the user is going to hit the pause button.
This is why I asked the question. If we could control what attributes or elements get higher priority, then it would be easier to fine tune the game's performance to suit your needs.
Still scratching my head on this one.
Not perfect though - as there are times that you have to hit the virtual pause button a couple of times to get a response), but it 's a step forward - lost some smoothness though.
So thanks again.