-
Quick question
Is it more memory effecient to use an imported image (gif,png, etc) or have the image drawn by the program itsefl? Also would the real time changes to the image (i.e. color/animation stuff) be better with the image drawn with code or imported from a previously existing file?
Thanks, John
-
There is a game that was designed on the basis of drawing/re-drawing images and it was only 64KB, a FPS and very detailed graphically. So to answer you, yes it would be much more memory efficient, however all i can say is good luck the game in question took 3-4 years to develop as each image had have instructions written for each action performed, which you can imagine took a long time to do. If you are after simplistic images to save space do try and draw it to save. But be careful when you are doing this as if your application is heavily demanding on images then re-drawing is NOT an option . To answer your second question, the difference is not the quality of the image, the real difference is that with a image you already have i believe you cannot manipulate it very much, whereas with re-drawing your image will mean that you have alot of control. Hope this helps
-
The thing I'm trying to do is make a paint program that exports what code so if you draw a line in the paint program not only is a line drawn to the screen but code for drawing that line is written to a file. The problem with that is, it would be nearly impossible to import files. Plus making a program with spline curves and advanced features would be rather difficult as well. So using good tools like photoshop are pretty out of the question and would be hard to implement.
I kind of want to make an 'object' based game opposed to a tile based game so animations could go at different speeds according to an algorithm and end so much uniformity.
Are those ideas too far fetched?
EDIT: Another little problem I encountered is that if you were to draw a pixel over itself, it is redundant and extra code because the pixel beneath it is no longer needed. I.E. if you draw a black line and then decide it should be brown so you draw a line over it, the first line drawn would still be executed but no longer needed.
Last edited by anothrguitarist; 02-25-2005 at 04:08 PM.
-
Pixelmanipulation in java is FAST
If you are able to break down the visuals in your game into reusable objects,
where each object has a specific algorithm for rendering itself (and that
could be a mixture of ready made images and java drawing) then I would
advise you to go for that. As for the 'unnecessary' drawing operations I
suspect that the processing required for detecting that 'unneccessity'
would be at least as time consuming as just drawing it regardless of its
visibility.
eschew obfuscation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks