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 - GarageGothic

#2041
Quote from: KhrisMUC on Fri 18/05/2007 09:44:331) Use Timers. Instead of moving it 0.5 pixels per game cycle (which is what a speed of 0.5 would do), move it 1 pixel every 2nd cycle. So, set a timer to 2 and if it expires, move the object by one pixel and reset the timer. However, this will look good only for speeds like 1/2, 1/3, aso.

Or do indeed move i 0.5 pixels per game cycle :) Store the current speed and the current position as floats (adding the pixels-per-cycle speed to the position every cycle), then assign the x/y coordinates of the object as a FloatToInt every cycle. That way you can also gradually increase the speed as the car gets closer to the camera.

Edit: If you turn the car into a character instead of an object, it might be enough to use the "adjust walking speed to scaling" option.
#2042
That is correct yes, but then you could use the same characters in multiple rooms.
I think I may have misunderstood your first question about the coordinates - my idea was that once the object reaches the coordinate, it's no longer moving - but the function is already cheking for (object[num].Moving == false). So why not just StopAnimating there, if the objects current view is the walking view?

Edit: By the way, you can have 300 characters in a game, so creating 3 or 4 chicken characters aren't a big deal since you're just assigning the same view to all the characters.
#2043
You're making things difficult for yourself by using an object and not a character for the chicken. But check out the Object.Moving property.
#2044
If it is indeed a commercial font, and not something drawn by the game developers (which is likely), you could try http://www.identifont.com/ which is a great way to find a font you don't know the name of.

Edit: I went through their suggestions, and none of them matched though some are similar. It's also likely that this may be an Amiga font, as Simon the Sorcerer was developed on the Amiga if I recall correctly. If you just need the font for the menu of a game, you may be better off doing it as graphics and tracing over (or if same resolution, cutting pasting) the original font.
#2045
Well, the year is missing from the String, but even with that it doesn't compile. Try:

Code: ags
if (GetGraphicalVariable("ParentsRoom") == 1) {
	DateTime *dt = DateTime.Now;
        String savegamename = String.Format("Autosave from %02d/%02d/%02d at %02d:%02d", dt.DayOfMonth, dt.Month,          dt.Year, dt.Hour, dt.Minute);
	SaveGameSlot(99, savegamename);
}
#2046
Quote from: Radiant on Mon 14/05/2007 10:19:15An easy solution would be to make your GUI taller by adding a transparent rectangle at the top so it doesn't show.

But wouldn't the transparent part of the GUI still be clickable, thus catching any attempt at interacting with the background area behind it?
#2047
Thanks for the explanation SSH. I'm not sure I understand it fully, but it doesn't sound like anything I will need to use anyway.

Slightly off-topic, is there any chance that one of you scripting wizards might write a brief introduction to these undocumented commands and their uses? (or if one exists, please direct me to it). I've previously studied some books on other programming languages (Java and C#, I think) in an attempt to grasp it, but their example scripts were so different from AGS script that it wasn't very helpful.
#2048
You just need to put:

Code: ags
int dest;


at the top of your room script (before the function).
#2049
Being clueless about static, void, protected and all those lovely, undocumented functions that AGS just assumes you know from other programming languages, could you please explain what kind of things this hack could be used for?
#2050
I didn't mean 'more efficient' in terms of framerate, I just meant achieving the same or better effect with simpler means. (I think the way AGS handles background animation doesn't cause framerate drops, but big room files means longer loading time between rooms, and more MB to download - and on machines with less RAM it could mean frequent swapfile access).
#2051
Yes there is:

Code: ags
object[0].Move(mouse.x+GetViewportX(), mouse.y+GetViewportY(),....);

#2052
Quote from: subspark on Mon 07/05/2007 17:07:37To clairy, I've never been able to run any incarnation of the alpha on my PC.

Have you made sure that you do have version 2.0 of the .NET Framework installed?
#2053
I really think that it's a bad idea to encourage use of full-screen animation. It will just lead to lazy implementation and bloated file size. In most cases it would be far more efficient to use objects for the few screen areas that actually animate - which is how TLJ did it by the way. That also allows you to use different framerates/animation lengths for different objects (clouds drift slowly across the sky while the leaves are rustling in the wind), and also creates a much more organic feeling than the cyclic background animations.
#2054
Thanks for the explanation. The gameplay sounds very nice. I had actually forgotten that the game was episodic, and knowing that 100 screens seem a bit less intimidating :)
#2055
Looks great. I think the new, less cutesy style of characters will fit the story much better, and the villain looks very villainous indeed. I just hope that the huge amount of screens won't mean another Al Emmo experience (wandering about tons of screens of  beautiful desert areas with little purpose other than  finding the right cactus).
#2056
I absolutely love the Commodore 64 look of the graphics. The dithering in the Loch Ness shot reminds me of the Last Ninja games. After watching a speedrun of the original Zak on youtube the other day (oh my how much of it I'd forgotten) I'm even more looking forward to this game.
#2057
I'm really very curious how you'll move the characters while the (I assume) prerendered camera pans and not make it look weird - especially as the characters were your original reason not to use a fullscreen object.
#2058
Looks great. But shouldn't the text on the "GO CORPSE" sign be upside down and askew?
#2059
You could make something like this:

Code: ags

int backgroundspeed;
ViewFrame *backgroundviewframe;
int backgroundcounter;
int backgroundplaymode;

function AnimateBackground(int view, int speed, int loop) { //speed is the number of loops each frame will be displayed
   backgroundplaymode = loop; // 0 plays once, 1 keeps looping
   backgroundcounter = 0;
   backgroundspeed = speed;
   backgroundviewframe = Game.GetViewFrame(view, 0, 0);
   RawDrawImage(0, 0,backgroundviewframe.Graphic);
   }

function StopAnimateBackground() {
   backgroundspeed = 0;
   }


Code: ags

function repeatedly_execute_always() {
  if ((backgroundspeed > 0) && (IsGamePaused() == 0)) {
     backgroundcounter++;
     if (backgroundcounter >= backgroundspeed) {
        int backgroundcurrentframe = backgroundviewframe.Frame;
	backgroundcurrentframe++;
	int backgroundcurrentloop = backgroundviewframe.Loop;
	if (backgroundcurrentframe >= Game.GetFrameCountForLoop(backgroundviewframe.View,backgroundviewframe.Loop)) {
	   backgroundcurrentframe = 0;
	   backgroundcurrentloop++;
           if (backgroundcurrentloop >= Game.GetLoopCountForView(backgroundviewframe.View)) {
              backgroundcurrentloop = 0;
              if (backgroundplaymode == 0) {
                 backgroundspeed = 0;
                 return;
                 }
              }
	   }
        backgroundviewframe = Game.GetViewFrame(backgroundviewframe.View, backgroundcurrentloop, backgroundcurrentframe);
	RawDrawImage(0, 0, backgroundviewframe.Graphic);
	backgroundcounter = 0;
        }
     }
  }


EDIT: Now the code will proceed to use the next Loop in the View allowing for a huge number of background frames.

Most likely you don't actually need to draw the entire screen due to GUI's or letterbox bars at the top and bottom. In that case you can cut down the sprites to the actual background area to save memory and speed things up, and then just change the (0,0) in the RawDraw command to the right coordinates.

Probably it would be useful to add a "reverse" parameter too as well as a "blocking" parameter (only for non-looping mode of course).
#2060
Can't you just RawDraw sprites of the animation frames onto the background?
SMF spam blocked by CleanTalk