Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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 ... 10
1  Discussions / General Discussions / Re: New feature: Embedded PDFs on: 2014-07-19 18:53:35
You are using very old version, newest one is 22.0.1471.70. Smiley You need to download it manually as Opera don't have auto update feature (at least in old versions, I am not sure if new versions have it or not).
2  Discussions / General Discussions / Re: New feature: Embedded PDFs on: 2014-07-19 18:37:11
Sadly this feature don't work on Opera - even though it is using the same engine as Chrome. After clicking "click this page to load the PDF" download is initalized, but nothing appears.
3  Game Development / Newbie & Debugging Questions / Did you know? Hints and tips on: 2014-07-14 23:15:55
Thread created to share small, library independent (except OpenGL bindings) hints and tips. Please do not post obvious ones, let this topic become a valuable source of informations. Smiley

I will start with this one:

Did you know that you can use WeakReference objects to allow garbage collection of objects which are no longer accessible via "classic" references? In case of games, this can be useful for example in case of listeners.
More info/explanation: http://java.dzone.com/articles/reference-types-java-part-1
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-14 14:21:08
Did I just find a bug? :S

First you see my explosion particle effect in the Particle Editor, the last part is the result in libGDX (my game).
Other particles work fine (as you can see).



Maybe try to find ground line equation and discard all particles below ground (if this is possible in LibGDX)?
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-14 14:08:59
That's awesome. Is it for anything specific?

Yes, but we are still at planning/prototyping phase.

Is it procedural at all or pre-made textures?
Have been thinking of making a procedural galaxy/nebula thingamabob.

Pre-made textures processed using shader to give them semi-transparent nebula-like look. I will probably add more stars to the last layer to make everything look more like galaxy.

The scroll effect itself is inspired by War Thunder loading screens. Smiley
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-14 02:50:18
I just made multi-layered nebula which scrolls together with mouse.

GIF (10 mb):
7  Games Center / WIP games, tools & toy projects / Re: Ultimate Wars (now with bad spelling!!!) on: 2014-06-27 23:57:45
Example of a Unit XML file:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
<?xml version="1.0"?>
<config>
   <unit id="2">
      <name>Ninja</name>
      <speed>2.5</speed>
      <defence>15</defence>
      <attack>15</attack>
      <swing>15</swing>
      <range>25</range>
      <regen>.01</regen>
      <red>.5</red>
      <green>.5</green>
      <blue>.5</blue>
   </unit>
   
</config>


How about something like this?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
<?xml version="1.0"?>
<config>
   <unit id="2" name="Ninja">
      <speed>2.5</speed>
      <defence>15</defence>
      <regen>.01</regen>
      <weapon attack="15" swing="15" range="25"/>
      <color r=".5" g=".5" b=".5"/>
   </unit>
   
</config>


If you are using DOM XML, then reading XML like this is very easy and extensible - for example, you can have Color class with constructor Color(Element) which read color data from Color element - the same with weapon and unit itself (I had no idea for speed, defence and regen).

This way, if you stick to this scheme, you can for example use <color/> element in any other entity informations.
8  Game Development / Newbie & Debugging Questions / Re: Encouraged model file format on: 2014-05-15 00:13:09
I would go with Collada - maybe it is slower to load, but it can contain a lot of informations, can be easily adapted to any needs and interpreter is easy to write.
9  Game Development / Newbie & Debugging Questions / Re: How to manage very large 3D arrays? (OutOfMemoryError) on: 2014-05-07 22:43:20
If your entities don't have any special data, you can use byte arrays inside class with proper getters/setters instead of object arrays - this solution is using from 4 to 8 times less memory. If you need to add special data to some tiles, then you can just add them to proper list/map.
10  Game Development / Newbie & Debugging Questions / Re: [Box2d][Libgdx] How to detect 2 bodies in contactListener? on: 2014-03-22 17:18:20
Never compare Strings using "==" - use "equals" instead.
11  Discussions / General Discussions / Re: JDK 8 is released on: 2014-03-20 10:58:08
Is NetBeans affected by this bug?
12  Discussions / General Discussions / Re: Best lwjgl game graphically? on: 2014-03-18 08:32:56
What about Wurm Online? Full 3d, large-scale MMO game. Cheesy
13  Discussions / General Discussions / Re: Data bases and game programming on: 2014-02-13 12:42:51
I don't use any databases, in my opinion DB are good for websites/static browser games (like, for example, Tribal Wars), but not too good for dynamic games.

Personally, I am using Kryo for serialization.
14  Discussions / Miscellaneous Topics / Re: Comment Tricks on: 2014-01-21 12:15:43
I think that most of us use "comment tricks" like this. When I need to disable the code for a moment (or test how good is the new version without deleting previous) I use comment/uncomment feature in NetBeans. Smiley
15  Java Game APIs & Engines / OpenGL Development / glCopyTexImage2D error - GL_INVALID_ENUM on: 2014-01-19 22:23:15
I have a problem with glCopyTexImage2D - look at this util method which is cutting previously rendered scene to the texture:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
    public static Texture cutRenderToTexture(GL g, int width, int height) { 
        IntBuffer buff = Buffers.newDirectIntBuffer(1);
        g.glGenTextures(1, buff);
        int tex = buff.get();
        g.glBindTexture(GL.GL_TEXTURE_2D, tex);
        checkGLError(g);
        g.glCopyTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, 0, 0, width, height, 0);
        checkGLError(g);
        g.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
        return TextureIO.newTexture(tex, GL.GL_TEXTURE_2D, width, height, width, height, false);
    }


checkGLError is a simple method which is checking all possible OpenGL errors - in this example I am calling it twice to show that problem can be related only to glCopyTexImage2D call. I am getting GL_INVALID_ENUM error, but target is valid, GL_TEXTURE_2D enabled and OpenGL docs ( https://www.opengl.org/sdk/docs/man4/xhtml/glCopyTexImage2D.xml ) do not specify if this error can happen in any other case.

Any ideas what is wrong?
16  Game Development / Newbie & Debugging Questions / Re: Noob thinking about trying to use a library on: 2014-01-13 20:14:23
About loading/unloading regions - you have to make the code yourself, but KryoNet is a good choice when it comes to saving/loading objects and networking.

About lighting - I think there is no library for that, you have to use the whole framework like LibGDX or make it yourself.

Easy to learn engine? Try LibGDX, or JOGL if you want to reinvent the wheel.
17  Discussions / General Discussions / JGO Anniversary - 2^9 games in showcase on: 2014-01-09 09:38:34
It seems that we now have 2^9 (512) games in showcase - let's see how many high quality Java games will be made when we will hit 2^10 games! Cheesy

Long live JGO! Smiley
18  Discussions / General Discussions / Re: Forum software suggestions? on: 2014-01-08 17:31:42
I recommend SMF - very powerful and customizable forum engine. It is not worth to buy forum engine when you have very good open source alternatives.
19  Discussions / General Discussions / Re: Opinions of games engines on: 2014-01-07 16:10:51
Finally someone that understands why I hate looking at any C* language...

Definitely. I don't know if this is just me, but IMHO "SomeClass extends AnotherClass" looks better than "SomeClass : AnotherClass". The same with long class/variable names, for example "WindowClassExtended" against "WNDCLASSEX".
20  Discussions / General Discussions / Re: what do you code on? on: 2014-01-04 17:25:08
Why thread like this is popular... Well, we all are nerds and nerds just love talking about hardware and computers in general. Cheesy
21  Game Development / Shared Code / Re: jnigen: JNI with less pain on: 2014-01-03 22:30:23
Both of them are added, still the same error. Path is working correctly via cmd for both mingw32-C++ (and everything else with "mingw32-" in name) and ant.bat
22  Game Development / Newbie & Debugging Questions / Re: Java Security BS, Can I Get Around It? on: 2014-01-03 22:13:10
Jetbrains/WebStorm is a fancy JS/HTML IDE. It even supports javascript breakpoints which you set in the IDE, which affect the running code in the browser (!) with variables showing in your IDE -- you either watch the stack-frame, or hover the variables in your code, where their current values show in the tooltips. Mind is blown. It's not free, but has a 30 day trial.

You can do the same thing (breakpoints, variables showing in IDE) using free GWT - while writing and debugging code in Java, from the Eclipse (sadly no NetBeans). Smiley
23  Game Development / Shared Code / Re: jnigen: JNI with less pain on: 2014-01-03 22:02:16
Quote
run:
C/C++ for 'src/pl/mac70/jdirect/Window.java' up to date
Wrote target 'Windows' build script 'jni\build-windows32.xml'
Wrote master build script 'jni\build.xml'
Executing 'ant.bat -f D:\jDirect\jDirect\jni\build-windows32.xml -v -Dhas-compiler=true clean postcompile'
Executing 'ant.bat -f D:\jDirect\jDirect\jni\build.xml -v pack-natives'
java.io.IOException: Cannot run program "ant.bat": CreateProcess error=2, Nie mo¿na odnaleŸæ okreœlonego pl
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
   at com.badlogic.gdx.jnigen.BuildExecutor.startProcess(BuildExecutor.java:51)
   at com.badlogic.gdx.jnigen.BuildExecutor.executeAnt(BuildExecutor.java:38)
   at pl.mac70.test.JNIBuild.main(JNIBuild.java:17)
Caused by: java.io.IOException: CreateProcess error=2, Nie mo¿na odnaleŸæ okreœlonego pl
   at java.lang.ProcessImpl.create(Native Method)
   at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
   at java.lang.ProcessImpl.start(ProcessImpl.java:136)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
   ... 3 more
java.io.IOException: Cannot run program "ant.bat": CreateProcess error=2, Nie mo¿na odnaleŸæ okreœlonego pl
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
   at com.badlogic.gdx.jnigen.BuildExecutor.startProcess(BuildExecutor.java:51)
   at com.badlogic.gdx.jnigen.BuildExecutor.executeAnt(BuildExecutor.java:38)
   at pl.mac70.test.JNIBuild.main(JNIBuild.java:19)
Caused by: java.io.IOException: CreateProcess error=2, Nie mo¿na odnaleŸæ okreœlonego pl
   at java.lang.ProcessImpl.create(Native Method)
   at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
   at java.lang.ProcessImpl.start(ProcessImpl.java:136)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
   ... 3 more
BUILD SUCCESSFUL (total time: 0 seconds)

Any ideas? Roll Eyes Error(s) caused by this code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
package pl.mac70.test;

import com.badlogic.gdx.jnigen.*;
import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;

public class JNIBuild {

    static public void main (String[] args) throws Exception {
        NativeCodeGenerator jnigen = new NativeCodeGenerator();
        jnigen.generate("src", "build/classes", "jni", new String[] {"**/*"}, null);

        BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows, false);
        win32.compilerPrefix = "mingw32-";
        //BuildTarget win64 = BuildTarget.newDefaultTarget(TargetOs.Windows, true);

        new AntScriptGenerator().generate(new BuildConfig("jDirectDll"), win32);
        BuildExecutor.executeAnt("jni/build-windows32.xml", "-v -Dhas-compiler=true clean postcompile");
        //BuildExecutor.executeAnt("jni/build-windows64.xml", "-v -Dhas-compiler=true clean postcompile");
       BuildExecutor.executeAnt("jni/build.xml", "-v pack-natives");
    }
   
}
24  Game Development / Newbie & Debugging Questions / Re: Java Security BS, Can I Get Around It? on: 2014-01-03 20:32:27
You can have source code in multiple files using Javascript Wink

I named this wrong, I was thinking about "one class = one file", like in Java - this makes development much, much easier. Smiley JS is also lacking a good IDE.
25  Game Development / Newbie & Debugging Questions / Re: Java Security BS, Can I Get Around It? on: 2014-01-03 15:39:02
You can always use Java to make JavaScript projects using http://www.gwtproject.org/ - IMO this is much better than writing anything in plain JS as you can use all Java features useful for projects larger than simple calculator like packages, source code in multiple files etc. Smiley
26  Discussions / General Discussions / Re: what do you code on? on: 2014-01-01 20:31:11
Acer Aspire 5755G
Intel Core i3-2350M
GeForce GT 630M
8 gb DDR3 RAM
512 gb HDD
27  Discussions / Miscellaneous Topics / Re: Welcome to 2014! on: 2013-12-31 22:55:49
What I achieved:
  • continued learning Java (started in late 2012)
  • learned Scala
  • learned C++ (mostly for JNI)
  • learned PHP
  • learned networking, KryoNet library
  • learned OpenGL, made some 2d and 3d prototypes using it
  • learned DirectX basics
  • made complex 3d planning program for Wurm Online - not a game, but program with game-like structure

What I hope to achieve in 2014:
  • make Direct3d wrapper for Java (possible merge with LWJGL in the future?)
  • make further progress on my MMO project
  • learn more design patterns
  • expand knowledge of gamedev
28  Discussions / Miscellaneous Topics / Re: Need Ideas for School Project on: 2013-12-31 02:07:23
(...) I like the idea of defending yourself to learn more about your system.

You can add this element to my idea, too. In shoot'em'up you must take care of your ship. About learning part - for example, why Windows ship special ability is shooting with very damaging bullets with DirectX symbol on them (Windows as popular gaming platform), Linux - ship transformation (many different distributions), Mac - shield (security).
29  Discussions / Miscellaneous Topics / Re: Need Ideas for School Project on: 2013-12-31 01:19:34
Crazy idea, but I think it have some sense... Maybe shoot'em'up with upgrades between levels?

Hardware = ship upgrades (for example, better CPU = faster shooting, better GPU = more shoots, bigger HDD = more life, more RAM = special shoot duration and power, another possibility - important hardware parts as different weapons to choose with different characteristics) - include some informations about hardware parts in upgrade description.

OS = different level environments and final bosses of this environments. Another possibility - ship classes to choose.

Software, word processing, spreadsheets, networking and email - enemies and bosses. You can add bosses who represent various topics like spreadsheets, networking etc. with appearance, attacks (+ final boss of the environment - OS). Software might be shown as normal enemies, for example in level with networking as a boss you can meet IE, Firefox, Opera, Chrome and Safari as enemies. Include some informations about "boss" after finished level.
30  Game Development / Articles & tutorials / Re: LibGDX, Box2d, and Ruby - Platformer Tutorial on: 2013-12-30 16:38:34
I think that this forum is for Java gamedev, but remeber that Java is not only a language, but also the whole environment which support much more languages than just Java.
Pages: [1] 2 3 ... 10
 

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

The first screenshot will be displayed as a thumbnail.

ctomni231 (33 views)
2014-07-18 06:55:21

Zero Volt (29 views)
2014-07-17 23:47:54

danieldean (24 views)
2014-07-17 23:41:23

MustardPeter (26 views)
2014-07-16 23:30:00

Cero (41 views)
2014-07-16 00:42:17

Riven (43 views)
2014-07-14 18:02:53

OpenGLShaders (31 views)
2014-07-14 16:23:47

Riven (30 views)
2014-07-14 11:51:35

quew8 (29 views)
2014-07-13 13:57:52

SHC (65 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!