• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Niels

[java] Details of the ImageProducer

13 posts in this topic

I do have a question that has been nagging me for a while: I rely extensively on the Image/ImageProducer/PixelGrabber classes in my Java code, and have so far treated them as very convenient in/output of 32-bit pixel data (ARGB) knowing that obviously "someone" converts these data to 16, 24 or whatever bitdepth/byteordering the actual display have when I display the images. I have been unable to find any in-depth information about this process - I am trying to squeeze as much out of my core graphics code as possible, and I feel this is a place I''ve been neglecting. Does anyone know if it is any use to create specific code for, say, 16-bit if thats the current display depth? Also, any references to hard-core java graphics programming sites/books would be appreciated, thanxx. /Niels
0

Share this post


Link to post
Share on other sites
Um,..., I have a question about the ImageProducer/ImageConsumer interfaces. It seems from your post that you just have to have an ImageProducer, right? Is an ImageProducer given to you by the environment (static method of some class or the toolkit class)? I''ve worked on animating GIF''s as sprites before (in Java of course)--that was fun--but I never bothered to learn much more about ImageProducers. A little info, please?

JoeG
0

Share this post


Link to post
Share on other sites
The image producer essentially builds an image from an array of integers. It is fast enough for animation, but I can''t help but think there''s an overhead involved.
An overhead, that is, that can be reduced by using the ImageProducer differently for different screen modes.

(It has a special "animation mode" in which it reuses the integer array, you simply call an "update()" method when you have changed something and need a new image)
0

Share this post


Link to post
Share on other sites
This is the only thing I could find on the 2D api. It''s only the programmer''s guide from sun. I don''t know much about advanced imaging in java and I''m trying to learn about it myself. I was wondering if using something like RLE would speed up or slow down java. I''m not exactly sure if it''s possible or how it would be implemented either since i don''t think you can print directly to the screen in java.

http://java.sun.com/products/jdk/1.3/docs/guide/2d/spec/j2d-bookTOC.doc.html
0

Share this post


Link to post
Share on other sites
What versions have this 2D and 3D API in them? Ive been playing with games in Java and i keep hearing about these API''s.

Also, is Java really good enough to have full blown graphics like diablo or spartcraft? I mean can it still run it smoothly with all the graphics?
Plus is there any way to shorten the download time of all the pics used on a game?? I load all the images before the game continues, and it allready takes a fair time with the few i have. Ideas???

PEACE
GAZZ
0

Share this post


Link to post
Share on other sites
I found this site containing libraries for image loading in Java. Supposedly the libraries improve performance and memory handling. While not specifically relating to your question I thought this might be of interest.

http://www.vlc.com.au/~justin/java/images/
0

Share this post


Link to post
Share on other sites
2D/3D APIs are not standard in any of the Java packages distributed with browsers today - I.e. people have to download them specifically, and noboby (apart from programmers) does. This is the reason I stick to the ImageProducer/Image classes - they''ve been there since the pre-V1 JavaRT.

Regarding performance: Don''t expect to do a Quake 3 killer in Java (Unless you rely on dedicated graphics packages such as OpenGL) - DOOMII is not far out of reach though . Seriously, check out http://files.theparty.dk/cgi-m/tpa.cgi and look for Java Demos - should give you an impression of what is possible in pure Java (without dedicated 2D/3D APIs).

Download time IS a serious problem (and the main reason we do not have animated graphics at www.hexadome.net). The two main tricks used on that site are:

1) Store all graphics in larger images and jpeg it (one large image compress better than 50 small images with the same content) + store all game data in a single .zip file.

2) Map is generated on the fly from 4 basic texture maps, rather than having 2000 tiles.

The complete game (code, maps, graphics, HTML etc.) is less than 200K...

/Niels
0

Share this post


Link to post
Share on other sites
Java 2D is a critical part of the JFC, I can''t Imagine a browser plugin that does not support the jfc nowadays.
0

Share this post


Link to post
Share on other sites
Me neither, but the plug-in is a pain to work with. For instance, I was presenting an applet to my boss at work that used the plug-in when it just decided to not work and give an error. Now if that wasn''t enough for you, take a look at Sun''s forums and see how many people are complaining about the plugin. Finally not every platform has the plug-in available. His version of UNIX did not have a plug-in available for it, so I had to convert all my Java2 code to Java1.1 code (believe me that was a pain) and I lost some features (like fonts) that were only available in Java2. The point is, don''t depend on plug-ins because they are still new technology (like Java3D). Maybe in a couple years most everything will be ironed out, but I see no point in frustrating yourself
0

Share this post


Link to post
Share on other sites
Ain''t you missing my point?

The plugin requires client-side installation, right? Meaning the user needs to actively do something to make it work which means you are excluding like 98% of the market (number wild guess - don''t flame me)..

Unless it''s in the browser, it is - IMHO - useless. Which, unfortunately means we have to wait untill everyone is running IE5 (since neither Netscape nor the Mozilla open source group will probably ever get their sh*t together and build a decent alternative... An NO, NS4.6 doesn''t qualify - if you are looking for a bugged text viewer, use notepad.. Whoops, off on a wild tangent (wasn''t that the name of the company of some obscure DX preacher?) Ah, never mind - it''s late...)..

Also, last time I checked, performance of the plugin sucked...

/Niels
0

Share this post


Link to post
Share on other sites
Oh, sorry!

Jim said he couldn''t imagine any *plugin* that didn''t support JFC. If, by plugin, he means the one from Sun - then that requires just as much download and installation as the SDK itself, and is thus just as useless.

/Niels
0

Share this post


Link to post
Share on other sites
Cool. Talking about the plugin, I was surprised to see that intellicast.com (their American time zone applet) somehow got Swing to work without the plugin. I asked them how they did it, but haven''t gotten a response
0

Share this post


Link to post
Share on other sites
I heard someone say that it is now legal to distribute part of swing (The original license agreement required you to redistribute the full (12meg??) package) - if they are only using a small subset of the swing package, they could simply include those classes in their .jar...

/Niels
0

Share this post


Link to post
Share on other sites