Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Tools Discussion / Re: What 3D modeling/rendering packages are you us on: 2004-02-13 00:34:10
Quote
You forgot POV-Ray. That's an unpardonable sin. Wink

(For those of you unfamiliar with POV-Ray, it's a free - source available - ray tracer that's been around since the days of 286s and Compuserve. It produces some really great output and has tons of tools and features.)


You know what?  I TOTALLY forgot about POV-Ray.  It's been about 6 years since I even looked at it.  Thanks!
2  Game Development / Performance Tuning / Re: The Gloves Are Off on: 2004-02-12 21:51:45
Quote


Alpha Compositing is a fundamental requirement for sooo many 2D effects. I'm sure you don't need me to list them all.
The only thing that is more fundamental, is transforms.... and we don't have that accelerated yet either <_<


I'll give you transforms... they definitely could be a big aspect in the playing of some games.  

But to me, alpha blending is essentially eye candy that's nice, but not imperative in order to make a good game.  I totally understand the desire for it, just not why it's such a big stopping point for some people.

Case in point -- I just finished playing Planescape: Torment for the first time.  I've owned it for years, but now I'm going through all of the games I never beat on my "finish all my old games BEFORE I buy new ones" kick (after I was thoroughly disappointed by DX:IW after being such a fan of Deus Ex).  The graphics are about 5 years out-of-date, but the gameplay and fantastic story makes it a great game even today.  Even older is Fallout2, which I beat right before PS.  Both incredible games which had very little to do with the graphics.

Think about it this way -- how cool is it that you can do BITMASK blitting by just setting a flag in a function?  I come from the days when you had to do that manually, and it was no fun.  Java2D isn't perfect, but it's relatively easy to program, and someday (hopefully soon), they'll add everything we want to it.
3  Game Development / Performance Tuning / Re: The Gloves Are Off on: 2004-02-12 19:07:24
My question still remains, then -- what type of things are people doing that would require more graphics capability than Java2D has?  I'm blitting over 1200 images to the screen using bitmask blending and getting anywhere between 150 and 200 FPS... that's more than enough for most games I would write (I'm working on a 3/4 view or full isometric RPG -- haven't figured out which yet).  Does anyone have a demo (even a slow-moving one), of something they've written, or is Java's "slowness" just an excuse to get nothing done?

I'm just curious what people want to acheive that REQUIRES alpha blending and the like that can't be acheived by other means.
4  Game Development / Performance Tuning / Re: The Gloves Are Off on: 2004-02-12 05:28:39
The snowflake demo ran at 51 FPS on my PC (2.2 Athlon with a nice video card that obviously doesn't come into play very much with such a light program).  The original demo came in at 92 FPS.

I guess my question is -- what's with all the griping?  Seriously -- what are you guys trying to create that requires you to blit more than 1000 or so images to the screen simultaneously?  Obviously, you aren't going to get as good frame rates as native code, but I'm sure at least some of you were programming games for more than the past 5 years or so, when it became common to throw hardware at poorly-designed code than, ahem, OPTIMIZE it, and design the code for the system you were programming on.

Java2D is an easy-to-use library that gets decent results.  It's not Direct3D, but, then again, Direct3D is a pain in the butt to program (not as horrible as it once was, but it still isn't too much fun).  Discussing problems with an API is good, but complaining about it ad nauseum really doesn't help.  Wait for 1.5, and see what they've added to it.  If you think J2D sucks, there are other libraries out there... saying "see, it still sucks" really accomplishes nothing.
5  Java Game APIs & Engines / Java 2D / Re: I think I might be going about this the wrong on: 2004-02-10 14:04:21
Quote

On an semi-unrelated note, is 2-3MB in memory too big for a character to take up?


Depends what you mean by 'character'... Are you talking about just a single sprite?  All animation frames? The actual in-game representation including all statistical information?
6  Java Game APIs & Engines / Java 2D / Re: I think I might be going about this the wrong on: 2004-02-10 13:59:48
Quote

does not. i made a test, a simple image filtering routine. when using a method call in a loop to filter the pixel, it's faster than inlining the code in the loop... that's because the JIT does wonders at inlining. I waas amazed at the result, as you might also be, but it's true.
You'll find thread about this on the old boards performance tuning section, if still available...


Interesting.  I guess you learn something new every day.  I always hated expanding functions when writing games in C++ (or forcing them inline).  Of course, last verion of Java I used prior to getting back into it (1.1), wasn't good at much Cheesy  Quick question -- do you know if this inlines complex functions (say of 100 lines or more?)  Probably not a good question for this board.

Thanks!

-Chris
7  Java Game APIs & Engines / Java 2D / Re: I think I might be going about this the wrong on: 2004-02-09 19:02:54
A couple things I can see (knowing nothing of BufferStrategy, and very little of the Rasters since I just started this back up, but knowing quite a bit about game programming):

1) First off, you seem to be drawing to the backbuffer 200 times per call to your "draw()" function always in the same position, yet only flipping the page a single time using "bs.show()".  This means that 199 go unseen. If you want to include 200 draw routines in a single function call (which I do NOT recommend), at least make it flip the backbuffer after every draw (unless you're changing the position of the "sprite" with every call to drawImage(), so draw 200 unique boxes on the screen at one time -- in your case, you're just drawing them on top of each other)

2) Since you call your draw() function from your main loop, you should really only be drawing once per function call (unless you're actually trying to draw 200 unique squares, which it doesn't appear you're doing -- at least not from a user perspective).   If you're trying to simulate drawing a map (such as an isometric one), it's very rare that you'd be recreating each tile of the map each frame (which you're doing here).

3) Even without the "p++" loop, your inner loop has the wr.setSample() function being called 10,000 times.  Calling functions is a significant system hog (at least it was in C++ Game Programming -- I'm sure most of the same concepts still apply in Java), and doing it not only 10,000 times, but 2,000,000 times in a single function call (with your outer loop included) will bring any system to its knees.  Try populating an int[] with your sample data, and then calling wr.setSamples() a single time with your int[] as the last parameter (notice the "s" at the end of the function name).

8  Java Game APIs & Engines / Java 2D / Re: Loading a separate alpha channel on: 2004-02-09 06:17:11
Thanks, javazoid -- it worked.  For anyone interested, I had two images -- testpic is a straight RGB JPEG, and testpic-mask is a grayscale one.  It was a simple matter of creating a new image ABGR, drawing the RGB image to this new image, and then catching the alpha raster of the destination image, and copying the raster of the mask image to that,  (of course, I cheated because I knew the dimensions and color depths of all images involved, but it won't be too hard to make a function from):

try
{
 bi = (BufferedImage)ImageIO.read(new File("testpic.jpg"));
 bim = (BufferedImage)ImageIO.read(new File("testpic-mask.jpg"));
}
catch (Exception e)
{
 e.printStackTrace();
}
   
bif = new BufferedImage(100,100,BufferedImage.TYPE_4BYTE_ABGR);
       
Graphics2D bg = bif.createGraphics();
bg.drawImage(bi,null,0,0);
       
WritableRaster rs = (WritableRaster)bif.getAlphaRaster();
rs.setDataElements(0,0,bim.getRaster());
9  Java Game APIs & Engines / Java 2D / Loading a separate alpha channel on: 2004-02-07 17:43:59
I've been programming for a long time, but just recently back to Java (since I left it in 1.1 4-5 years ago).  Anyway, I've figured out the bulk of stuff in J2D, except for one thing:

Is there any canned way to load a separate file (or separate part of the same file) as the alpha channel of another?  Say that I have 2 jpg files -- one which contains an image, and one which contains the mask of that image... is there an easy way to use the mask image as the alpha channel of the original?  I can write the function myself (it wouldn't even be that hard to do -- just pull in both files, and then transfer the grayscale mask image pixel-by-pixel as the alpha channel of the original image), but it seems like it would be extremely slow.

Keep in mind that I know I can use image formats such as GIF (which I don't want to use due to the color depth) or PNG, which contain their own alpha information, but I wanted to know if there would be an easy way to get this to work (if for no other reason than to have all of my options open).

Thanks,
Chris
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (44 views)
2014-09-23 14:38:19

radar3301 (27 views)
2014-09-21 23:33:17

BurntPizza (63 views)
2014-09-21 02:42:18

BurntPizza (32 views)
2014-09-21 01:30:30

moogie (40 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!