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

#2761
And once you have the minute and hour, you can either:

- create 24 hour hand sprites and 24 minute hand sprites, and raw draw the appropriate one onto the clock face every time the time changes

- use the raw drawing functions and the floating point maths plugin to raw draw triangles representing the hands when the time changes

eg in the room script

int currHour = 0;
int currMinute = 0;

function drawClockHand(int x, int y, int length, int width, int angle)
{
  int fx = int_to_float(x);
  int fy = int_to_float(y);
  int fl = int_to_float(length);
  int fw = int_to_float(width);

  int fa = angle_from_degrees(int_to_float(angle));
  int sina = sin(fa);
  int cosa = cos(fa);

  // the point
  int p1x = fadd(fx, fmul(fl, sina));
  int p1y = fsub(fy, fmul(fl, cosa));

  // the base
  int dx = fadd(fx, fmul(fw, sina));
  int dy = fsub(fy, fmul(fw, cosa));

  int p2x = fadd(fsub(fx, dx), fmul(fw, cosa));
  int p2y = fadd(fsub(fy, dy), fmul(fw, sina));

  int p3x = fsub(fsub(fx, dx), fmul(fw, cosa));
  int p3y = fsub(fsub(fy, dy), fmul(fw, sina));

  RawDrawTriangle(p1x, p1y, p2x, p2y, p3x, p3y);
}

in the room's repeatedly_execute_always:

int nextHour = GetTime(1);
int nextMinute = GetTime(2);

if (nextMinute != currMinute || nextHour != currHour)
{
  currMinute = nextMinute;
  currHour = nextHour;
  RawDrawImage(140, 10, SPRITE_CLOCKWITHNOHANDS);
  int minuteAngle = 6*nextMinute; // 360/60 = 6
  int hourAngle = 15*nextHour; // 360/24 = 15
  // draw an offset shadow
  RawSetColour(0); // black
  drawClockHand(161, 31, 20, 1, minuteAngle);
  drawClockHand(161, 31, 14, 2, hourAngle);
  // draw the hands
  RawSetColour(25620); // gunmetal
  drawClockHand(160, 30, 20, 1, minuteAngle);
  drawClockHand(160, 30, 14, 2, hourAngle);
}

Totally untested but you get the idea.

Cheers,
Steve
#2762
I'd like to see a point and click version, since the AGI interface sucks.
But only if the creators wised up and made one :)
#2763
rtf, You're snorting algae now?

chicken, That does indeed rock! Terrific!
#2764
General Discussion / Re: Isometric builder
Wed 18/08/2004 02:12:01
Darth, that's the easy way to do isometric with pixels.
It doesn't match the technical drawing definition but it looks very similar and more importantly it looks good enough on screen.
#2765
Worst... control... evar!
#2766
They look like thermometers to me.
Maybe you have to turn the thermometers on in the BIOS.

As for the white connector, it's probably for a fan that you don't have - say a fan on the North Bridge, which usually has a big heat sink on it rather than a fan.

Steve

(For your terminology, "protector" = "fuse".)
#2767
General Discussion / Re: Isometric builder
Tue 17/08/2004 19:32:11
That's a pretty cool applet!

Here's an isometric engine I wrote in java last year.
Sometimes it doesn't start up quite right - you might need to click in the window to give keyboard control to the applet. Also, it takes a while to load over the network so give it time.

http://kweepa.com/step/iso/Isometrix.html

You can pick stuff up, push things around, open doors with keys, turn on and off platforms with switches... for example, in the version up there, you have to get the key (the little block on the moving platform) to go through the door on the left.

Not completely relevant here, but what the heck.

There's also an editor but you can't save anything over the network - you'd have to download it locally.

Steve
#2768
Critics' Lounge / Re: Promotional art
Tue 17/08/2004 19:16:54
If this was an adventure game, that parchment would be the first object I'd try to pick up...
#2769
Is there some way of locking a thread or moving it that doesn't leave a thread on the front page?
Locked and moved threads still make a mess of the forum...
#2770
General Discussion / Re: Something weeeeird
Tue 17/08/2004 14:53:09
Gee,
Could it possibly be the base of a column?  :=
Then again, I don't know what a hal is.
#2771
That's probably because LA style text appears above the characters rather than the portraits.
I have no idea how to solve your problem though. Sorry.
#2772
Umm...
Why not use ogg but keep the wavs in a separate directory? When you're *finished* you can make a "deluxe" edition for yourself using wavs.
#2773
I'd slow down the flapping in the movement animation.

Also, now that his arm is animated it looks a bit like his hand has been chopped off.
You could either round off the wrist or draw a three fingered hand on there.

Pretty nice!
#2774
Critics' Lounge / Re: Just some art.
Tue 17/08/2004 01:52:53
Damn!
From your little purple guy I didn't realise you had such talent! Not that he's bad...
A day is pretty good for that, I'd say.

I love the hair and the skirt.
Looks a bit weird having paws like that though...
#2775
Oh - just one more thing...
#2776
There's a new version of AGS_Maya available for download from the plugins page.
This includes some decent documentation and some bug fixes:
Go to the AGS home page, click on Downloads on the left, then scroll down and click on user written plugins.

BUGS FIXED:
ints_to_float() correctly handles negative numbers. Previously ints_to_float(-5,700) would be interpreted as -4.300. Now it is -5.700.
float_to_int() rounds to the nearest value. Previously (despite what I said on another thread) it would round to the nearest value if the number was positive, and just do something stupid if the number was negative. Maybe that was exacerbating your problem, Ghormak?

FUNCTIONS ADDED (see the docs for descriptions):

float_to_int_round_up()
float_to_int_round_down()
angle_from_degrees()
angle_from_radians()
degrees_from_angle()
radians_from_angle()

Steve
#2777
Use MoveCharacterBlocking instead.
You need to use blocking commands - the game will then wait until the character finishes moving before performing any more commands.
#2778
Ghormak, I'll put the info in the zip file this evening.
Good point, I forgot.
(I removed those GetTextExtent calls.)

For your problem, can you post a bit more context? I have been using the plugin extensively with no problems.

GeoffKhan, I'll add some conversion functions - something like
angle_from_degrees()
angle_from_radians()
The second function is a pass through so you don't have to remember whether the trig functions take degrees or radians.
Similarly
degrees_from_angle()
radians_from_angle()

Usage would be, for example
int fx = sin(angle_from_degrees(fy));
or
int fangle = degrees_from_angle(atan2(fy, fx));

Cheers,
Steve
#2779
I hadn't thought of that - I guess because it works after  the first dialog line.
Thanks Chris.

And SilverWiz, cheers for the workaround. It's a bit hacky but it'll work.
#2780
Start a new game using the Default template, and select
Skip speech: Mouse or key (no auto remove)
Then go to Room and in create a script for first time player enters screen as follows:
  StartCutscene(1);
  DisplaySpeech(EGO, "A");
  DisplaySpeech(EGO, "B");
  DisplaySpeech(EGO, "C");
  EndCutscene();
Now save as room1, and test the game.
Press ESC immediately. The game hangs.
However, if you move StartCutscene(1) to after the first dialog line, it works fine - pressing ESC once skips to "B", then pressing it again skips the "B" and "C" at once as expected.

Tested with 2.61 and 2.62b.
Cheers
Steve
SMF spam blocked by CleanTalk