Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6 7 ... 10
 41 
 on: 2017-02-22 10:29:59 
Started by cygnus - Last post by kappa
Someone posted this article a while back.

Its a very good read for your problem, especially if you are trying to decide whether to use quad trees for collision detection.

 42 
 on: 2017-02-22 08:49:06 
Started by numerical - Last post by numerical
thanks works now with the toolkit

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  
package DrawImage;   

import java.applet.Applet;
import java.awt.*;

public class Load extends Applet
{
   private Image img;  

   public void init()
   {
      img = null;
     
   }
   public void loadImage()
   {
      try
      {
         img = Toolkit.getDefaultToolkit().getImage("src//DrawImage//java.gif");;
      }
      catch(Exception e) { }
   }
   public void paint(Graphics g)
   {
      if (img == null)
         loadImage();
      g.drawImage(img, 0, 0, this);
   }
}

 43 
 on: 2017-02-22 07:56:30 
Started by vfmachado - Last post by Spasi
LWJGL does not have a complete, integrated solution that you could label a Swing/JavaFX replacement. What it does have is bindings to libraries that solve parts of the equation:

- Windowing system and input: GLFW
- Dialogs: nativefiledialogs (nfd) or tinyfd
- UI components: nuklear
- UI layout: Yoga (in 3.1.2 snapshots)
- Vector graphics (canvas/Java2D-style): NanoVG
- Image IO: stb_image
- Font rendering: stb_truetype

It's obviously quite a bit of work to learn and integrate some or all of the above, but it's entirely possible. They are all lightweight solutions and there are no interop issues with OpenGL.

 44 
 on: 2017-02-22 07:38:06 
Started by numerical - Last post by Riven
Not sure why you think you have to use "//" -- did you see "\\" and attempt to swap the slashes to make it cross-platform? Simply use "/"

That will be the first step to solve your problem. This thread will help you with the next steps:
http://www.java-gaming.org/topics/faq-cannot-find-the-resource-file/33226/view.html

 45 
 on: 2017-02-22 07:20:46 
Started by numerical - Last post by numerical
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  
package DrawImage;

import java.applet.Applet;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.net.URL;
import javax.imageio.*;
 
public class LoadWindows extends Applet {
 
     private BufferedImage img;
 
     public void init() {
         try {
             URL url = new URL(getCodeBase(), "src//DrawImage//java.GIF");
             img = ImageIO.read(url);
         } catch (IOException e) {
             System.out.println(e);
         }
     }
 
     public void paint(Graphics g) {
       g.drawImage(img, 50, 50, null);
     }
}


here is the code with exception and it says:"javax.imageio.IIOException: Can't get input stream from URL!"

 46 
 on: 2017-02-22 07:18:07 
Started by cygnus - Last post by Riven
Use grids. They have a lot less cache-trashing, and the logic is trivial. You will have quite a lot of empty cells, but that's OK.

 47 
 on: 2017-02-22 04:13:22 
Started by cygnus - Last post by cygnus
Hello!
I was reading a post on optimization of collision detection and I read that a quadtree isn't a good choice after 1000 or so objects. Sadly, I have already spent a while implementing one and my game, by the end, should have many, many entities being moved around simultaneously. If you have played the game Factorio, it is much like this - for those who don't know, a large source of lag in Factorio is thousands of items moving along conveyor belts. Is the impact of a Quadtree likely to make this performance even worse, and, if so, what should I use?

 48 
 on: 2017-02-21 22:29:00 
Started by Archive - Last post by TGStudiosDE
Sounds interesting and I'm excited to build some 3D examples with the FFP Engine! Smiley

 49 
 on: 2017-02-21 20:23:22 
Started by princec - Last post by Icecore
Hm, maybe pack Game resource in some 1 big file with ".pak” extension
and make updates downloading new .pak files above

like big games do (blizzard games)
they have every new update as 1 file

but because error happens in 0.001% users – no one's care XD

up: + Add files hash check - if file corrupted - redownload it
its easy to integrate)

 50 
 on: 2017-02-21 19:59:00 
Started by princec - Last post by princec
The problem was that he had some files mingled in with his distribution somehow - nothing one can really do about that.

Cas Smiley

Pages: 1 ... 3 4 [5] 6 7 ... 10
 
numerical (155 views)
2017-02-21 07:32:16

numerical (155 views)
2017-02-21 07:31:46

theagentd (262 views)
2017-02-18 13:42:33

theagentd (264 views)
2017-02-18 13:35:16

h.pernpeintner (1432 views)
2017-01-24 22:39:11

h.pernpeintner (1416 views)
2017-01-24 22:38:32

Galdo (1979 views)
2017-01-12 13:44:09

Archive (2035 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2572 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2329 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!