MODULE: Panorama v1.6

Started by Kweepa, Sat 29/07/2006 19:14:25

Previous topic - Next topic

Kweepa

Panorama module
for AGS v3.1

Creates a 360 degree rotating room from four rendered images stitched together.


(Image courtesy of LimpingFish)
Produces:


Here's a demo (of v1.2, not v1.6) (1.7MB):
http://www.kweepa.com/step/ags/tech/PanoramaDemo.zip
Mirror (of v1.1, not v1.6):
http://www.americangirlscouts.org/agsuploads/SteveMcCrea/PanoramaDemo.zip

Here's the module (5.1KB):
http://www.kweepa.com/step/ags/tech/Panorama16.zip

And here's a complete game: Heartland Deluxe, by LimpingFish:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=29162.0

New for v1.1
* added a manual
* added support for objects and characters (they behave like sprites)
* updated the demo
* covered up the little streaky triangle at the bottom with a GUI

New for v1.2
* added cursor mappings so you can animate cursors over hotspots and objects

New for v1.3
* added support for 800x600
* this has temporarily made the module require 2.72 final

New for v1.4
* added support for Cylindrical panoramas

New for v1.5
* added support for "strict" (enforce object based) scripting
* fixed crash bug when using 640x480 and new high res coordinates in script

New for v1.6
* animated backgrounds
* requires AGS 3.1
Still waiting for Purity of the Surf II

R4L

WOW!  :D

This is fantastic Steve!

LimpingFish

#2
Excellent stuff indeed. ;D

I just imported my finished background into it and it works like a charm.
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

TheMagician

WOW Steve! Great Stuff!  :o  :o

This reminds me of "Zork Grand Inquisitor"  :D

By the way in your Demo-Game there is a warning-log-file generated which says that many dynamic sprites haven't been deleted.

I haven't looked into the module yet, but can you use animated backgrounds? And is there any chance at all to implement a 360° panorama?
Are objects distorted as well - or how do you implement stuff like picking up an item?

Anyway, this is great! Much more than I could do and something I've always been looking for.
Many thanks,
Stefan

Kweepa

Yeah, the warnings are there because there's no easy way to hook into QuitGame(1) to delete the sprites. It's not a problem though. If you wanted to get rid of them you'd have to set up your own Quit GUI and call Panorama.Destroy() before QuitGame(0).

Objects don't get rendered at all. If you wanted to do that you'd have to RawDraw them to the background and then call Panorama.CreateFromBackground() again. Ditto for picking up objects - draw the background over the object and CreateFromBackground. For animated backgrounds, you'd have to repeatedly call that function passing different background frames.

Cheers!
Still waiting for Purity of the Surf II

monkey0506

This is a-freaking-mazing Steve. Do you realize what you've done? You have just made AGS the undisputably best game-making software ever. Thank you. Please will your brain to me when you die.

Kweepa

Quote from: monkey_05_06 on Sun 30/07/2006 04:26:28
You have just made AGS the undisputably best game-making software ever.
Nah, Chris did that when he added modules. They're such fun to write!
Still waiting for Purity of the Surf II

Akumayo

Wow, Steve, just tried the demo.  That's amazing.  One could make games with better handling than Myst with this module.
"Power is not a means - it is an end."

GarageGothic

#8
First the 3D plugin, then the lake module, and now this amazing feat! Steve, you're the master of background manipulation. I quite honestly think that the background in the module looks just as good as those in Post Mortem.

Am I right in assuming that the effect would still look quite rough in 640x480 resolution since RawDraw only works with 320x200 coordinates? It would of course be possible to do it per horizontal pixel with a bit of resizing in-between the copying, deformation and drawing, but it would most probably be very slow and doubling the amount of dynamic sprites needed.
Instead I was wondering if you have any plans to add a Myst-mode to the 3D plugin, using the full 3D rendering to create a panorama textured SkyBox room with the player in the middle? As it is now, it's perfectly do-able by scripting with sprites as textures. But how much work do you think it would take to use a background for texture like here, and add hotspots through the editor? A six surface room does add the problem of floor/ceiling though, and how they would be placed on the background frame.

I should remark that I don't intend to use such a feature myself - I wouldn't even know how to make the background renders - I'm merely curious, since I'm doing a lot of RawDraw based scripting myself and know about the limitations and my own attempts to overcome them.

So many people have been asking about Myst-like panoramas (or later games in the series rather), and now you've come a very long way in fulfilling that wish. You're making a lot of people happy with this. Awesome work!

Edit:

I just read the manual and saw that the module was hardcoded to 320x240, so that answers part of the question I guess.

Kweepa

Quote from: GarageGothic on Sun 30/07/2006 23:39:44
I quite honestly think that the background in the module looks just as good as those in Post Mortem.
You have LimpingFish to thank for that! His renderings are great.

Quote
Am I right in assuming that the effect would still look quite rough in 640x480 resolution since RawDraw only works with 320x200 coordinates?
Probably. I think it would look a bit better, but I hate using 640x480 because I never remember which set of coordinates to use with which function calls etc.

Quote
[...full 3d...]
But how much work do you think it would take to use a background for texture like here, and add hotspots through the editor? A six surface room does add the problem of floor/ceiling though, and how they would be placed on the background frame.
It would actually be pretty easy I think. Good idea - I might have a look at that next weekend. Probably arranging the images 3x2 would be best.
Still waiting for Purity of the Surf II

Fabiano

very good indeed!
congratz Steve for another awesome module.

CSI Anyone?
Yeah, yeah, It happens. A lot.

jasonjkay

This is really great, only problem is getting the image to use with it. Anyway I've added it to my site.
http://www.americangirlscouts.org/agsresources/ - Mods, plugins and templates.

Ali

This is really great Steve! Like Garage Gothic I was hoping you might produce a streamlined skybox-only version of AGS3D. This seems much faster and appears to clear up the diffculties that objects and hotpots would pose there. LimpingFish's renders look lovely, they really demonstrate the module's potential.

Inevitably, I must look a gift horse in the mouth and ask about 640x480 and looking up and down. I don't understand RawDraw as well as GarageGothic, is hi-res something you might consider for the future of the module? I have no idea if the method you're using would allow for looking up and down, but is that something that might be possible?

I think this has the potential to be useful in all sorts of games. I think it could work really well for one-off puzzles too. Thanks!

TheMagician

I agree with GarageGothic and Ali.
The addition of looking up and down would be very great!
Finally - after 5 years of searching - I would have a Skybox-Node-Engine  :D

By the way: when turning around in the demo room I experience some heavy horizonal tearing on the screen.
Is that caused by AGS and the way the module works or is my graphics card not good/fast enough? (GeForce 4 Ti4200)

GarageGothic

#14
You can try setting (System.VSync = true), in theory that should reduce the tearing (which happens because the screen is not redrawn all at one time). Alternately, if you're using an CRT monitor, you can check "Use 85Hz display" in the demo's winsetup.exe, I think that could help a bit as well.

Kweepa

#15
Quote from: Ali on Thu 03/08/2006 18:14:55
Inevitably, I must look a gift horse in the mouth and ask about 640x480 and looking up and down.
640x480 is possible. It wouldn't be as relatively smooth as 320x240 (2 pixel movement and more stairstepping) and of course the source image would be huge.
Looking up and down as well as left and right is impossible for the module using the current tech. A location could theoretically have look up and down instead of left and right. I suspect that full 3d would be too slow in scripting and is best left to a plugin, but I'm tempted to give it a go.

[EDIT] Yeah, the theoretical max for a module on my PC (2GHz) is a window about 100x100 pixels. So it has to be the plugin route.

Quote from: TheMagician
...tearing...
Yes, this happens because AGS's page flip is not synced to the screen refresh. I added GarageGothic's (System.VSync = true) to the demo (and reuploaded it) and it cleared the problem right up. Thanks, GG!
Still waiting for Purity of the Surf II

LimpingFish

Didn't notice this before, but setting the cursor to animate, when over a hotspot or object, doesn't seem to work properly with the Panorama module.

Any ideas? :)
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Kweepa

#17
None. ;D
I'll have a look though.

[EDIT]
Ah yes, of course. You won't be able to use that feature as-is.
However, I've updated the module to v1.2. I added
Code: ags

Panorama.SetCursorMapping(mouseMode, nonAnimatedCursor, animatedCursor);

See the txt file for (slightly) more info.
http://www.steporg.com/step/ags/tech/Panorama12.zip

PS: LimpingFish informs me that the module works fine at 640x480.
Still waiting for Purity of the Surf II

LimpingFish

Yay! Cursors working fine now.

Excellent work, Steve. ;D
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Helm

Steve, I want to kiss you. I am going to be using this for the next OROW game I'll be making with Gore. If there was any chance of this going 640x480 (or 800x600, the background size for an one-room game can deal with hugeness) it would be even better. So wonderful to have this.

Thank you for coding this, again.
WINTERKILL

SMF spam blocked by CleanTalk