Oh right on. I was editing my post while you guys were responding. Har har. Anyway, no idea if it would still work. But at least Calin's works.
Gotta go! Pig roast time.
Gotta go! Pig roast time.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
function room_Load()
{
oS1.X=0;
oS2.X=800;
}
function room_RepExec()
{
oS1.X-=5;
oS2.X-=5;
if (oS1.X<=-800) oS1.X=oS2.X+800;
if (oS2.X<=-800) oS2.X=oS1.X+800;
}
timer = 800;
if (timer>0)
{
timer--;
if (timer==0) doWhatever;
}
function repeatedly_execute()
{
if (Game.DoOnceOnly("TESTING"))
{
PauseGame();
PauseGame();
UnPauseGame();
}
}
if (!IsGamePaused()) PauseGame();
Quote
I fixed it by only letting the game run the function if the game isn't already paused.
bool spaceIsHeld;
function repeatedly_execute_always()
{
if (!spaceIsHeld && IsKeyPressed(eKeySpace))
{
if (!IsGamePaused())
{
PauseGame();
SetSkipSpeech(2); //this is to prevent the glitch with the mouse click skipping text during pausegame
}
else
{
UnPauseGame();
SetSkipSpeech(0); //this is to prevent the glitch with the mouse click skipping text during pausegame
}
spaceIsHeld=true;
}
else if (!IsKeyPressed(eKeySpace)) spaceIsHeld=false;
}
@S // Dialog startup entry point
man: I just saw some crazy thing over there.
crazyThingVisible = true;
return
function room_Load()
{
crazyObject.Visible = crazyThingVisible;
}
Quote from: Arj0n on Mon 12/07/2010 08:58:13I haven't checked this program out yet. I'm not sure what the 'guy-backgrounds' are, but I'm curious, instead of using room backgrounds why don't you just import them into the sprite manager?
Darn, 261 x re-importing room-backgrounds....
I guess I also need to re-import the guy-backgrounds?
Quote from: Monsieur OUXX on Mon 12/07/2010 08:56:48
TEST 4:Code: ags test = new DynamicSprite[1]; test[0] = DynamicSprite.CreateFromExistingSprite(0); test = new DynamicSprite[1]; test[0] = DynamicSprite.CreateFromExistingSprite(0);
I believe you should see approx. the same space usage as in TEST 3.
You should see:
Space(TEST3) = space(TEST1) + 2*sprite size
Quote from: Vince Twelve on Sun 11/07/2010 03:24:23If you're scaling them every game loop, I'd say that would definitely be one reason it could be so slow.
One thing different between the front layer and the other nine, is that the deeper layers all use scaled sprites while the front uses unscaled. Might that slow it way down?
test = new DynamicSprite[1];
test[0] = DynamicSprite.CreateFromExistingSprite(0);
test = new DynamicSprite[1];
test[0] = DynamicSprite.CreateFromExistingSprite(0);
Quote from: Gilbet V7000a on Fri 09/07/2010 13:08:28But the manual itself states:
However, from what I have read in the manual, it seems that a DynamicSprite won't be destroyed automatically when no pointer is pointing at it any more
so I'd expect the above codes would work as intended but would also cause a memory leak at the same time.
Quote
If the DynamicSprite instance is released from memory (ie. there is no longer a DynamicSprite* variable pointing to it), then the sprite will also be removed from memory.
int i;
while (i<30000)
{
test = DynamicSprite.CreateFromExistingSprite(0);
i++;
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.564 seconds with 15 queries.