Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (404)
games submitted by our members
Games in WIP (289)
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  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-03-22 18:24:00
Finally, we have some extra artwork!!:

Izzy in a killing spree:



City where Izzy lives:

We are still fighting with the house mapping:

click here for full size image!
https://dl.dropbox.com/u/96150028/blog/update_maraton/img4.png
2  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-02-27 05:55:23
Yes, I agree with you, but realize that if you try to fake 3D perspective with 2D drawings, you will have that problems allways at some point. We inspired ourselvels in games like treasure adventure world or a boy and its blob. They have that type of "bad perspectives", but the final result is fine enough:

(second 45)

<a href="http://www.youtube.com/v/AOgwi0w7O7w?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/AOgwi0w7O7w?version=3&amp;hl=en_US&amp;start=</a>
3  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-02-26 06:00:24
Hi!

Thanks! if you have any question anytime please ask me!

I discovered Spine a few days ago and it looks awesome, it a really professional tool. We have been talking a lot about that: should we draw all the frames or use a skeleton system?. Maria thinks that the movement can appeal more natural by drawing all the frames. Also, she is learning a lot about animation Tongue.
4  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-02-25 05:20:49
Jimmt, you gonna love this update!

We have been working all this month trying to figure out how to use perspective correctly. We wanted to do a modular scheme: create any room size from a few tiles.

The first attempts gone quite bad: everything was too complicated and looked broken:


After a while, we tried to simplify the idea as much as possible:

With this new set we finally managed to get nice results:


Also, we have updated the map builder with several tools that we realized they are very useful like undo/redo, add invisible colliding elements, dragging elements or copy/move big level areas:

<a href="http://www.youtube.com/v/QXSJQjKMnJg?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/QXSJQjKMnJg?version=3&amp;hl=en_US&amp;start=</a>


PS. Maria is still working hard trying to improve Izzy's animation as much as possible. As we are not rich she has to use cheap, not orthodox methods:

5  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2013-01-26 23:25:59
Ok, my fault, I just tried it again and it works nice. I dunno why I assumed that. Maybe because I just started using music.


About the delay, 50 ms were also fine for removing the crackling. I didn't noticed any lag (core i5 laptop and core i7 desktop, both java 1.7). Maybe just happens with slower computers or other JVM. Why does it happens? because the computer takes a lot of time filling the whole buffer for the first time? Interesting. I will take a look again at the code.

BTW, as I saw in your page, you are doing your PhD, right? good luck!! I wish you to publish a lot of papers Tongue
6  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-01-26 22:42:58
Hi! we added sound capabilities inside the game thanks to the Tynisound library. It worked great! We added environmental sounds.

<a href="http://www.youtube.com/v/JDQMgKrNmbw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/JDQMgKrNmbw?version=3&amp;hl=en_US&amp;start=</a>
7  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2013-01-26 22:17:47
Hi again! yes, that maybe would work too, but inside the kuusisto code, UpdateRunner method doesn't need an accurate loop, just a (more or less) regular loop for filling the buffer, so just increasing the buffer size is enough

Also, I've been working some more with this library. I found  (in my opinion) an important limitation. As I can understand, by now, a sound cannot be played twice simultaneously. You need to load different sounds with the source file (waste of memory).

What I did is just add to the SteamMusic/MemMusic/SteamSound/MemSound a new method called getInstance() This method return a new music/sound that shares the source data. This is a quite small code addition:


1  
2  
3  
4  
           
        public MemMusic getInstance(){return new MemMusic(left,right,mixer,lengthSeconds);}

        public MemSound getInstance(){return new MemSound(left,right,mixer,tinysound.TinySound.getSoundID(),lengthSeconds);}



But was very useful for adding environmental sounds when the same sound comes from several different locations

8  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2013-01-17 05:19:15
Hi kuusisto, I've to say that you made a great work with this library. It not only gives just what I wanted and nothing more but it is also so clearly written!! I love it.

My congratulations. We definitely will be using it in Izzy's Revenge.

I have just one comment. In my desktop the library worked OK, but in my laptop I noticed some serious crackling, quite annoying.

I have been checking your code. It seems that in UpdateRunner class, you read data with a 25ms buffer. Then you perform a Thread.sleep(1);

It is know that sleep command in several windows machines totally sucks, in my laptop, sometimes Ihave more than 30 ms sleep after calling Thread.sleep(1);

Increasing maxFramesPerUpdate for storing up to 100ms of data per iteration into audioBuffer worked great! No more crackling, the music became smooth and perfect.

So, if there is not any extra problem, maybe is a good idea for futures updates to increase the default buffer size from 25ms to 100 ms or even more.


9  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-01-08 17:36:36
Thanks all for your comments! The two artist are quite talented, but they don't work as much as I would like Tongue

Jimmt, the problems related with perspective were due the lighting system. I had to remake the shadowing part. Also, I added oval shadows at the bottom of the objects. Also, the builder is still pure 2D and (more or less) tile-based, so we have to fake the perspective.

For example, the floor is divided in two parts, the top part is just part of the background and the bottom part collides with the character:


Anyways, we are just starting to map the levels, I'm sure that new problems will appear!!


About the distortion effect, it is made in a quite easy way. Even java 2D can handle it! Tongue It is just a particle generator (origin at the cyan square). The particles are fragments of the background image, with some shift. With a low alpha value they mix very well with the background:

10  Java Game APIs & Engines / Java 2D / Re: OpenGL VM flag degrade performance on Java2D??? on: 2013-01-08 06:11:05
alesky, I show you a skeleton of a canvas ready for drawing anything you want. I use a VolatileImage as a intermediate buffer. I set the same name you used. If you try it, it would be great some result comparison  Cheesy

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
public class Zoom_canvas extends Canvas {
   
   
     

    protected BufferStrategy buffer;  //BufferStratrgy
   protected VolatileImage dbImage ; //VolatileImage as intermediate buffer

   

    public Zoom_canvas() {   //constructor
       this.setIgnoreRepaint(true); //we repaint manually
       this.setFocusable(false);

        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration();
        dbImage = gc.createCompatibleVolatileImage(this.getWidth, this.getHeight, Transparency.TRANSLUCENT); //initialize the VolatileImage
   }

    public void dispose() {
        buffer.dispose();
    }

    public void Init() { //call this before starting game loop, it initializes the bufferStrategy
       createBufferStrategy(2);  //double buffering
       buffer = getBufferStrategy();
    }

    public void PerformDraw() {  //public drawing method, call this from your game loop for update image

        Graphics g;
        try {
            g = buffer.getDrawGraphics();
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }
        this.paint((Graphics2D) g);
        g.dispose();

        if (!buffer.contentsLost()) {
            buffer.show();
        }
    }

    private void paint(Graphics2D g) { //real drawing method

        super.paint(g);

        Graphics2D ga = (Graphics2D) dbImage.getGraphics();
        ga.setBackground(new Color(0, 0, 0, 0));
        ga.clearRect(0, 0, dbImage.getWidth(), dbImage.getHeight()); // we clear the intermediate buffer

//===============================        
//... TO DO, ADD dome drawing here using "ga"!!!
//===============================
       ga.dispose();

        g.drawImage(dbImage, 0, 0, null);
        g.dispose();
    }
}
11  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2013-01-08 05:08:04
I just finished a simple way of doing hot air or water distortion effects in Java 2D. It is made with a particle generator, where the particles are portions of the original screen slightly translated and very transparent:

<a href="http://www.youtube.com/v/tpKI_l8OgI4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/tpKI_l8OgI4?version=3&amp;hl=en_US&amp;start=</a>
12  Java Game APIs & Engines / Java 2D / Re: OpenGL VM flag degrade performance on Java2D??? on: 2013-01-07 18:18:53
Oh, yes! davedes post remind me an important thing. Sometimes Java2D cannot recognize the hardware, so the direct3D pipeline cannot be activated. This happens for example in laptops with nvidia optimus.

You can solve this with the environment variable J2D_D3D_NO_HWCHECK=true, so you deactivate any hardware checking and pipeline can be enabled.

I would love to try java2D in more computers. But yes, it seems that if you go outside standard configurations, weird things can happen. That makes development more thrilling  Grin
13  Java Game APIs & Engines / Java 2D / Re: OpenGL VM flag degrade performance on Java2D??? on: 2013-01-07 18:07:06
Hi alesky!

I've been working a little bit with an intel HD3000 with Java2D in my laptop (JDK 7 and Windows 7) and:

I tried both flags: for using direct3D and openGL pipeline with:

    System.setProperty("sun.java2d.opengl", "True"); or    System.setProperty("sun.java2d.d3d", "True");

And I get much better performance with direct3D pipeline.

Also, I have to say that, for some reason, the global performance of intelHD with java2D is quite bad, maybe is a driver issue. I have also a Nvidia GT520 in the laptop. In theory Nvidia GPU is not much better than the intel HD, but the performance in java2D is much better, maybe 5 times faster. Also, sometimes, the intel behaves weirdly. The performance suddently drops when I add some extra pictures.

-------------------------------------------

About the code you show. Several months ago a did many microbenchs in order to get the best performance with java2D, but I don't remember all the details.

You use a jPanel for drawing the stuff?. Did you tried to use a BufferStrategy over a canvas instead? As far I remember it gives better performance.

Ok, then you apply a set of affineTransforms, right?, so you create an intermediate BufferedImage called "filtered" with all the changes. Do you tried directly to draw the image to dbg without creating that "filtered" image?

something like this:

dbg.scale(scaleX,scaleY);
dbg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,desired_alpha));
dbg.drawImage(image,brightness_operation,posX,posY);



also, are you creating a new image each cycle?

"dbImage = JPanel.createImage(pWidth, pHeight); // create the double buffer immage"

Why don't you reuse it, I found that the command clearRect is really efficient for clearing an image, is even more efficient than fillRect.

//-----------------------------

I would not mind to take a look at your full code, I enjoy optimizing Tongue

Cheers.
14  Java Game APIs & Engines / Java 2D / Re: quickest most effecient way to darken/lighten image on the fly? on: 2013-01-06 20:18:48
One is using LookUpOp operations. The other is just draw something on top (like a rectangle, or initialized VolatileImage) filled with a certain color with a certain alpha. You fill it each time so the alpha can be changed anytime.

Interesting what you are saying. TBH I just look at the rendering time of my loops for evaluating the algorithms.  I didn't got any noticeable FPS drop with the lookupOp. Drawing a layer over caused more FPS drops, specially in low end GPUs like an intel HD3000.  My desktop uses a mid/high-range GPU: a GTX460.

15  Java Game APIs & Engines / Java 2D / Re: quickest most effecient way to darken/lighten image on the fly? on: 2013-01-06 19:41:29
I agree that, for a serious game, Java2D is not the best option, as it has several serious flaws. But it is perfectly able to handle 60 frames per second when the graphics are not very complicated.

<a href="http://www.youtube.com/v/wfh_jN23jfA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/wfh_jN23jfA?version=3&amp;hl=en_US&amp;start=</a>

In this video I use two techniques for changing object brightness on the fly. The orange region has on top a layer wich alpha is changed dynamically. The gray part uses the technique I mentioned before.  
16  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2012-12-30 08:54:32
Hi all! Today I want to show you some artwork of our level artist. The first level of the game is Izzy's house, wich is will be used for introducing the game history and gameplay.

It was quite hard to decide the art style, specially if we should do a pure 2D (side view) game or add some perspective to the levels. At the end we decided to choose the second option, although it forced us to do some modifications in the game engine.





You can see full post here: http://www.indie4fun.com/post/39200643151/backgrounds-izzys-house-pablo
17  Java Game APIs & Engines / Java 2D / Re: quickest most effecient way to darken/lighten image on the fly? on: 2012-12-29 09:09:59
In my opinion, an efficient way of doing this in java2D/windows is using the drawImage with a LookupOp operation


 LookupOp LU;
...
g.drawImage(image,LU,posX,posY);

by modifying the LookupOp you can change the image brightness:


e.g. Darken image, half of the brightness:

            brightnessBloq=new byte[256];
        for(int i=0;i<256;i++){brightnessBloq=(byte)(i/2);
        LU = new LookupOp( new ByteLookupTable(0,brightnessBloq), null);

later, by just modifying values of brightnessBloq array, it automatically change the brigtness fo the next painted image.

Also, I agree that if you want good performance with high resolutions, java2D can be a little bit problematic Tongue

BR


18  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2012-12-16 19:07:22
I convinced the artist to improve the animations Wink, meanwhile i've been working on a configurable particle system. We want to use them for many effects, like smoke, fire or blood:



<a href="http://www.youtube.com/v/yvo5RbQQ4u0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/yvo5RbQQ4u0?version=3&amp;hl=en_US&amp;start=</a>

We tried to add as many configurable parameters as possible, like disperssion, external forces, or random selection of different particles:

19  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2012-12-11 06:04:30
Thanks!! I personally agree with you! The artist wanted to speed up the final part, but she has to add at least one extra frame.
About the final position, good point, maybe we have to thing about it a little bit more.


P.S. Beheading is also being considered, I'm figuring out how to implement this:
20  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2012-12-10 18:16:23
While I'm adding  new features into the game, one of our artists is having fun making death animations!



21  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2012-12-01 22:28:16
Hi! while the artists are reworking Izzy's animations and designing the first level. I've been working on a trigger system. We want to add several features via buttons and invisible triggers like objects movement, lighting effects or monster spawning. I 'm working on some type of trigger that allows any combination of such events:


We have some of them already implemented:

<a href="http://www.youtube.com/v/qudTf59hGiA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/qudTf59hGiA?version=3&amp;hl=en_US&amp;start=</a>
22  Games Center / WIP games, tools & toy projects / Re: [WIP] Izzy's Revenge on: 2012-11-19 18:28:09
Thank you very much for your comments.

Once we have new gameplay/demo I will upload it.

23  Games Center / WIP games, tools & toy projects / [WIP] Izzy's Revenge on: 2012-11-18 15:19:11
Hi all!


I want to indtroduce you Izzy's Revenge, a 2D HD platformer I'm making with my gf and a couple of friends.

I'm making it using plain Java2D. Yes, yes I know most of you recommends not to use it, but I take it as a personal challenge Tongue.

This is still a very preliminary WIP, we started this summer and we can only spend spare time after our real jobs/studies Sad

I'm very thankful to this forum for several tips I learned from it, speacially how to make some fake lighting (http://www.java-gaming.org/index.php?topic=26851.0).




Gameplay video:
<a href="http://www.youtube.com/v/tud_iisxS2U?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/tud_iisxS2U?version=3&amp;hl=en_US&amp;start=</a>



any comment will be appreciated, thank you!!
24  Java Game APIs & Engines / Java 2D / Re: Java 2D Fake Lighting on: 2012-08-20 00:04:45
Hi!

Thank you very much for your idea! I was looking for a very fast way of performing lightning an shadows. I managed to do dynamic shadows by clipping the light sprite:

Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (33 views)
2013-05-17 21:29:12

alaslipknot (42 views)
2013-05-16 21:24:48

gouessej (72 views)
2013-05-16 00:53:38

gouessej (71 views)
2013-05-16 00:17:58

theagentd (79 views)
2013-05-15 15:01:13

theagentd (74 views)
2013-05-15 15:00:54

StreetDoggy (114 views)
2013-05-14 15:56:26

kutucuk (138 views)
2013-05-12 17:10:36

kutucuk (138 views)
2013-05-12 15:36:09

UnluckyDevil (146 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.254 seconds with 21 queries.