Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 1 Dec 2001.
Re: JavE animation

Re: JavE animation

> > I'll try a javascript
> > version when the next JavE comes out.
>
> It will still take a little time until the next release, for somebody
> has found a lot of work for me to do...

Sorry ..

> But I have converted your jmov to JavaScript and uploaded it to my
> server:
>  http://www.jave.de/demo/JJS_ASCII_Snow_Dancers.html
> So you can try to adjust the font, etc. It also seems to me the
> JavaScript player has performance problems with animations of that
> size...

I don't see any performance problems ( Pentium 3 600 @ 810mhz )
, but I imagine you can improve that a lot by letting the script decode the next
frame right after displaying the previous frame and setting the delay the next
loop execution to the remainder of a modulus divided .getTime().

This way the script will decode the next frame while waiting to display the next
frame instead of waiting first and the displaying after calculating.

This way you also a more constant framerate.

To ensure even smoother and even framerate you could also start one thread that
does nothing but decode to a buffer array containing decoded frames, and another
thread that does nothing but show the decoded frames and calculate the correct
delay.

PUSH the frames onto the buffer array and SHIFT them from the beginning of the
array to display them

You want to set a max number of decoded frames in the buffer and having the
decode thread check if the max have been reached before proceeding to decode a
new frame or you could run out of memmory because the decode thread would keep
putting frames into the buffer faster than they could be displayed.
With looping asciimations that do not contain a large number of frames you could
expand the buffer to fit all the frames so once the frames have been decoded
once they could be displayed VERY fast .. and the stress on the pc's power would
be minimal once all frames have been decoded into the buffer.

DHTML lab have a colum on different ways of timing a DHTML animation , along
with some very helpful tips on how to improve framerate - I'm not entirely sure
that a textbox suffers under the same limitation as moving a gui object but it
contain lots of useful info on timing and delays that will make you understand
what I'm talking about better ( I hope )
http://www.webreference.com/dhtml/column34/

http://www.mozilla.org/rhino/perf.html
Outline some hints on how to improve the general speed of your javascript code

I hope this helps
- CeeJay

- - - - -
BTW :
http://www.webreference.com/dhtml/column30/
tell how to identfy installed fonts .. very useful for providing a list of
useable fixed-width fonts.

How to speed up Java ( found this too while searching the net )
http://www.macadamian.com/column/column_fastjava.html

http://www.codeproject.com/jscript/javatojs.asp
Tell how to communicate between Java and JavaScript .. something I suggested
month back that the JMOV player should be able to do : Both to control the
applet with scripts and to control scripts from the applet.

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f996b,46020ba0711fa1ec
X-Google-Attributes: gidf996b,public
X-Google-ArrivalTime: 2001-11-30 17:00:50 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!news.tele.dk!not-for-mail
From: "CeeJay" <use...@ceejay.cjb.NOSPAMnet>
Newsgroups: alt.ascii-art
References: <3ba...@posting.google.com> <3C0...@rz.uni-karlsruhe.de>
Subject: Re: JavE animation
Date: Sat, 1 Dec 2001 02:01:49 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Lines: 70
Message-ID: <3c082bc2$0$247$edf...@dspool01.news.tele.dk>
Organization: TDC Internet
NNTP-Posting-Host: 62.243.165.226
X-Trace: 1007168450 dread02.news.tele.dk 247 62.243.165.226
X-Complaints-To: abu...@post.tele.dk
Xref: archiver1.google.com alt.ascii-art:11987
About this message. This message was posted publicly to the newsgroup alt.ascii-art in 2001 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post