• 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.

loserkid

[java] Fast graphics in java, possibly .....

8 posts in this topic

Ok, lately I''ve been working on writing my own 3D Engine (without Java3D or any other 3D API) and looking for fast ways to draw stuff to the screen ... so I''ve been optimzing my code like a madman and I''ve increased performance about 30%. So I think great! i''ve got a sphere rotating wildly on the screen being shaded by a light source. Then i put a torus in my engine and I get a nice slow down - "more faces, more calculations" I say, so it''s going to be a bit slower ... so then I go to one of my fave Java sites Sumea and look at there cool 3D stuff and say to my self "damn". They had a pair of evmapped sun glasses rotating nicely on the screen.(more polys than my torus ) So then I think their must be a way to draw stuff faster to the screen ... So I searched for other Java 3D engines and came upon Peter Walser''s Site and he had his own EXTREMELY stunning 3D engine with all the bells, and everything was running soooo fast. Much to my surprise he had the source to his engine so I took a quick look at it and his engine made NO calls to any of the Java graphics methods except drawImage(). Then i looked closer and he uses just an array of ints representing the pixels of the image and the ImageProducer class to update the image (*without createImage()*). Then *smack* I hit my head and wonder is that really faster? Because each time you want to access a pixel to draw stuff or change the color you have to y*width+x which is another multiplication to add to all the other complex calculations. (of course this method is faster for texture mapping). If you''re still with me, here is the question: If you have used Peter Walser''s method for drawing stuff to the screen, by how much did this increase the performance of your program and why is java graphics so much slower? ============================= silly programmer vb is for kids. ============================ www.thejpsystem.com
0

Share this post


Link to post
Share on other sites
What do you mean by "why is java graphics so [slow]"?

Everyone knows that java graphics are slower than equivalent c/c++ counterparts. How were you painting stuff to the screen before? Just called each objects paint method? Of course that''s going to be slower just from the sheer number of function calls. Painting everything into an array of on ImageProducer is kind of akin to video memory. You just write pixels into the array, and they get painted to the screen whenever they can. I only do this trick when i''m doing 2D effects like alpha blending or rotation.
0

Share this post


Link to post
Share on other sites
Damn, I feel dumb for asking that question... Of course the function calls would slow it down a bit when compared to access the pixels directly ().

Thanks for your comments.

=============================
silly programmer vb is for kids.
============================
www.thejpsystem.com

Edited by - loserkid on September 2, 2000 2:11:53 PM
0

Share this post


Link to post
Share on other sites
Why bother when OpenGL exists, is almost as portable as java, and is available from java using a variety of libraries?



0

Share this post


Link to post
Share on other sites
Well OGL is cool and all, but I''m making my 3D engine as a Learing experience ... plus I may, in the future want to make some sort of "game" that will be played in the browsers... so if I use OGL the people who might want to play my game have to download the OGL library to their browsers java libraries ... Of course people will have to download my 3D engine class files, but I don''t think I will have a full blown API like OGL. If I were to use OGL for a game, it wouldn''t be in java, I would do it in c++ ().

Thanks for your comments.

=============================
silly programmer vb is for kids.
=============================
www.thejpsystem.com
0

Share this post


Link to post
Share on other sites
quote:
Original post by StratMan

Why bother when OpenGL exists, is almost as portable as java, and is available from java using a variety of libraries?




OGL exists for Java? That''s news to me. The last time I checked there were only two libraries that claimed to be OGL Java libs. They were horrible though, and cost money. OGL is very non-OO, it doesn''t fit well with java at all. Plus installing java libs that have native code is difficult. loserkid, check out www.cfxweb.net There is supposedly a java demo/effects message board where you can ask these sorts of Java questions.
0

Share this post


Link to post
Share on other sites
Check the OpenGL section of the FAQ. There are links to some good introduction articles for using OpenGL in Java.

http://games.cpbinc.com/faq/ogl.asp

There are 5 or 6 links from the page to various Java OpenGL API''s - I believe a few of them are open source. The only library I am familiar with in detail is Magician (it is what I am using to build my engine). Arcana has done a pretty good job of wrapping OpenGL''s procedural nature into an object-based structure. It''s performance is fairly good as well.

,JL

0

Share this post


Link to post
Share on other sites
I''m a newbie and all (not an excuse!),
but judging by what you said Jim_Ross, you can update the onscreen graphics without calling paint()???
you just update the graphics in another method using image producer?

What is the ideal way to update graphics then?

Cause i was reading in a book
and I don''t understand how to draw to the right graphics object unless it''s in the paint method?
0

Share this post


Link to post
Share on other sites
no,no, you still have to call paint, it''s just that you are only painting the Image made from the ImageProducer, and not a whole bunch of sprites / 3D objects.
0

Share this post


Link to post
Share on other sites