On 30 August 2012 05:25, James Paige <b...@hamsterrepublic.com> wrote:
> On Thu, Aug 30, 2012 at 05:09:26AM +1200, Ralph Versteegen wrote:
>> On 30 August 2012 02:25, James Paige <b...@hamsterrepublic.com> wrote:
>> > On Wed, Aug 29, 2012 at 11:25:07PM +1200, Ralph Versteegen wrote:
>> >> James and I were discussing this the other week in IRC, and I meant to
>> >> send a small note to the mailing list for comments.
>> >>
>> >> I finally agreed that just measuring all animation delays in plain
>> >> ticks, rather than milliseconds or 18ths of a second ("idealised
>> >> ticks") would work fine. Here's the plan which we seemed to agree
>> >> upon:
>> >>
>> >> -Add an option to set the target ticks per second.
>> >> -Animations, including sprite animations (which are not yet
>> >> implemented), tile animations, ticks per walking frame, and battle
>> >> meters/attack animation should all be measured in ticks. Most of these
>> >> are not yet adjustable. By default the number of ticks for each delay
>> >> would be chosen to be the same fraction of a second as currently, and
>> >> eventually options will be added to adjust each of these.
>> >> --In particular, frame per walking frame could be a separate option
>> >> until customisable sprite animations are implemented, at which point
>> >> we can obsolete it. I would want this to be a global option (or two
>> >> options: one for walking, one for walk in place) rather than per-npc,
>> >> because a per-npc option can't easily be translated to a spriteset
>> >> animation when we switch to those.
>> >> -When you change the ticks per second in Custom, it should offer to
>> >> multiply all tick delays everywhere to compensate for the change
>> >> -When exporting animations, the original ticks per second of the game
>> >> should be included in the file format. When importing, you should have
>> >> the option to adjust the tick delays for difference in tick rate if
>> >> there is any.
>> >> -We should have an API both in FB and HS to pause an animation and
>> >> step frames or ticks manually at the desired rate.
>> >>
>> >> We can add the ticks per second option as soon as all builtin
>> >> animations are adjusted for the change. We don't need to add options
>> >> to customise those builtin animations.
>> >
>> > Yes! This is an excellent summary of what we descussed before. I like
>> > this plan.
>> >
>> >> A "wait seconds" command would be a good idea. Actually, idea: we
>> >> could add units to HS. For example, after defining
>> >>
>> >> define unit(sec, seconds to ticks)
>> >> define unit(second, seconds to ticks)
>> >> define unit(seconds, seconds to ticks)
>> >> script, seconds to ticks, x ( return ( 183 * x / 10 ) )  # replace
>> >> with actual runtime tick rate
>> >>
>> >> HSpeak would then parse
>> >> wait(3 sec)
>> >> as
>> >> wait(seconds to ticks(3))
>> >>
>> >> Another useful unit would be tiles. When types are added, units would
>> >> also allow type checking. OK, I can't actually think of any other
>> >> units aside from ticks, seconds, pixels and tiles; it's a bit of a
>> >> gimmick.
>> >
>> > I am wary of this units idea. What about when somebody does:
>> >
>> >   walk hero(me, south, 5 tiles)
>> >
>> > and then they can't understand why the hero walked 100 tiles instead.
>>
>> That's what the type checking is for. Once we have that, "5 tiles"
>> will do the right thing, and "30 pixels" can show an error.
>
> Oh, yeah, with type checking that would be great. That would definitely
> make things happy :)
>
> I suppose that means that units would have different conversions
> depending on the type-context you used them in.
>
> Seems like that would require a more complex "define unit" syntax?
>
> ---
> James

Type checks would be done at runtime (compile time too when possible
would be very nice though), can't (always) do them at compile time,
and have an actual wrapper script like

script, seconds to ticks, x ( return(seconds(ticks per second * x)) )

where "seconds" is the type constructor (probably named differently).
Might need a cast to integer too.
_______________________________________________
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to