Java-Gaming.org Hi !
Featured games (86)
games approved by the League of Dukes
Games in Showcase (649)
Games in Android Showcase (181)
games submitted by our members
Games in WIP (699)
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 ... 12
1  Game Development / Newbie & Debugging Questions / Re: Crash but no crash log! on: 2016-01-25 07:13:00
Use break points and step through the code, you will then find what line causes the crash, and you can work it out from there.
2  Game Development / Game Play & Game Design / Re: Top-down vehicle movement? on: 2016-01-22 09:26:26
by "w is up, s is down" do you mean, w will always make the car go up the screen, s will always go down even if the car is turned around?

If the above, it may work in certain genres, e.g. the games where you typically play as a plane / space ship, dodging or killing things coming from the right, as you don't really want an over complicated movement system for a fast paced game like that.

If your game is more like a 2D racing game, or a game where vehicles can help you move around the world, having a more accurate controlling for a car will feel better. (w is forward, s is reverse, a and d steer).

If you still want help deciding, tell us what the game is, and we can say what we feel would be the best.
3  Game Development / Newbie & Debugging Questions / Re: Should I use LWJGL 2 or 3? on: 2016-01-16 03:07:27
You should probably just switch to LWJGL3, I am pretty sure there not maintaining LWJGL2 anymore, so any bugs in LWJGL2 are more like features now.

The biggest change in LWJGL3 is GLFW, which has sample code on their website to create a display.

The OpenGL is still OpenGL, your best bet for OpenGL tutorials is going to be C++ code tutorials, if a method does not exist from the C++ article, a quick check of the javadocs and the method name will show you the method and its paramaters.
4  Game Development / Newbie & Debugging Questions / Re: Is it worth to use nashorn ? on: 2015-12-30 12:27:35
Can you really handle the possibility when you don't know if it will occur? Maybe it only needs 1 cycle more to finish.
5  Game Development / Performance Tuning / Re: Using the sun.misc.Unsafe class to do crazy stuff with the JVM on: 2015-12-19 13:27:11
@Roquen

My reply was more directly towards ShadedVertex, I know in certain scenarios you will probably want to use Unsafe.

My assumption was he wanted to code his entire game using Unsafe for memory management, where in the entire game, he will probably being deallocating a fair bit, which would pretty much mean he needs a deconstructor in every class.

My "If you are starting to require memory management in Java, you should change languages" was more towards him making a game in Java, I feel like his going to be limited by other stuff before he gets limited by the memory management. He also has a lot more other things he needs to learn in OpenGL before he adds the use of Unsafe to manage his memory.

At no point do I see ShadedVertex in the near future require the use of Unsafe, and most likely majority of the users on this forum.

@theagentd if you see this, do you actually use Unsafe to manage any memory at all in We Shall Wake?
6  Game Development / Performance Tuning / Re: Using the sun.misc.Unsafe class to do crazy stuff with the JVM on: 2015-12-19 06:39:23
You shouldnt need to call System.gc(); ever.

It will run its self when needed.

To what I know (also from the above post), you have to manually delete the memory you allocate using Unsafe, this means, you need to add deconstructors like methods to every Java class you use, if you simply let a reference to an object go, the GC will never clean it up, meaning you got a memory leak.

I will stand by my "If you are starting to require memory management in Java, you should change languages". You are probably going to be limited by something else before memory management in java is your concern.

You are adding an extra level of complexion to your code, where you do not require it.

7  Game Development / Performance Tuning / Re: Using the sun.misc.Unsafe class to do crazy stuff with the JVM on: 2015-12-19 06:05:50
The reason why I don't like C++ is that its syntax is quirky and inconvenient (in my opinion). I want Java's developer-friendly syntax and I'd like to manage memory manually within Java.

I find C++ pretty much similar to Java when you scrap off pointers in C++.

By adding the use of Unsafe to your code, you are probably not even going to notice a performance increase, if that is what you are hoping for.

You are pretty much saying no to one of Java's best features and rolling with your own.

If you are thinking it will increase the performance of your terrain generation, its probably going to either give worse performance or the same performance.

You should continue to improve, you will find that your performance issues are more yourself then the limitations of Java.
8  Game Development / Performance Tuning / Re: Using the sun.misc.Unsafe class to do crazy stuff with the JVM on: 2015-12-19 05:38:50
If you are starting to think about memory management using Unsafe, you may as well go to C++.
9  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Good tutorials teaching how to use Nifty in LWJGL? on: 2015-12-13 11:21:22
It is a bit complicated,

NegativeZero just posted the link in IRC for the demo of it.

10  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Good tutorials teaching how to use Nifty in LWJGL? on: 2015-12-13 10:30:07
LWJGL 2 or 3?

EDIT:

If you are using LWJGL3, LWJGL3 has got built in GUI Library: NanoVG

Hmm there was example code for NanoVG I saw somewhere, not sure where it is now.
11  Game Development / Newbie & Debugging Questions / Re: A couple of questions about Slick2D on: 2015-12-13 00:33:59
1) I only know one game that uses Slick2D and requires to be purchased, and that is Retro-Pixel Castles.

2) Slick2D has not been out of development for a long time.

3) It would be ok to learn on, it gives a api similar to java's Graphics2D, and if you are going to purchase a book for game development in Java, it will most likely use J2D, so it would be a lot easier to learn from the book then using OpenGL or another library.

4) OpenGL uses the GPU to draw, so it is hardware accelerated. You are going to get a lot better performance when using OpenGL. Even though Slick2D uses OpenGL, it uses immediate mode to render, which is slower then using the programmable pipeline.

With OpenGL, if you use only LWJGL, you will be writing a lot of code just to set up the rendering, and with the little experience you have, it will probably go right over your head.

5) LibGDX is Java's pretty much best game development library. It is still maintained, and uses more advanced OpenGL techniques, and there for gives a lot better performance then Slick2D.

LibGDX also supports 3D development if you decide to use that in the future.

With LibGDX, you code your game in Java, and when you go to export it, you can export it to Desktop, HTML, Android or even IOS.

LibGDX will also give you a lot more functionality that Slick2D does not provide, and should have a lot of tutorials on how to do things.

6) I have never used a book to learn programming. I learnt everything I know from articles and videos. I started off learning form Videos, but I mostly only use articles now.

If you want to learn OpenGL directly, you will need to get comfortable with reading C++, most OpenGL articles your going to find will be using C++, Though the API for C++ is very very similar to LWJGL's implementation, just a few little differences (parameters are slightly different).
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-06 08:18:17
If you need help, jump on to IRC, and I can help.

I just did one of my optimisations earlier today, it trippled my FPS for the same world size as before.

Can now render 30x4x30 chunks (16x16x16) at 34 fps.

edit: I got confused, so I changed my reply.
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-06 06:26:56
if you are uploading 1 float, just pass the float in, not a FloatBuffer (which is what the v is for).

Atleast all the methods that have the v, take in a FloatBuffer, without the v it takes just n floats / ints
14  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-05 13:53:32
not sure never tried, but what I did was pretty simple implementation.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-05 13:49:20
I am using a spritesheet.

You want as little binding as you can, and if you are using small enough texture files, you dont need 1 texture per file.

As I have 3 textures (stone, dirt and grass), all at 16x16 size. I can just pack them into a texture (I chose 256x256, so I can fit more textures if I desire).

You then can work out the new UV coordinates by a few lines of code to produce the UV coordinates for a certain 16x16 area in a 256x256 texture.

This now means I only need 1 texture bind, and I can have a lot of different blocks into one VAO.
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-05 13:39:31
well, yes, I just always call them a VBO out of habit.

using the same way as you are to render, glDrawElements(...).

So 1 VAO per chunk, which is still 1 VBO per chunk.
17  Discussions / Miscellaneous Topics / Re: Benchmark this JAR - yes, a Vangard demo! on: 2015-12-05 13:32:32
1920x1080p is my screen resolution
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-05 13:31:25
My first iteration of the engine worked kinda like yours, because I was reusing my Model class, which was mainly for the use of loading .obj files and rendering them, and only 1 model would fit into one VBO (or 1 model fitted into multiple VBO's when it required multiple texture files).

I created one Model which was my cube, and rendered it for each block, changing its texture and its model matrix.

My second iteration then kept the same rendering code, but removed blocks that were not visible. This increased its FPS, but made the FPS very unstable, where the FPS was halfing for a few seconds, before returning back to normal FPS for a while.

My third iteration with SHC's help, as I didn't even notice I was doing it, I was getting the FloatBuffer of the matrix each frame, which was the cause of the very unstable fps, after the fix, it kept it stable.

My fourth iteration, was I seperated the code into chunks to reduce draw calls. every 16x16x16 blocks was put into a chunk, where I then put all those blocks inside one VBO.

So now instead of 409600 draw calls to render 160x16x160 blocks, it was now done in 100 draw calls, which gave a huge improvement. from about 6fps (first iteration) to 30fps (3rd iteration) to 142fps (fourth iteration).

EDIT:
Removed some lies, because I forgot the world size dimensions I used.
19  Discussions / Miscellaneous Topics / Re: Benchmark this JAR - yes, a Vangard demo! on: 2015-12-05 12:59:13
Logic stays around 5ms, sometimes swaps between 4 and 5, think I saw 6 a few times too, on all speeds.

at the default zoom, it takes 2ms most of the time to render, sometimes 3ms.

fully zoomed in (75.0), it still is mostly 2ms, sometimes 1ms.

A zoom of 1.0 takes 11-12ms, it flickers between them a bit.


i7-3820
gtx 680 4gb

EDIT:

I closed it and reopened and zoomed out to 1.0 again, and its now rendering at 11-16ms, flicking between numbers in that range.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-12-05 12:25:00
If you are using VBO's you should definetly be able to do more then 18x18x15.

I recently made this



With a world size of 15*15*3 chunks, where each chunk was 16*16*16, but there is only 1311561 solid blocks, the rest are air, gives about 55 fps.

It is pretty poorly optimised, I could increase the performance by a lot if I spent the time on it. it currently completely renders every block.

to struggle to render 18x18x15, you must be doing something extremely wrong in your rendering, or your computer is very under powered.

If you are using VBO's,  try and minimise the amount of VBO's you are drawing per call, this is the only optimisation that I implemented in mine.

Another would be to only render blocks that are exposed to an air block. (I did not do)

The next would be to only render the faces that are exposed to an air block. (I did not do)
21  Game Development / Newbie & Debugging Questions / Re: Dice Rolls on: 2015-12-04 07:43:12
Because you are generating a new value each time you call it.

store the value of the roll into a variable

1  
int roll = Math.floor(Math.random() * sides);
22  Game Development / Newbie & Debugging Questions / Re: LWJGL and GLSL Versions on: 2015-12-02 00:52:13
All your up to date tutorials are going to be in C++.

https://open.gl/

Has got fairly good tutorials to get you started.
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-11-27 04:05:01


Decided to start learning 3D.
24  Discussions / Miscellaneous Topics / Re: Starcraft 2 on an Atom Z3775 or Celeron N3150? on: 2015-11-26 03:31:57
Also, check to see if you can get a windows 7 or 8 key cheaper, you might be able to save a little, it should be able to upgrade to windows 10 if you get the computer before the 1 year free upgrade runs out.
25  Discussions / Miscellaneous Topics / Re: Starcraft 2 on an Atom Z3775 or Celeron N3150? on: 2015-11-25 12:53:20
If you are really going for the cheapest computer you can get.

Look into a Intel Pentium g3258.

In USD, as euros are probably closer to USD then AUD.

Intel Pentium g3258 - $60
8gb ram - $40
case - $20-$50
motherboard - $80 (May need a bit more to get a good motherboard that you can overclock well with)
CPU cooler - $30-60 (Would probably be wise to get a good CPU cooler, so you can get a good overclock)

May as well put your GT430 in. The GT430 would probably be better then the hd graphics (HD 3000 I think the g3258 has).

If you decide for a gtx 750TI, it would probably be wise to pay the extra for a gtx 950 or a gtx960 for the little extra.

I remember hearing ages ago back when the g3258 was not long released, that when overclocked, it was comparable to a i5 2500 (I think 2500, maybe something else).

Found this running of the integrated GPU on the g3258 at max detail: https://www.youtube.com/watch?v=uWXzm8OD8zA
26  Discussions / General Discussions / Re: SMF is falling apart. on: 2015-11-16 23:25:00
Clicking read more, when you press the "You have recevied n medals"

gives

1  
2  
3  
8: Undefined index: 101075_125405
File: /home/jgo/public_html/Themes/default/languages/Manual.english.php (manual_intro sub template - eval?)
Line: 75
27  Discussions / Miscellaneous Topics / Re: What are the viable alternatives to Sourceforge? on: 2015-10-28 09:15:07
I think the best solution may be one of the following:

Write your own repository hosting service, to ensure nothing will ever change.

Or for backing up code, print each page to paper.

Every company may change, so either choose the one that provides the best features and appeals to you the most, or write your own custom repository hosting service with the features you wish, to ensure you, as a user have control over the direction of the development for the tool.

Just because one paying customer doesn't want a company to change, doesn't mean they will listen to 1 out of their entire user base. And the other users may like the direction its heading, or not really care as long as there product is still great.
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-23 07:51:10
Suggest me a good programmers font? I'm using Consolas.

I think the obvious answer is Comic Sans.
29  Game Development / Newbie & Debugging Questions / Re: Did Java 8 is not allow overload anymore ? on: 2015-10-21 11:02:47
That is generics, not overloading, overloading was never in java.

simply, overloading changes what +, -, += etc do.

Generics still exist, your probably doing something that does not use generics.

What is it your trying to use it for?

EDIT: I think I may of read it wrong, with seeing the < > and assuming it was generics.

I am assuming you mean method overloading.

You probably just copied pasted the exact method description, and expected it work.

1  
2  
public void test(int x) { System.out.println(x); }
public void test(int x) { System.out.println(x + 1); }


I am guessing you did something like that, where it does not know what method to call, I have never got that message.

That or your making a generic method as well

1  
2  
public void test(int x) { System.out.println(x); }
public void test(T x) { System.out.println(x); } //where T is your type


and you set your type as a int, so its just 2 methods, that take the exact same parameters.
30  Discussions / General Discussions / Re: Windows 10 on: 2015-08-08 10:29:45
I have yet to see an animation suffering from a lag spike, it all seems pretty smooth for me so far.

The title bar does look a little bigger, and just putting file explorer ontop of chrome, its like a few pixels bigger.

Putting windows explorer on top of chrome, and using the X shows that windows explorers tile bar is 5 pixels bigger then chrome.
But chrome's title bar is the same size as windows 7.
Also Visual Studio is smaller then windows explorer title bar too, about the same size as chrome, so windows 7 size.

Only problem I have is with the snap, the edge between multi monitors is now snappable, you need to move a window at a certain speed to move it across.

even with my mouse at a fairly high speed, I still seem to get stuck by it a fair bit.

Also the corners of each of my monitors are "solid" on windows 7, I could put my mouse to the top, and drag it from one monitor to the other, but now it gets stuck on the corner of my monitor between the two screens, as if it was only one screen.

Performance, I think my computer actually improved with Windows 10. I did have some game performance issues 10 mins after upgrading, the game would go really low fps every now and again. but after turning my compute off after updating, I have had no problems.

I seemed to be keep a more stable higher FPS in GTAV, in certain parts I would drop down to 50-55 and sit there, but I seemed to sit at 63 a fair bit, to begin with when I was checking my FPS, didnt keep an eye on it though.

General computer performance seems fine as well.
2 desktops open (the virtual desktops they added).
Main desktop consisting of, steam, windows explorer, 6 tabs on chrome, a dvd player program, paint.net, eclipse, visual studio, epic games launcher, unreal engine 4 open, in play mode on the game, fraps, and playing we shall wake at 60 fps with no fps drop on ultra settings, and minecraft open up in chat so the game keeps updating and rendering running at 150 fps.

second desktop consts of 5 chrome tabs open.

I think your install may of been bad, not actually windows 10.
I did have a problem for a few days, once a day my task bar would go not responding, and I had to hold the power button in to to get it to respond back (or at least it didn't fix after like 2 mins of waiting so I gave up waiting), but I havnt had that issue since like 2-3 days after upgrading to windows 10.

I have been on windows10 since the day it got released.

I saw a video of a guy running windows 10 on a single core computer, and it seemed to perform really well as well link to video if anyone is interested, it is from a tech preview build from last year, so theoretically the performance should be even worse then it is now.
or a 10 year old laptop (according to him it is 10 years old, didn't check for myself) link to video.
Pages: [1] 2 3 ... 12
 
KaiHH (53 views)
2016-01-31 23:15:29

sci4me (80 views)
2016-01-23 21:47:05

sci4me (68 views)
2016-01-23 21:46:58

KaiHH (100 views)
2016-01-19 13:26:42

theagentd (184 views)
2016-01-05 17:10:00

ClaasJG (201 views)
2016-01-03 16:58:36

chrisdalke (192 views)
2015-12-28 06:31:21

Guerra2442 (224 views)
2015-12-25 03:42:55

Guerra2442 (221 views)
2015-12-25 03:27:21

theagentd (260 views)
2015-12-21 14:43:24
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

Rendering resources
by Roquen
2015-10-15 07:40:48
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!