ARGH Camera issues

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

ARGH Camera issues

Post by JSH357 »

In earlier versions of the OHR, I could "shake the camera" up and down by using pan camera on a 16x20 screen. I'm not able to do this anymore, and it both ruins one of the visual effects in my old games and is keeping me from getting a scene to work in my latest one.

Are there any workarounds?

This is the script I'm trying to use:

Code: Select all

script, shake, begin
pancamera(up,1,20),waitforcamera
pancamera(down,2,20),waitforcamera
pancamera(up,2,20),waitforcamera
pancamera(down,1,20),waitforcamera
end
I don't want to have to put the hero in the center of the screen and use a wrapped edge setting because that would involve a lot of changes I wouldn't be happy about making, but it might be the only way. Any advice?
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

OK, I found a lame solution: adding an extra tile of height to the screen allows the panning to occur. It still doesn't look as cool, though.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

So this worked on an older version, but does not work now?

What is the edge type of this map? Your original comments make it clear that it is not a wrapping map, but I'm not sure which of the other two types this is.

This could be a side-effect of a bugfix relating to map wrapping.
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

It's set to Crop.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Hmmm. If the script you posed above was run with the camera in the top-left corner of a "crop" map, I would expect it to quake one tile down, but never to quake up.

To confirm that I understand this correctly:

In an old version, it used to quake up 1, down 2, up 2, down 1, showing a black row of tiles when it quaked up, right?

And in the current version it does absolutely nothing?

What I would expect is for it to hesitate, then go down 1, up 1, hesitate, down 1 up 1.
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

It used to wrap around to the bottom tiles when going up, but now it does nothing (until I add a new set of tiles).
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

JSH357 wrote:It used to wrap around to the bottom tiles when going up, but now it does nothing (until I add a new set of tiles).
Hmmmm.... So this does definitely seem to have been caused by a bugfix to crop mode. (crop mode should always crop the camera position, even if you move the camera with scripting)

But I am still puzzled why it does nothing at all. Is the hero higher than the middle of the screen?
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

The hero is at position 0,0
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Only One In All
Metal Slime
Posts: 356
Joined: Tue Oct 16, 2007 5:56 am
Contact:

Post by Only One In All »

Hey JSH, do you mean 16x10 (the minimum map size) or 16x20? I have it at 16x10 and I wanted the camera to pan but found it doesn't do it. If this was also your issue, I want to side with you that I hope this can be made to happen again with the engine.
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

Yes. I meant 16x10.

... Wow, no wonder James was confused.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Ah, I understand better now.

So what you need to do is to temporarily make the camera stop following the hero, and then change the map edge mode to anything other than "crop"

Code: Select all

put camera(0,0)
set map edge mode(default)
#
# quake all here
#
set map edge mode(crop)
camera follows hero
Post Reply