Java-Gaming.org Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (672)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
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] 2 3 ... 6
1  Discussions / General Discussions / Re: Game research - 4x and card games on: 2016-04-16 16:50:37
I'd love to see those results for sure!  Wink
2  Discussions / Miscellaneous Topics / Re: What's your "game dev dream" on: 2016-02-21 19:43:17
I wanted a Java based gaming console!

It should be called "The Kettle" as it would use an OS dedicated to optimising the virtual machine to run Java (Coffee).

Too bad steam already exists, or that would've been the ultimate name for the OS on this thing xD.
3  Games Center / WIP games, tools & toy projects / Re: Heroes of Loot 2 on: 2016-01-20 11:26:58
Consider it done  Wink
4  Game Development / Newbie & Debugging Questions / Re: How to rerender a VBO? on: 2016-01-17 21:14:49
Not really a direct answer to your question, but I certainly do suggest you take a peek at Thinmatrix's tutorials where he explains the use of VBOs and writes you basically the sample code needed.  Pointing
5  Games Center / Showcase / Re: Space Grunts - turnbased with a twist on: 2016-01-14 20:53:12
I love the graphics and the general feel! Nice work!  Pointing
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-01-12 18:18:14
was looking for a faster way to weld mesh vertices, end up with a kdtree nearest neighbour search and wrote a debug-renderer for it :

You are awesome.
There. It has been said.  Wink
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-10 08:04:30
I have been learning the basics of 3D games in LWJGL (Only ever made 2D game) and wow....there is so much to learn and so....soooo much maths xD

Same here. Been tinkering with LWJGL for a few weeks now, and it's really fun! I do keep bumping in to little mistakes I made earlier and then having to figure out what the problem is. Usually it's my own stupidness xD. However the maths is really something to wrap your head around, I'm no genius on that level...
8  Games Center / Showcase / Re: Block Shooter on: 2015-11-25 20:58:45
My advice: Make a game YOU would want to play.

IMHO making games should be fun.  Wink
9  Games Center / Showcase / Re: Block Shooter on: 2015-11-10 21:23:09
Nice! Somehow it reminds me of a certain game, but I'm having a hard time recalling what it is...  Wink
10  Discussions / General Discussions / Re: Programmer jokes on: 2015-11-05 06:18:54
I think this thread might be recursive...
11  Games Center / Showcase / Re: Random Big Rich Man on: 2015-10-24 11:22:53
you might not want to publicly post toy projects like this one
Now you just have to make the pieces into avatars that people can buy hats for, and you'll be a millionaire! :p

Then he'll be the Random Big Rich Man Cheesy
12  Discussions / General Discussions / Re: Programmer jokes on: 2015-10-14 08:52:49
@Roquen That basically sums up my student life Cheesy
13  Game Development / Newbie & Debugging Questions / Re: Best Way to Implement Music and Effects in Java 2D Game on: 2015-10-10 14:10:02
Using a thread for a sound is quite mandatory.

E.g. If you want to play a sound 2 seconds in length after you level up and you play it in the same thread as you use for picking it up and finishing the rest of your game logic you'll end up with a 2 second delay, i.e. everything in your game will stop for 2 seconds untill you've finished playing your sound.

It doesn't really impact a lot on your performance when you're using threads with care, even if there are a substantial amount of them.
14  Game Development / Newbie & Debugging Questions / Re: Change Scene on: 2015-10-08 10:43:40
Exactly. And when you change your level you can reassign the currentLevel variable to a different instance of a level.
15  Game Development / Newbie & Debugging Questions / Re: Change Scene on: 2015-10-08 07:35:02
You might not want to do that. Assume you have 250 levels. That would mean that you get a massive switch statement. Let's say you have 3 things to do (render level, render player, render entities) for every level. You'd get 750 lines of code (minimum) to run through. It would be very inconvenient to do so.

A better way of doing it would be making an abstract class for a Level, in which you define the basic methods and fields for a level. Then you make a class which inherits Level, and you fill that in with specific details for your actual level. That's the level you render in the gameloop defined above.

It would look something like this:
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  
public abstract class Level {
   protected int x, y;
   protected int width, height;
   protected List<Tile> tiles;
   
   public Level(int x, int y, int width, int height) {
      this.x = x;
      this.y = y;
      this.width = width;
      this.height = height;
   }
   
   public void initialize() {
      tiles = new ArrayList<Tile>();
   }
   
   public void update(int delta) {
      // update stuff here.
   }
   
   public void render(Graphics g) {
      g.fillRect(x, y, width, height);
   }
}

public class SpawnLevel extends Level {
   private int uniqueX, uniqueY;
   private int uniqueWidth, uniqueHeight;
   
   public SpawnLevel(int x, int y, int width, int height) {
      super(x, y, width, height);
   }
   
   // Let's assume the render method of SpawnLevel does something special, we can override the
   // render method from the super class and add some unique rendering stuff to it.
   public void render(Graphics g) {
      super.render(g);
      g.fillRect(uniqueX, uniqueY, uniqueWidth, uniqueHeight);
   }
}


You might want to look into design patterns. Here's a good book on it:
http://shop.oreilly.com/product/9780596007126.do
16  Games Center / WIP games, tools & toy projects / Re: Questica -- A procedurally generated rpg adventure! on: 2015-10-06 08:49:04
Those graphics! :O

Nice work! Really looking forwars to more.
17  Game Development / Newbie & Debugging Questions / Re: Change Scene on: 2015-10-06 07:09:46
Basically you could do it like this:

Create a Canvas object. It's up to you if you want to put your Gameloop in the same class or not, but to make things easier let's assume you do.

Next up is creating the render and update method in your canvas object (and again, for the sake of ease I'll put these in the Canvas object). Now when you want to render for example a set of squares that is part of your level, you can create a Level object that contains the data for that set of squares. Each time you want to draw this specific level you can call the render method within that level, which renders all the squares you need.

This way you'll end up with something like this:

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  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
public class Game extends Canvas implements Runnable {
   private boolean running;
   private Thread mainThread;
   
   // your current level that contains all the level data you want to render:
   private Level currentLevel;
   
   public Game() { }
   
   public void start() {
      if (running)
         return;
      mainThread = new Thread(this);
      mainThread.start();
   }

   public void stop() {
      if (!running)
         return;
     
      try {
         mainThread.join();
      } catch (InterruptedException e) {
         e.printStackTrace();
      }
   }
   
   public void run() {
      // example gameloop. DO NOT USE!
     
      while (running) {
         update(0);
         render();
      }
   }
   
   public void update(int delta) {
      // update logic here.
      level.update(delta);
   }
   
   public void render() {
      BufferStrategy bfs = getBufferStrategy();
     
      if (bfs == null) {
         createBufferStrategy(3);
         return;
      }
     
      Graphics g = bfs.getDrawGraphics();
      g.clear();
      currentLevel.render(g);
     
      g.dispose();
      bfs.show();
   }
}

public class Level {
   private List<Rectangle> squaresToDraw;
   
   public Level(int width, int height) {
      for (int i = 0; i < 10; i++) {
         squaresToDraw.add(new Rectangle(i * 10, i * 10, 10, 10));
      }
   }
   
   public void update(int delta) {
      // update stuff.
   }
   
   public void render(Graphics g) {
      for (int i = 0; i < squaresToDraw.size(); i++) {
         g.fillRectangle(squaresToDraw.get(i));
      }
   }
}


And for a decent Gameloop you can take a look here:
http://www.java-gaming.org/index.php?topic=24220.0

The easy thing you can do now is changing the currentLevel variable in order to render a different level.

I hope this helps. Any questions are always welcome. Good luck and happy coding Smiley
18  Java Game APIs & Engines / OpenGL Development / Re: Should I learn Shaders? What can and can't be done with shaders. on: 2015-09-30 14:05:19
Although I do not have a lot of shader experience I can only encourage the usage of them Wink

It takes quite some time to learn, but as far as I can see the principle behind shaders is the future of game development.
19  Game Development / Newbie & Debugging Questions / Re: libGDX weird player moving away from camera! + collision dont work on: 2015-09-30 13:27:53
1  
2  
3  
if(blocks[x][y].contains(p1) || blocks[x][y].contains(p1)){
    return true;
}


Might it have something to do with this? You're calling
1  
blocks[x][y].contains(p1)
twice instead of calling p1 first and then p2 like this:

1  
2  
3  
if(blocks[x][y].contains(p1) || blocks[x][y].contains(p2)){ <-- HERE :)
    return true;
}


EDIT: You're calling this in the Collision class. Sorry for not mentioning.
20  Game Development / Newbie & Debugging Questions / Re: libGDX weird player moving away from camera! + collision dont work on: 2015-09-30 13:22:25
When do you call the fallPlayer method?
21  Game Development / Newbie & Debugging Questions / Re: libGDX weird player moving away from camera! + collision dont work on: 2015-09-30 13:11:53
The video is private, perhaps you should change that might you want us to see it Wink
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-29 07:10:56
Nobody can argue with a software named TIGERVENOM right?

Let's argue with the software from Longarmx! Oh no wait, his software is named TIGERVENOM, this guys's serious, don't argue with that!

 Wink
23  Games Center / Contests / Re: [Idea] Would anyone be interested in a Pure Java game jam? on: 2015-09-26 14:54:16
I didn't get to the point of making a game, however for school we're doing the Google AI Challenge 2010, and I made a tool in Java2D for graphs and stuff, which is pretty cool.
24  Games Center / Contests / Re: [Idea] Would anyone be interested in a Pure Java game jam? on: 2015-09-19 14:40:22
I might tune in at the end of the week, but I'm not making any promises Wink
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-16 07:21:38
@basil_ That looks truly amazing. I just sat here staring at my screen for a couple of minutes and admiring your work Smiley Thank you!
26  Games Center / Showcase / Re: Elevox - Early Demo on: 2015-09-09 12:35:25
This game really reminds me of Cubeworld. I had a really good time playing that game.
I didn't play it for long, but I did enjoy it so far Smiley
27  Games Center / Contests / Re: [Idea] Would anyone be interested in a Pure Java game jam? on: 2015-08-20 09:59:29
<slowpoke>I'd be really interested</slowpoke>

But indeed not too soon after LD Smiley
28  Discussions / General Discussions / Re: Resizing a picture but still keeping it look pixelated? on: 2015-06-25 20:20:00
If you have the scale tool selected, you can choose the interpolation type in the Tool Options dialog. It defaults to Cubic, but if you set it to Linear or None, you can get what you're looking for. (not sure which one it was, just test it out Smiley)
29  Discussions / General Discussions / Re: Resizing a picture but still keeping it look pixelated? on: 2015-06-25 20:14:51
Use GIMP 2. It has functions to resize and you can use different kinds of filters (interpolation, etc.) that allow you to do what you needed without having a PS or aload of work Smiley
30  Discussions / Miscellaneous Topics / Re: What IDE colour theme do you use? on: 2015-06-17 19:40:52
What I don't like about the eclipse themes is that they don't darken the controls (i.e. the buttons, controls, borders etc.) I figure there must be a way to do this, but I haven't figured it out yet. Any ideas?

On a side note: I prefer a dark theme too. I really enjoy the dark theme of Visual Studio and I wish I had that same look in Eclipse.

Smiley
Pages: [1] 2 3 ... 6
 
IanParcs (47 views)
2016-04-18 14:18:53

KaiHH (45 views)
2016-04-18 08:35:41

KaiHH (75 views)
2016-04-15 12:43:58

theagentd (78 views)
2016-04-14 02:16:17

theagentd (93 views)
2016-04-14 02:15:43

IanParcs (105 views)
2016-04-12 03:51:16

IanParcs (47 views)
2016-04-12 03:50:03

IanParcs (43 views)
2016-04-12 03:49:54

IanParcs (38 views)
2016-04-12 03:49:52

IanParcs (48 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30
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!