Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (581)
Games in Android Showcase (163)
games submitted by our members
Games in WIP (632)
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 ... 49
1  Discussions / General Discussions / Re: Rayvolution's JGO Appreciation Thread (AKA: Free copies of Retro-Pixel Castles!) on: 2015-05-27 12:34:36
I should have appreciated you months before Ray. Is that key still valid? And by the way, I couldn't get steam to run on Windows 10, it always can't find the internet connection, while all my other apps can access it pretty fine. Anyone know a workaround?
2  Discussions / Miscellaneous Topics / Re: What are your current personal projects? on: 2015-05-26 12:08:07
SilenceEngine. Working daily on it since the last 6 months. Some screenshots of games I made and/or being made:









My other project that I'm doing in parallel with SilenceEngine is practicing art. In all the screenshots above, all the art is mine. I MADE THAT ON MY OWN!!!!
3  Game Development / Newbie & Debugging Questions / Re: Image loading troubles on: 2015-05-21 11:20:58
Use the [code] tag to wrap code.
4  Games Center / Showcase / Re: Pinball Game on: 2015-05-16 05:10:55
It's really really fun. High-score!!



Is this actually written in Java? I doubt that.
5  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-09 04:16:32
And the threadkiller where these are coming from: http://stackoverflow.com/questions/1995113/strangest-language-feature
(although not all are syntactical)

So you found it! You made me  Lips Sealed (mute)

 Grin
6  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-09 03:55:16
Also some more things I've seen: First in PHP, the function names (and also class names) aren't case sensitive, but variables are.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
function add($a, $b)
{
    return $a + $b;
}

$foo = add(1, 2);
$Foo = Add(3, 4);

echo "foo is $foo"; // outputs foo is 3
echo "Foo is $Foo"; // outputs Foo is 7

And now in Python 2.x, you can make a True a False with an assignment.

1  
2  
3  
>>>True = False
>>>True
False

This is no longer in Python 3, now that creates a syntax error. I was almost scared when I found that in a blog post some time ago.
7  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-09 03:44:31
They should have really made both a pointers. Really. Stumbled upon that a lot of times while in lab.
8  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-09 03:33:37
And this one is in Java. I'm sure most of the people don't know this.

1  
2  
3  
4  
int[] numbers()
{
    return null;
}

is the same as

1  
2  
3  
4  
int numbers() []
{
    return null;
}
9  Discussions / Miscellaneous Topics / Re: Most unusual/weird syntax features in non-joke languages on: 2015-05-09 02:28:23
I'd start with C, and arrays. Since arrays are decayed to pointers before compilation, this syntax is very valid.

1  
printf("%d", 5[a]);  // Where 'a' is an array

My next one is from Javascript:

1  
2  
console.log('5' + 3);  // 53
console.log('5' - 3);  // 2

This one is really weird, and I consider this as an undefined behaviour. See this for proof in chrome console:

10  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-08 16:18:40
 Roll Eyes Achieved 150 days of GitHub streak today Shocked



My GitHub Profile if you're interested to see.  Pointing
11  Java Game APIs & Engines / OpenGL Development / Re: Resources for OpenGL 3.3+ and LWJGL? on: 2015-05-06 12:11:42
LWJGL provides all the things that are necessary to interfere with OpenAL, OpenGL and OpenCL, by providing bindings to those libraries to us. It will take care of the display, input and the contexts. Everything else is left to you to implement, giving you full complete control over the app/game that you are going to develop with it.

LibGDX, on the other hand, is a game framework, it contains different game related goodies for you, like the SpriteBatch, the texture, and other classes that allows you to develop games more easily, providing tools for like collision detection, graphics, animations, game loops and more. And LibGDX uses LWJGL as one of it's backends on the desktop.
12  Java Game APIs & Engines / OpenGL Development / Re: Resources for OpenGL 3.3+ and LWJGL? on: 2015-05-06 11:39:40
Some self promotion: I'm writing a tutorial series on LWJGL3 wth OpenGL 3.3 core profile on my website.

http://goharsha.com/lwjgl-tutorial-series/
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-05 17:28:09
I tried (and achieved) doing multi-threaded application using GLFW (My OO wrapper for GLFW actually).



This uses immediate mode mainly since it is a test, but the other tests are indeed modern GL. Will soon update this one. Source code is available here: GLFWMultiThreadTest.java
14  Game Development / Newbie & Debugging Questions / Re: Getting errors in CMD on: 2015-05-03 01:17:12
Suppose you have a folder called as root, the root of your project files. If your main class has no package, then the location would be

1  
2  
3  
4  
<root> $ dir
Test.java
Test.class
<root> $

Now if your class is in a package, for example, say
com.me.mypackage
, then the location will be like this.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
<root> $ dir
com
<root> $ cd com
<root/com> $ dir
me
<root/com> $ cd me
<root/com/me> $ dir
mypackage
<root/com/me> $ cd mypackage
<root/com/me/mypackage> $ dir
Test.java
Test.class
<root/com/me/mypackage> $

Remember that you can only run these java classes from the root directory. So in the first case, you will call this.

1  
2  
3  
<root> $ java Test
Hello World ;)
<root> $

And even if you have any packages, you should be calling java from the first directory, i.e., root. Like this.

1  
2  
3  
<root> $ java com.me.mypackage.Test
Hello World ;)
<root> $

I hope now you understand what is wrong with your calls. Hope this helps.
15  Game Development / Newbie & Debugging Questions / Re: [Newbie]Need feedback on achieving smooth animation on: 2015-04-30 03:20:58
Yes, JPanel has built-in double buffering, but it doesn't support active rendering. You have to wait for the EDT to repaint the GUI for you.
16  Game Development / Newbie & Debugging Questions / Re: Getting started with game programming on: 2015-04-28 17:30:58
If you want to go learn LibGDX, our developer @dermetfan had an excellent series on youtube.

https://www.youtube.com/playlist?list=PLXY8okVWvwZ0JOwHiH1TntAdq-UDPnC2L

But as others have already said, you need to have a fairly good understanding of Java before you attempt any of those.
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-04-27 17:16:57
Wrote an IRC bot for fun. It is also a mini IRC client that I can use it to chat by sending manual commands by typing into the command prompt window.



Features right now are some basic commands, a calculator (based on Nashorn), SASL authentication, SSL connection. Had any more ideas that'd be cool to implement? Please tell me.
18  Game Development / Newbie & Debugging Questions / Re: [libgdx] Drawing gradient with vertices producing diagonal line artefact on: 2015-04-26 03:36:29
I meant that you could simulate (not the right word, correct me) the GL_QUADS which is deprecated using GL_TRIANGLE_FAN like this. I don't know how LibGDX does OpenGL, but it should be somewhat similar to this.

1  
2  
3  
4  
5  
6  
7  
8  
batcher.begin(Primitive.TRIANGLE_FAN);
{
    batcher.vertex(0, 0);  // Top left corner of quad
    batcher.vertex(w, 0);  // Top right corner of quad
    batcher.vertex(w, h);  // Bottom right corner of quad
    batcher.vertex(0, h);  // Bottom left corner of quad
}
batcher.end();

Then it will draw a QUAD using a TRIANGLE_FAN. The Batcher here is my replacement to the OpenGL's glBegin/glEnd interface that uses VBOs instead. This should work in my opinion.
19  Game Development / Newbie & Debugging Questions / Re: [libgdx] Drawing gradient with vertices producing diagonal line artefact on: 2015-04-25 17:33:58
Instead of using triangles, directly render a quad using GL_TRIANGLE_FAN. Then it should be only one shape, and the artifacts will be smaller I think. Not quite sure on this though.
20  Games Center / Showcase / Re: RoboFight - LD32 Compo entry on: 2015-04-22 16:25:48
@BurntPizza

The problem is, swing doesn't work well with LWJGL3, especially on Mac OS X. It just hangs the game.
21  Games Center / Showcase / Re: RoboFight - LD32 Compo entry on: 2015-04-22 15:53:01
@CommanderKeith

You can always redirect the output to the text file from command prompt. Use the redirection operator.

1  
java -jar RoboFight.jar > file.log

It is more simple. And didn't the output contained something like
<integer>: <description>
line? I guessed that there is one such line before the exception is thrown. Is there any such thing?
22  Games Center / Showcase / Re: RoboFight - LD32 Compo entry on: 2015-04-22 08:41:51
@CommanderKeith

I have updated the download links to the latest build with error callback. I think this should find out what the error is. Will you please try running it for me again?
23  Games Center / Showcase / Re: RoboFight - LD32 Compo entry on: 2015-04-22 07:07:16
This is getting interesting, my quick search for Intel HD 4000 says that it supports OpenGL 4.1 on Windows. Dunno why it is failing to get a context. Tracing back in my code, it originates in my Window class, like this.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
public Window(int width, int height, String title, Monitor monitor, Window share)
{
    size = new Vector2(width, height);
    position = new Vector2();
    this.title = title;
    this.monitor = monitor;

    handle = glfwCreateWindow(width, height, title, monitor == null ? NULL : monitor.getHandle(), share == null ? NULL : share.getHandle());

   if (handle == NULL)
       throw new RuntimeException("Cannot create window");

    registeredWindows.put(handle, this);

    // Initialize the native callbacks
    initNativeCallbacks();
}

It is that glfwCreateWindow is returning the handle as NULL aka 0. My guess is that it failed to find a context, which should not happen on your GPU. Checking with my code, I forgot to add a GLFW error callback, so I'll make a build now after setting it. I think that is the only way to find out what is happening. Will upload the new build soon.
24  Games Center / Showcase / Re: RoboFight - LD32 Compo entry on: 2015-04-22 04:42:18
@CommanderKeith

I'm pretty sure that it is crashing due to unavailable requested context. It is failing to find a OpenGL 3.3 context in core profile. What's your GPU?
25  Games Center / Showcase / Re: RoboFight - LD32 Compo entry on: 2015-04-21 11:08:35
@CommanderKeith

That's very weird, can you try running it from the terminal? I think there will be some exceptions thrown in the console. It would be helpful for me to find out what the problem is, never experienced this.
26  Java Game APIs & Engines / OpenGL Development / Re: [lwjgl] Multi-layer (3+) blending in 2-d (separate VBOs) on: 2015-04-20 13:39:10
Maybe you have depth testing enabled. Try disabling it, that's not necessary for 2D games.

1  
glDisable(GL_DEPTH_TEST);
27  Games Center / Showcase / RoboFight - LD32 Compo entry on: 2015-04-20 03:07:38




RoboFight


A simple one-one 2d fighting combat game, where you fight by throwing needles or stinky socks. The other robot (the dark one) is the enemy, and is controlled by the computer.

The controls are simple, use A/D to move, SPACE to jump, ESC to pause. Use RIGHT/UP arrows to shoot and the DOWN arrow to turn on the shield. You can use the F1 key to switch between Windowed and Fullscreen modes. There is a tutorial in the game which will teach you the controls.

Thanks to LD, this is my second completed game. My first one is also in LD too. Thanks a lot LD!!

This game is written using Java 8 and requires a GPU capable of OpenGL 3.3 or higher. Any decent card released after 2008 will work. There is an issue for mac users, they have to run this jar using the terminal with
java -jar RoboFight.jar -XstartOnFirstThread
without which LWJGL3 will not start.

28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-04-19 14:32:01
Sketched a jungle background for LD:



Finally after touching it in Inkscape:



Woohya! Art is done. Polishing next.
29  Game Development / Newbie & Debugging Questions / Re: [Newbie]Need feedback on achieving smooth animation on: 2015-04-12 15:43:19
From the next time, please surround your code in [code] tags. That will help the viewers read the code because then the code will be highlighted. Coming to your question, the answer is to stop using the
Thread.sleep(long)
method in the game loop. This is because it is not guaranteed that it will sleep exactly for the requested amount of time.

Before going on further on game loops, it is better if you use Active Rendering, by using BufferStrategy, which you can create from a JFrame. This is some sample code for creating a JFrame with a BufferStrategy.

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  
// Create and show the JFrame
JFrame frame = new JFrame("My Game Window");
frame.setSize(800, 600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);

// Create the BufferStrategy now with two back buffers
frame.createBufferStrategy(2);
BufferStrategy strategy = frame.getBufferStrategy();

// Now start the game loop
while (running)
{
    // Update the game and check for collisions
    gameUpdate();
    checkCollisions();

    // Now draw a frame
    do
    {
        do
        {
            Graphics2D g2d = (Graphics2D) strategy.getDrawGraphics();
            renderGame(g2d);
            g2d.dispose();
        }
        while (strategy.contentsRestored());
    }
    while(strategy.contentsLost());
}

The above loop is very horrible, it has no timing mechanism. There are three types of game loops, fixed-timestep, variable-timestep and hybrid ones. I prefer the first kind, fixed-timestep. Here are some articles that I prefer (read them in the same order).


The last link shows how Unity3D does it's game loop, it's very complex, so read that only once you are comfortable with your game loop.

Hope this helps.
30  Discussions / General Discussions / Re: Embed YouTube video into libGDX project on: 2015-04-12 08:32:57
You want to play a video in the game? In that case, you may want to try out the gdx-video extension. https://github.com/libgdx/gdx-video

Dunno how it works out though, I never used LibGDX myself.
Pages: [1] 2 3 ... 49
 
CopyableCougar4 (15 views)
2015-05-27 19:24:50

MrMapcom (24 views)
2015-05-23 20:26:16

MrMapcom (32 views)
2015-05-23 20:23:34

Waterwolf (37 views)
2015-05-20 15:01:45

chrislo27 (44 views)
2015-05-20 03:42:21

BurntPizza (79 views)
2015-05-10 15:53:18

FrozenShade (63 views)
2015-05-07 09:11:21

TheLopais (226 views)
2015-05-06 13:36:48

TheLopais (208 views)
2015-05-06 13:35:14

TheLopais (213 views)
2015-05-06 13:33:39
List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00
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!