473,799 Members | 3,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rotate, skew, resize for DHTML game

Are there methods for manipulating images in JavaScript that would allow me
to write functions to rotate, skew, mask and resize images (bitmaps)?

The functions need to be fast enough for use in a top-down scrolling game.
Or would I be better off preprocessing all of the images with something
server side such as PHP and then preloading them into my JavaScript already
manipulated?

The only thing I don't like about the idea of preprocessing the images is
that I will have to preload a very large number of images, ie all of the
sprites rotated at different angles, resized at different sizes etc.

I am considering using Flash but because it would involve learning
ActionScript I would prefer to do it with a combination of JavaScript and
PHP. The other alternative that I was considering was using SVG, but not
many people have an SVG capable browser or have downloaded the SVG plugin.

Would also appreciate any links to resources that would help me with this
sort of thing. TIA!
Jul 23 '05
21 8508
On Sat, 11 Sep 2004 19:20:21 +0200, Thomas 'PointedEars' Lahn wrote:
I'm a bit uneasy about the notion of long pre-load times. Users can get
mighty impatient :-) I think you'll find Java will be quicker. [...]


You're wrong, it takes much more time to start an (external) Java Virtual
Machine than to invoke a (built-in and maybe already running) script
engine. Your JVM may be started when you log on, but mine[tm] is not.


That converstaion was discussing the load
times of the *images*. The options were either..

a) load image 1 & 2 and using Java to
fade/change between them, or ..

b) load image 1 & 2, as well as an image for
each part of the transtition between the two,
and using JS to cycle the images.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #21
JRS: In article <11************ ****@PointedEar s.de>, dated Sat, 11 Sep
2004 19:20:21, seen in news:comp.lang. javascript, Thomas 'PointedEars'
Lahn <Po*********@we b.de> posted :
Ian Sedwell wrote:
On 2004/09/06 21:22, in article SF************* ********@news.x tra.co.nz,
"Nik Coughin" <nr***********@ woosh.co.nz> wrote:


Please do not write attribution novels by replicating header information.


Ignore him.

For current thinking on this matter, current thinking is visible in
work-in-progress
http://www.ietf.org/internet-drafts/...-useage-00.txt
and
http://www.ietf.org/internet-drafts/...article-13.txt

See also the references via sig line 2 below; unlike TL, TS is a
respected authority.

Lahn has not noticed that the need to correct his misguided and
dictatorial statements used more resources than reducing attributions
could possibly save, even ignoring the utility to many of us of having
fuller attributions. The situation is in fact not unlike that of his
ancestors two-thirds of a century ago (and 90%, too)

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demo n.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #22

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1999
by: mr_burns | last post by:
hi there, i would like a book that will explain concepts of javascript and dhtml instead of, for example, ten tutorials on how to do specific things in js or dhtml. ideally a book thats can explain from the basics of javascript, to more complex things such as dhtml and dom onto things like creating javascript objects (if that is possible, but u get the idea). rather than this is how you make a drop down menu tutorial; this is how you
5
2973
by: sundew | last post by:
Here I am presenting you the new Wednus proj. subtree, Wednus DHTML RPG engine, or just 'Wednus RPG' with a demo game using the engine. About the engine itself, since this DHTML game engine designed in generic manner, it can be used for the games other than RPG genre as well. (could be easier). By using this engine, anyone can make their own DHTML games w/ half an hour of simple scripting. and about the demo game, the name of the first...
4
18299
by: taccea | last post by:
Hello, I need to rotate some text vertically on an Access report. Is that something difficult to do? Any pointers appreciated. Taccea
1
3200
by: Rohan | last post by:
Hi There, Is it possible to rotate or resize pictureboxes, labels, textboxes at runtime? And I even wanted to make textbox and label controls Transperent ?
7
3126
by: chad | last post by:
is it just me or does anybody else find the Image.RotateFlip method kind of slow? (I'm comparing to commercial softwares). Same for resizing. I'm using sourceImage = system.drawing.bitmap.fromFile(filestring) newImage = new bitmpa(sourceImage, newWidth, newHeight) newImage.save(newFileString) Anyone knows of any faster methods?
3
2477
by: Jim Langston | last post by:
I really am not sure if this question belongs in this newsgroup, but not sure where else to ask it. There is someone working on a game that I tested, and it was taking >30 seconds to load. He stated that everyone else was taking 2 or 3 seconds. Then he found one other person taking >30 seconds, and it turns out the common denominator was both of us have Intel chips (Celeron) where the other people have AMD. I had him send me his code...
4
4640
by: Raj | last post by:
Hello Coders- For calculating the Moment, Skew and Kurtosis, i found the following function in the help of C++ builder; But i couln't understand this, of how to use this; What i have is the data in a 1-d array;, say, Data Can somebody tell me how to use this to find the MomentSkewKurtosis ? Copied from C++ help;
0
935
by: csecharith | last post by:
Hi I have to print an html file, I want to rotate it by 90 degrees. I know how to take portrait and landscape reports. I want to know how to rotate it by 90 degrees. Do you know how to do it???? (I should be resize I know that and I can do it) Thanks!
0
1728
by: harryusa | last post by:
I am experimenting with the rotate function and so far I can't get my code to return anything but the URL of my script. Here it is: <?php // The file you are rotating $image = 'halloween.jpg'; //How many degrees you wish to rotate $degrees = 180;
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10259
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.