Menu

Show posts

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

Messages - Snake Blisken

#1
Beginners' Technical Questions / Re: Dialogs
Mon 05/12/2005 05:26:01
Wow, I knew it had to be something really easy. Thanks for that.  I have seen that option before, but something about the way it is written just didn't make it click with me.

#2
How do I get a dialog to show up in a text box instead of at the bottom of the screen? I know this must be a pretty common question, but I can't seem to find anything about it. Thanks for any help you can provide.
#3
Thanks strazer for all the advice. I think I changed everything you suggested. And not because I am a follower, but because they were really good suggestions! :)

QuoteSpinCombo.SpinLeft and .SpinRight would spin the lock and then return true if the combination was solved and false if not.

Well, the combination can't be solved by turning left, so you only need to test on a right spin. Thanks again for all of your help. Please let me know if there is anything else I can do to make this better.
#4
Please take a look at my first module and let me know what you think about it. Test it to death if you feel up to it.

It is a spinning combination lock, like you might find on a school or gym locker. Any helpful advice is greatly appreciated, no matter how small you might think it is.

2 Dec 2005: v1.01   Removed combination configuration from InitCombo. You
//            will now need to call SetCombo(). Also removed Completion().
//            You will now need to test SpinRight to see if the correct
//            combo has been called. Renamed InitCombo to InitLock and
//            changed the module and struct from SpinCombo to SpinLock.
//            Removed all variables from the struct and put them in the
//            main module.
//            Many thanks to strazer for all the suggestions!

Download here (Requires AGS v2.71!)

Please let me know in advance if you decide to mirror the file somewhere.

Thanks
Snake Blisken
#6
The manual mentions that object oriented type stuff is possible, and looking at the Zoom module created by SSH, I can see where he created what appears to be an instance of the class Zoom. He called it zzz.

Where is the class Zoom defined? Anyone care to post a small class definition I can peek at to get the idea of how they are structured in AGS? Any other tips, help, anything you have to say on the subject is greatly appreciated.

Note that I am pretty familiar with classes and instances in C++.
#7
Quote from: Scummbuddy on Wed 30/11/2005 06:54:31
My apologies for not being "with it". Not "hip". Not "cool".

Guess I've got some reading to do.

LOL. Don't feel like the lone ranger.
#8
Quote from: strazer on Wed 30/11/2005 05:52:38
No, filename.gue (in contrast to filename.gui which is a whole set of GUIs) is a single GUI that you can import by selecting the GUIs pane, then choosing from the menu "GUI" -> "Import another GUI...". I think you need AGS v2.7.

That is what I was looking for. Thanks so much for the quick reply!:)
#9
I have searched the manual, knowledge base, and the help in the AGS editor, and I can not find anything to do with importing a GUE. How exactly does one import a GUE?
#10
Quote from: SSH on Wed 23/11/2005 13:12:06
Gah! I'm trying to remember my trigonometry to work out how the steps should change, but its all gone. This is what happens 14 years after leaving school...

In my star wars scroller I used a reciprocal of a loop counter to calculate the size as things scrolled away. Another way to do it is to utilise the walkable area scaling and speed scaling and make your house a character...

Actually, I looked at the walkable area scaling when I first started, but I wasn't sure how to work it into what I am trying to do. I will put some more thought into this possibility as well. BTW, what is speed scaling? Thanks for all the help and advice. See ya after thanksgiving!

EDIT: At least you took trig! :) If I knew then that I would fall in love with programming, I would have done a better job in math class!
#11
Quote from: Snake Blisken on Wed 23/11/2005 12:43:13
Quote from: SSH on Wed 23/11/2005 12:39:48
What you need to do to keep the speed of change is to increase the amount you change x, y, w and h by each game cycle. In fact, I'll maybe go and make a module to do this...

But wouldn't that make the end of the animation seem choppy because it would be taking larger "steps" at each loop?

This looks like it might work. I don't have much time right now to tweak it, but initial tests look promising. Thanks for the advice!

EDIT: I have updated the zip file. It still needs some tweaking, but this solution appears to be much better. Here is the modified script. Maybe after thanksgiving I will clean it up some and post the modified script.

mouse.Visible = false;

StartCutscene(eSkipAnyKeyOrMouseClick);

int counter = 0;
int x = 0;
int y = 0;
int w = 320;
int h = 240;

while(counter < 30)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 2,w, h);
   
   x = x - 4;
   y = y - 3;
   w = w + 8;
   h = h + 6;
   
   Wait(2);
}

counter = 0;
//x = 0;
//y = 0;
//w = 320;
//h = 240;

while(counter < 30)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 2,w, h);
   
   x = x - 8;
   y = y - 6;
   w = w + 16;
   h = h + 12;
   
   Wait(2);
}Ã,  Ã, 

counter = 0;
//x = 0;
//y = 0;
//w = 320;
//h = 240;

while(counter < 15)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 2,w, h);
   
   x = x - 32;
   y = y - 24;
   w = w + 64;
   h = h + 48;
   
   Wait(2);
}

while(counter < 10)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 2,w, h);
   
   x = x - 64;
   y = y - 48;
   w = w + 128;
   h = h + 96;
   
   Wait(2);
}Ã,  Ã, 

while(counter < 5)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 2,w, h);
   
   x = x - 128;
   y = y - 96;
   w = w + 256;
   h = h + 192;
   
   Wait(2);
}Ã,  Ã, 

Wait(40);
EndCutscene();

mouse.Visible = true;
player.ChangeRoom(2, 85, 195);Ã,  Ã, 
#12
Quote from: SSH on Wed 23/11/2005 12:39:48
What you need to do to keep the speed of change is to increase the amount you change x, y, w and h by each game cycle. In fact, I'll maybe go and make a module to do this...

But wouldn't that make the end of the animation seem choppy because it would be taking larger "steps" at each loop?
#13
This probably isn't the best way to do this, and I am completly open to suggestions. Anyway, I wanted to be able to slowly zoom in on a house and appear as if you were floating closer and closer and then through the window. But I needed the window to stay in the center of screen.Ã,  (Well, it would be neat to give it a more "floating" effect, and maybe one day I will implement that as well. For right now, though, it it is MUCH easier to just keep the center of the window in the center of the screen)

At first, I simply used RawDrawImageResized() in a loop to slowly increase the size of the image. I also had to change the x,y cordinates so that everything would line up right. This worked ok, but the closer you got to the window, the slower the animation got. So, I made a couple more graphics to place in between so that at certain points, it would start with a new image instead of trying to enlarge one image.

You can see the animation in action here http://projects.iannarelli.com/AGS/Ã,  Please make sure you run winsetup and check 640X480, so the graphics will look ok. (Well, you'll have to forgive the programmer graphics. But they do actually look worse in 320X240)

Here is the script. All constructive comments are very welcome.

mouse.Visible = false;

StartCutscene(eSkipAnyKeyOrMouseClick);

int counter = 0;
int x = 0;
int y = 0;
int w = 320;
int h = 240;

while(counter < 32)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 2,w, h);
   
   x = x - 4;
   y = y - 3;
   w = w + 8;
   h = h + 6;
   
   Wait(2);
}

counter = 0;
x = 0;
y = 0;
w = 320;
h = 240;

while(counter < 38)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 3,w, h);
   
   x = x - 4;
   y = y - 3;
   w = w + 8;
   h = h + 6;
   
   Wait(2);
}Ã,  Ã, 

counter = 0;
x = 0;
y = 0;
w = 320;
h = 240;

while(counter < 50)
{
Ã,  counter ++;
Ã,  Ã, 
   RawDrawImageResized(x, y, 6,w, h);
   
   x = x - 4;
   y = y - 3;
   w = w + 8;
   h = h + 6;
   
   Wait(2);
}Ã, 

Wait(40);
EndCutscene();

mouse.Visible = true;
player.ChangeRoom(2, 85, 195);Ã, 

Thanks
Snake Blisken
#14
Well, thanks to the "Big List Of Paint Programs" I found Ultimate Paint. Something didn't go exactly right in the install, but everything seems to be working ok so far. SWEET!!!

Thanks so much for all your help!
#15
Wow, thanks for the quick replies, and the links to the tracker. I don't know if this solution is going to work for me, however, because I am limited in what graphics programs I can run on this computer. I can't "install" any software due to permissions. Luckily, AGS does not need to "install". And paint does not have a scale feature.

Ahh, well, thanks anyway. At least I know now what I need to be able to do. Now, I just have to find a way to do it....

Peace
#16
So long as I use 320X200 or 320X240 resolution, I can import walkable areas, hot spots, etc from a bitmap file created in paint. It seems to work with images of any size. However, if I use the same background image and the same mask images in any other resolution, I get "Error: mask does not have same size as background scene. Must be 320X200"

If I create the game with 320X240 resolution, import my background and walkable areas, then change the resolution to 640X480, it works ok, but then then the room looks HUGE compared to the character.

I want to be able to create my background image in paint with diminsions of 640X480, then use that image to create the walkable areas, hot spots, etc. I would then like to import that image and the masks into a game with a resolution of 640X480. I like having the zoom option and other features in paint.

I am using AGS v2.70 on Windows 2000 professional. Any help is greatly appreciated.
SMF spam blocked by CleanTalk