Author Topic: Scaling  (Read 4417 times)

0 Members and 1 Guest are viewing this topic.

Offline Cloudee1

Scaling
« on: March 02, 2004, 03:10:07 PM »
Ok so here is what I am thinking, though with no clue as to how to script this though:

create a class of motion with a doit method which gets the current Priority of an actor. It then takes this value (between 0 14) and plugs it into the equation 5(X)+40. This new number that comes out, between 40 (for 0 priority) and 110 (for 14 priority), we will call this our "Percentage of Scale."  Now get the cel height and the cel width and get one value to apply the percentage too, Using good old pythagorean theorem we know that a2+b2=c2. A=height B=width C=diagonal. Apply the percentage of scale to the diagonal and you will get a new diagonal conveniently scaled. I suppose we will need to get an angle too, so that we can get either a or b in order to reverse pythagorean's theorem. use something like SinZ=opp/hyp opp=B adj=C use before percentage to get angle, and after scale to get B.  Ok now use your new scaled diagonal to draw cel width and height by their new numbers.

What do you think does that sound like something that could, would work. I have no idea how this script would even really get started.

How about a community project, something that when finished we could all add to our template game, I know I would enjoy having scaled actors.
« Last Edit: March 02, 2004, 03:15:08 PM by cloudee1 »


Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Nychold

Re:Scaling
« Reply #1 on: March 02, 2004, 05:17:38 PM »
I'm not sure why Pythagorean's Theorem would be necessary here.  Plus, in order for this scaling idea to be flexible, it would be best to allow programmers to change the settings.  So:

Code: [Select]
Scale = ax+b
ScaleDeterminant = 14a+b (largest value)
ScaleFactor = (100*Scale)/ScaleDeterminant
Then, just multiply your cel height and cel width by this scaling factor, divide by 100 and you'd get out your maximum scale size.  Plus, you could even derive two equations: one for horizontal scale, the other for vertical scale (and also, this allows for a much more generalized usage, and not dependant on movement or priorities.)  Even better, you could adjust the values so that the middle of the screen is "normal sized" (ie: ScaleDeterminant=7a+b).  However, just how something like this would actually be implemented in SCI0 or SCI01 I don't know.  I don't remember seeing a way to scale views.

Offline Robert Eric

Re:Scaling
« Reply #2 on: March 08, 2004, 04:31:44 PM »
I think scaling is interpreter dependant.

Offline Cloudee1

Re:Scaling
« Reply #3 on: March 09, 2004, 12:40:51 AM »
That sucks ass.

Scratch thatidea then  ;D
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.043 seconds with 16 queries.