Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
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 / Java 2D / Re: Fetching an Image on: 2003-05-26 23:45:37

I think hes sticking to 1.1.
Atleast, thats the assumption I made when I said 'no'.

Correct, Java1.1 here =)
Thanks for the help though, now I can leave this behind me and focus on other things.
2  Java Game APIs & Engines / Java 2D / Re: Fetching an Image on: 2003-05-26 05:47:41
How about reading the pixels data from a file to an array (maybe using your own format) and using java.awt.image.MemoryImageSource to create a java.awt.Image? You can have immedeate access to the pixel array aswell as to the image.

That's what I am doing now, but I want to have a method, drawImage(Image, width, height etc...) in my own rasteriser. I try to keep a high abstraction level so the user won't have to fetch the image pixels himself and calling the current drawImage(int[] pixels, width, height etc...). Hope you understand what I mean.
3  Java Game APIs & Engines / Java 2D / Fetching an Image on: 2003-05-26 02:50:24
Hi, long time no see.
I've been really busy with my software 3D engine and it is turning out to be a nice system Wink

I have one question about Images though... Is there any other way to fetch the pixels from an Image than with a PixelGrabber? First, it's slow and secondly if a game has a high framerate and getPixels() is called like 60 times/second the program will eventually crash as it cannot fetch the pixels fast enough. The implementation doesn't allow the pixels to be cached as a new image can be supplied at any time asynchronously, so this is the only way. Right now I've solved it by forcing the user to fetch the pixels by himself and give the pixel array as an argument to my method, but it feels somewhat of a hack. Any ideas?

This is all for now,
laters dudes =)
4  Java Game APIs & Engines / Java 2D / Re: Questions about the way Java handles graphics on: 2003-05-04 08:05:27
Ok, major help needed here!

I created an application that tests the speed of the drawImage() instruction, ie:

Graphics g = surface.getGraphics();

The speed with an empty scene without framerate limiter was 300fps at 640x48, but at 1600x1200 just 35-40!

I will go with the MemoryImageSource as you guys suggested in this thread, but will it solve this problem;
ie is it possible to copy the contents of the Image created from the 2d array into a surface without using g.drawImage()?

I have never used MemoryImageSource before but must master it in order to implement Z Buffer. Oh well :I
5  Java Game APIs & Engines / Java 2D / Re: Questions about the way Java handles graphics on: 2003-05-01 22:06:36
Hi. I got around 60-70 fps so you are probably running on a very low end machine or have turned off JIT compiling.
6  Java Game APIs & Engines / Java 2D / Re: Questions about the way Java handles graphics on: 2003-04-29 20:35:39
Whoa whoa whoa... I saw that globe on your site and it surely is impressive. Very nice job on the engine. Do you have many users for it?

Oh, and do you use BufferedImage for all the drawing instructions? I mean, for example, I draw the lines when in wireframe mode with a simple drawLine() command and fill the calculated 3d vertices in 2d space with fillPolygon(xvertices[], yvertices[]). Do you think I'd gain speed by doing all the rasterisation by myself and make my own library for all the drawing operations with BufferedImage, or would it be overkill for everything else than texture mapping?

Thanks a bunch of times for all your answers, this means a lot to me Smiley I'll try to answer here whenever I have time to pay back for your efforts.

7  Java Game APIs & Engines / Java 2D / Re: Questions about the way Java handles graphics on: 2003-04-29 18:28:53
Thanks everyone for the answers, I am slowly getting to my goals :o)

Oh does JDK1.4 have support for full screen? Didn't even know about it, just played by the rules like I've always done with Java (no full screen, no hardware acceleration etc..:).

About the double buffering thingy, when you draw hundreds of shapes (faces) to a JComponent that is (natively) double buffered it starts to flicker inherently. I thought this was supposed to be fixed so Java never ceases to amaze me! Is this a known bug or am I doing something terribly wrong?

Thanks about the tip about BufferedImage, I've looked a bit into it earlier and came to the same conclusion. An another idea that crossed my mind today, however, was to use Java2Ds GradientPaint. I've never used anything from the Java2D library so I don't know if this would even work, so it's just an idea that crossed my mind. Could anyone who has used it post how fast it is? I don't want to spend some hours writing code for it at this point just to find out it's crawlingly slow...

Oh, and sorry about the lightning stuff, I try to be as correct as possible when writing posts in english but sometimes these things just slip by :) I am very glad that I am not american though, hehe.

Later dudes.
8  Java Game APIs & Engines / Java 2D / Re: Is anyone interested in some APIs I've made? on: 2003-04-28 18:39:19
Sorry, I haven't slept for like ... 48 hours and my mood is what it is Smiley

I gotta head over to the bed right away.

'Nite all.

(BTW, it's infinitely times easier to make a HARDWARE (!!!) engine than a software one in case someone hasn't noticed it. The beauty with this is however that it can be incorporated into an applet without the need for any extra libraries (Java3D etc)).
9  Java Game APIs & Engines / Java 2D / Re: Questions about the way Java handles graphics on: 2003-04-28 18:37:01
Hmm that is a really really slow way of doing it.

When drawing horizontal lines Java can copy an entire section of pixels with a fast memcopy instruction into the double buffer. Most probably the filling instructions are built utilizing this method. (Note that I am not sure this really is the case (hence my questions), but I am 99% sure the above method is used).
Thus using dedicated drawLines() and fillXXX() would be heaps faster!

Peace Smiley
10  Java Game APIs & Engines / Java 2D / Major flickering with JComponent despite DB on: 2003-04-28 18:00:09

When I draw hundreds of shapes to a JComponent it starts to flicker like there was no double buffering at all.

I thought JComponents were natively double buffered? Could someone explain this erratic behaviour please...

Also, what is the best way to make a custom double buffering in Java? The first thing that comes to my mind is to have a copy of the JComponent in memory, draw to it and finally copy the contents of it into the original JComponent. Surely there is something more efficient?

11  Java Game APIs & Engines / Java 2D / Re: Questions about the way Java handles graphics on: 2003-04-28 17:56:59
Hi and thanks for the answer.

I am making it purely in software so I don't want to use ANY libraries from Java3D or anything that has to do with OpenGL Smiley

One question though, why did you use setPixel()? What did you use it for?

12  Java Game APIs & Engines / Java 2D / Re: Is anyone interested in some APIs I've made? on: 2003-04-28 17:53:46
It seems the discussion is turning into an I've also made one of those-bragging sh*t.

I just asked if anyone needed some libraries so they wouldn't have to write the easy but dull stuff themselves.

And what the fock is the thing with competing with engines? If you are making an enging to "compete" with others, then the entire cause is wrong imho. Oh well, seems most programmers are out for internal glory :I

Over and out.
13  Java Game APIs & Engines / Java 2D / Is anyone interested in some APIs I've made? on: 2003-04-27 21:41:41
Hello, I have never browsed any sites about Java gaming before so I am pretty much in the dark here.

I have made some libraries of objects that do various things, for example synchronised input libraries, a library that loads plugins and import filters dynamically (great for adding third party import filters without the need to recompile a project), library for storing stuff into text files with a structure reminding of ini-files (with support for multi-dimensional arrays) etc. Not too complicated stuff but nice as you won't have to write them yourself.

I am also writing a software 3d polygon engine which I could give away later if anyone is interested.

So I wonder if there is any demand for this kind of stuff in the Java gaming community? I could wrap them into Jars if anyone is interested.

14  Java Game APIs & Engines / Java 2D / Questions about the way Java handles graphics on: 2003-04-27 21:18:11
Hello, I am new here so bear with me Smiley
I have some questions which I'd like to get answered. They are all about JComponent.getGraphics() (Graphics.XXX()) function calls. I am making a 3d engine so I'd like the most efficient solutions.

1) How does Java handle drawing outside of a component's boundaries? I'd like to know this so I can decide if it's more efficient to write a clipping function to remove the data outside the boundaries or just let Java draw outside the boundaries. There are three scenarios as far as I can see:

*) Java clips automatically and skips the drawing instruction - thus rendering the need of a separate clipping function in the XY-plane unnecessary. I find this most probable.

*) Java tries to draw outside the boundaries with the same speed as drawing inside the boundaries.

*) Java tries to draw outside the boundaries with an impact on speed, thus validating the use of a separate clipping function.

**** EDIT ****
After some testing, I found out JComponents are almost certainly clipped by Java. That's good news...

2) How does Java fill shapes; does it use some sort of scan conversion algorithm or a flood filling algorithm?
If the later is correct; how fast is it? Would a custom made filling function for filling shapes speed up things?

3) How does Java double buffer JComponents? Is it acceptable to use the built in double buffering or should you make an own function for it?

Any more things I should take into account? I have got a wireframe 3d engine to work, and am in the process of adding support for solid shapes.

**** EDIT ****
It now supports solid shapes and lightning Smiley

Tommi Kiviniemi from LuleƄ, Sweden Smiley
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.

atombrot (25 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (58 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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 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‑
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!