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

#441
alright, i was thinking about taylor approximations...that wont be a problem then.

the only thing I'm still not sure about then is how to do the animation without freezing the game.Ã,  I need to put in a wait command between each re-draw, but the Wait(x) command puts up the hourglass. How can I allow this animation to happen without interrupting gameplay?Ã, 

edit - I think SetTimer is my answer
#442
Quotetheta(t) = theta(t-1) + s(t-1) * timestep
s(t) = s(t-1) + FUNCTION(s, theta) * timestep

where FUNCTION(s, theta) = ds/dt = F*sin(theta) - R*s

It looks like your definition of s(t) uses s(t) as an input parameter, so I don't really see how that works..

I think maybe the direct equation would be easier,

Quote
Quotei know that the equation describing its motion would be

theta(t) = Ae^(-Bt)cos(Ct) + D

where D = the angle that represents north

And B is the pendulum frequency, A is its amplitude. That is a correct result in the small-angle approximation. If your pendulum's amplitude is too large, then theta(t) is more complex. To put it in the case of a compass, if you only turn a few degrees at a time this works. In practice it's probably close enough even for large angles.

If you rotate past 90 degrees, however, the needle will have a different behavior: it will start out slow, accelerate more and more until reaching 90 degrees, and keep accelerating (with friction this may actually be decelerating) but slower.

Well, it's not really right...but I have fixed it like this:

theta_n = theta north
theta_s = theta start

theta(t) = int((theta_n - theta_s)*e^(-w*t)*cos((theta_n - theta_s)*t) + theta_n)

then I can draw 360 sprites and store them in slot numbers 0-360 in the sprite manager...and use SetObjectGraphic and that should work out fine..

However...still need a way to get cos(angle)
#443
Quote1. That would be basic math. You can do vectors without problems in AGS. If you're thinking of implementing, say, Asteroids (tm), that would certainly be possible.

I wouldn't really call differential equations basic math, but I suppose if you are an engineering whiz you could say that if you wanted to...

and it doesn't seem to me that AGS can really "do math" without problems when you consider that it does not support any math functions, and you need to use roundabouts and approximations for them all.

Quote2. That's not so hard, simply create an array of sprite numbers, and use SetObjectGraphic. Doesn't work with characters, but if need be you can reserve object #0 in each room.

Ah, ok....so in layman's terms, you're suggesting that I write the function for theta(t) which will choose the correct sprite number, and then put it in a loop with a delay in the loop using a nested counting loop to wait some number of milliseconds, and run that loop which updates the sprite image until theta(t) = theta(t-1).   got it.

Quoteand use the file read/write functions (I'd have to look up the exact syntax) to read the sin/cos data from said file.
Voila! You'd have sin[8] and cos[44] etc. to use as a pseudo-function.

The AGS file read seems to only grab the entire contents and read it into a string buffer.  In which case, might as well just write the entire contents into a defined string in AGS, right?  But isn't there a 255 cap on AGS strings?  Also, wouldn't I need to then define the string something lke this for example:

"sin1_.02 sin2_.03 sin3_.05" etc

then the function for sin(x) would be more like
searchstr = "sin" + x + "_";

then use StrContains to find the location of this index...

then use StrGetCharAt to write a function that could grab a substring out of a string...

and use this function to grab the next 3 digits after the index found, and then turn that into an int...

but this is all assuming that the entire string size fits in the allotted memory

or did you have something simpler in mind?

Quotedtheta/dt = s
ds/dt = F*sin(theta) - R*s

why not write it all in terms of theta?  there's only 1 equation here...I'm not really sure how you got it though

never tried writing a differential equation as a recursive one..

Quotetheta(1) = theta(0) + s(0) * timestep

Is this what you mean?

theta(t) = theta(t-1) + s(t-1) * timestep

I think it would be easier to loop until theta(t) = theta(t-1)

but how would s (dtheta/dt) work in this recursive equation?

sorry for not understanding right away...its been a while since I took this stuff

I'm not sure if this is right...

i know that the equation describing its motion would be

theta(t) = Ae^(-Bt)cos(Ct) + D

where D = the angle that represents north

but this wouldn't quite be the equation that would model it's motion...
#444
I am finding it very difficult to work on such a large game, there is so much work to do. 

I had tried just jumping into it, but I ended up with my sprite numbers getting very disorganized...my room nubmers getting confusing, my room transitions then became a pain to program since there was no logical progression...and as I worked, I wanted to change things about the plot and the art...

I keep starting over, and struggling with the process.

From those of you who have completed big projects, what procedures did you use that worked out well?

Now, my backgrounds take a long time to make...but I'm afraid that once I draw them, and test the game out, I'll want to be changing things around with the plot andstuff and then I might need the backgrounds to change.

So now I'm thinking maybe I should just make the whole game using quickly sketched graphics, playtest it, make sure it is fun, then go back and draw all the backgrounds well...

Can you game makers share some advice on good practices?  Ways for organizing sprites, methods of attacking the project, etc?
#445
Critics' Lounge / Re: Shaman's hut
Thu 28/10/2004 16:46:57
Quotewhy not mirror the bookshelf? i mean, right now you see the right side of the bookshelf, but i think you ar suposed to see the left side of the bookshelf

No.

QuoteFor the lightsource, I was going to have a lamp in the cieling but then decided that the tiki-lanterns could work as lights.

iIf they are lights, then why are they casting white light instead of green/yellow/red/blue light?

Anyway, I don't think that just because your character is good doesn't mean he must have dangling smily faces.  Character's can, and should, have more dimension than that.  It could be fun if the character was a bit spooky...perhaps a little scary...but still good...think of the shaman in Dark Crystal


The perspective on the fridge is much worse in that edit
#446
Critics' Lounge / Re: Missions
Thu 28/10/2004 16:41:54
So what do you want us to give comments & criticisms on?
#447
Ok, it's not a exactly a compass, and it can't be drawn in the game...I will need to draw sprites for each angle of rotation.

You all have seemed to just gloss over the hard parts..

1.  To have torque that is proportional to the difference of the current angle and the desired new angle, that provides angular acceleration and is damped by friction...

2. To have the order of the sequence of frames to be played be determined by a function

So....I'm thinking it would probably be too difficult to implement the realistic method of acceleration into AGS, but I could live with just having constant velocity to make it rotate to the new position without any harmonic motion or damping (I don't know how to do this and I doubt anyone else does)

But that still leaves problem 2
#448
I want there to be a compass on the screen which shows the correct North.Ã,  The direction of north will be a room variable.Ã,  When a new room is entered, I want the compass to rotate and point in the correct direction...using harmonically damped motion (aka, sinusoidal).

I haven't programmed in AGS for a while...but as I recall...we don't have sin functions or log so the equation couldn't be written, and we can't rotate sprites anyway.Ã,  So I'm sure any workaround would involve a sprite for each degree of rotation.Ã,  But still...I'd need the capability for playing back the animation at arbitrary starting frames, for arbitrary frame durations, in forward or reverse...

Any ideas..?
#449
don't call them hobbits until we can prove that they have hairy feet and make a killer rice cake
#450
Critics' Lounge / Re: *NEW*(TLOTLL) Character
Thu 28/10/2004 00:10:37
This sprite looks fantastic!!

I like the original colors fine....but the centering of the hair is a real improvement, I would call it done after that.
#451
Critics' Lounge / Re: Shaman's hut
Thu 28/10/2004 00:08:29
First of all...If you're set on the christmass light dolls, I think you should at least change them to ghastly faces instead of happy faces, given the dark nature of some of the other objects in your scene.

Secondly...what are the light sources?  Is it just the dolls?  You should make the shadows consistent from the light source(s), and cast shadows on the walls of the hut as well.  And if those happy faces are the only light sources, their colorful glows should be setting the color of everything else i nthe scene.
#452
what can i say...i had a sudden irrational urge...

#453
everybody googles, it's not just for geeks
if your friends are talking about some stuff that you don't know
just smile and say you do
you've got google...you know what to do
#454
General Discussion / Re: D&D on the forums
Wed 27/10/2004 05:43:11
scummbuddy,

you're missing the point...there's a whole new puzzle in trying to find the correct word!  that's more than twice the puzzles!
#455
Critics' Lounge / Re: Hand painted effect.
Wed 27/10/2004 04:54:10
it looks nice, but it does look like a filter job sort of

if you want it to have the hand painted look, then use larger brush strokes which are visible...aka, do something like this maybe?



i must give credit to the original author which i copied...

this one by Lucifer
#456
how about some glitter in the water, some whispy clouds in the sky (and more whitish sky), more detail in the tree (define the branches better and hint at the bark), instead of having flat ground, make the ground variagated and covered in pebbles and rotting wood and crap, how about a big pile of old fishing junk that is against the building and pretty much make the whole area filled with junk :P

i must say though...i think i would rather see it from an angle where i can see over the majesty of the cliff

your drawing skills on the wall and dirtyness of things loo kvery good
#457
Strazer, that was it :) how silly that I did not know this...
#458
Critics' Lounge / Re: Character walkcycles! :)
Mon 25/10/2004 02:32:53
looks really nice

where the girl is walking forward, though, her hands look as though shes sliding them back and forth across her tummy...maybe move them out a little bit, and now have the elbows bent inwards (at least not in all the frames)
#459
General Discussion / Re: I bought a laptop!
Sun 24/10/2004 18:19:02
QuoteI don't

I need one, though! Maybe I should get mo' money.

You don't need more money, you just need to eat a little less pizza and a little more ramen, and wear the same clothes for more years at a time...
#460
well, I do have a CRT monitor, a ViewSonic G90fb 19"...and I have the refresh rate set to 85 Hz.  I don't think that the refresh rate of the monitor changes when I run different programs, though...

it is displaying the correct resolution, but it just shifts it off the edge of the screen
SMF spam blocked by CleanTalk