Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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 ... 40
1  Game Development / Newbie & Debugging Questions / Re: Getting GLG2D to work in my Java2D game. on: 2014-08-29 23:55:21
If your game is "static images and text" as you say, then J2D is easily sufficient.

Otherwise the get started tutorial is right there on the homepage. If it's to difficult to set up at the moment either you should
a) stay with J2D. Like I said it should be good enough. Don't prematurely optimize.
b) use something "easier", for whatever definition of easier. For set-up-and-go libGDX is hard to beat in the OGL wrappers/frameworks game. However it may be jarring to get used to coming from straight J2D with little experience in other methodologies.

Do either of these until your problem solving abilities and general programming experience are high enough.
2  Game Development / Newbie & Debugging Questions / Re: LWJGL 3D I want to create a 3d game on: 2014-08-29 23:21:53
Run-time performance: not great it seems.
Dev-time performance: quite favorable.
3  Game Development / Newbie & Debugging Questions / Re: LWJGL 3D I want to create a 3d game on: 2014-08-29 22:59:32
Why would it be harder?

Try doing this in LWJGL in as few lines: http://processing.org/examples/explode.html
4  Game Development / Newbie & Debugging Questions / Re: LWJGL 3D I want to create a 3d game on: 2014-08-29 22:42:01
No LWJGL, because they have their own system.

Look at the examples: http://processing.org/examples/
5  Game Development / Newbie & Debugging Questions / Re: LWJGL 3D I want to create a 3d game on: 2014-08-29 22:27:37
Did you not read the page?
6  Game Development / Newbie & Debugging Questions / Re: LWJGL 3D I want to create a 3d game on: 2014-08-29 22:12:32
Those sounds like the symptoms of overstepping one's abilities.
Make some 2D games first, build those problem-solving skills.
7  Discussions / General Discussions / Re: Icebucket challenge ??? on: 2014-08-29 15:45:04
Even if this isn't a troll post, why?
8  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 21:12:41
I feel like I'm continuously derailing your thread, but I meant the overall info and such.

BTW, if images are too large: [img width=800][/img]
9  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 21:05:07
Looks better, although you cropped a lot of good information.
10  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 20:55:22
It's visualVM, ships with the jdk.

I see lots of addCube...(), but no getCube...().

Either way, there's way too many objects being created and kept around.
11  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 20:49:02
Ok, so I can't actually find any usages of RenderManager.getCube....()  (don't feel like importing everything into eclipse), but here is the top-16 types memory breakdown:



That's a lot of instances of a lot of things.
Are there really 350,000+ "DungeonPiece"s?

If you want it to be playable, there's some work to be done.
12  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 20:15:03
That is flyweight, yes.
13  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 20:10:39
You're not separating your object representation from how it is rendered.

A Cube, logically, is
Position, Sprite

Even size isn't needed if every Cube is the same size. (static field)

The VBO stores everything else, as it is render specific. All of it's information is derived from that fundamental definition of a Cube. Storing render information in the Cube is redundant.

I'm not the most fluent in conveying ogl-specific stuff, maybe someone else has a better explanation.
14  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 19:55:12
Quick investigation (haven't run the code or profiled it, just looking):

Your memory issues are most likely from (profile to verify this) the fact that you store all the vertices and texcoords of each cube in the map, in each cube in the map. Look up the flyweight pattern. Vertices can be easily computed from a single Vec3 world coordinate, and instead of storing all the texcoords just store which texture region that cube renders with.

Things like Sprite.getRandomSpriteFromSheet() shouldn't be creating a new Random object at every invocation. Re-use the Random object.

Also various instances of high time-complexity like large triple nested loops.


There is no reason a program like this should use multiple Gb of memory. That's insane.
15  Games Center / WIP games, tools & toy projects / Re: Oppugno on: 2014-08-28 19:27:26
That doesn't sound like anything that would take more than a second or two and certainly not something that would lock the machine.
16  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Building Mechanics and AI < on: 2014-08-28 18:38:16
Here's one way to doing the dynamic tiling: http://www.angryfishstudios.com/2011/04/adventures-in-bitmasking/

EDIT: got sort-of ninja'd
17  Game Development / Newbie & Debugging Questions / Re: Updating & Rendering in a timely fashion on: 2014-08-28 02:47:17
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
int desiredFPS = 60;

//  amount of time between frames that corresponds to desiredFPS
long nanosToSleep = 1000000000L / desiredFPS;

while (condition) {
    //  what time is it right now (start of this frame)
   long startTime = System.nanoTime();

    //  do game stuff, this will take an unknown and possible varying amount of time
   update();
    render();

    //  it is now some time after startTime, but, assuming we're not behind schedule
   //  (update and render aren't too slow), we still have time until the next frame
   //  should be started.

    // so we...
   // wait until it's time to do next frame, making sure it's been nanosToSleep since we started this frame
   while(System.nanoTime() < startTime + nanosToSleep)
        Thread.sleep(1);

    //  it has now been nanosToSleep time since we started this frame, loop back and do the next one
}
18  Game Development / Newbie & Debugging Questions / Re: Updating & Rendering in a timely fashion on: 2014-08-28 02:38:19
Yes, as it stands that loop runs as fast as it can, which will be different for different things happening in the update and render methods, and even across different computers.

Try this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
int desiredFPS = 60;

long nanosToSleep = 1000000000L / desiredFPS;

while (condition) {
    long startTime = System.nanoTime();

    update();
    render();

    // wait until it's time to do next frame, making sure it's been nanosToSleep since we started this frame
   while(System.nanoTime() < startTime + nanosToSleep)
        Thread.sleep(1);
}
19  Game Development / Newbie & Debugging Questions / Re: Updating & Rendering in a timely fashion on: 2014-08-28 02:27:40
You're confusing refresh rate (frequency) with the time between refreshes. They are the inverse of each other.

60FPS (60 Hz) = 1 / 60 second (1000 / 60 = ~16 milliseconds)
20  Game Development / Newbie & Debugging Questions / Re: Updating & Rendering in a timely fashion on: 2014-08-28 02:21:56
Do you really want to render at 60ms intervals? That's only 16 FPS.

In regards to decoupled game loops on one thread (read: easiest, safest way): http://gafferongames.com/game-physics/fix-your-timestep/
21  Game Development / Newbie & Debugging Questions / Re: Spam Killing on: 2014-08-27 21:42:42
Gonna need more code than that. What is the temp variable in Terrain? (And why are you handling events in "Terrain"?)
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-26 23:59:08
I've kinda wanted an RPi just to mess around with it, or better yet one of these: https://developer.nvidia.com/jetson-tk1
~160 GFLOPS on a 5W board. Super nifty. Problem is, I don't have a actual project that I would need it for  Sad
23  Discussions / Miscellaneous Topics / Re: Best books for programming in general? on: 2014-08-25 15:41:32
If you want to improve general programming convention/technique, learn Haskell (presuming you have not). Try the book http://learnyouahaskell.com/. The online version is free. This approach is way more fruitful than reading Code Complete or the like.

Not so sure about that one. Obviously Haskell is good at forcing you to obey proper rules and such, but that's quite different than just improving your technique.
Not to mention if all you've ever done is OOP/imperative, you'll need a life preserver or three because that's right off the deep end.
He already thinks Code Complete (a good book IMO) is drawn out, groking Haskell would take much longer I expect.
24  Discussions / Miscellaneous Topics / Re: Do you recommend a break on: 2014-08-24 19:08:36
Fun Fact: Kit-Kats are a Hershey product in the US, but Nestle everywhere else.
25  Games Center / WIP games, tools & toy projects / Re: The Fog - Survive! <<Multhithreaded game logic is done!>> on: 2014-08-23 22:29:15
I guess I meant the GUI, however now that I think about the misconception, I realize GUI being on separate threads is normal anyway...

For separating rendering and logic, a common system is for the logic thread to send snapshots of each logical frame to a queue, from which the render thread consumes the most recently computed frame, sometimes (if you're fancy) interpolating multiple frames.
26  Games Center / WIP games, tools & toy projects / Re: The Fog - Survive! <<Multhithreaded game logic is done!>> on: 2014-08-23 22:02:26
Your persistence with this project is admirable. I love that feeling when a complex redesign of a system is completed successfully.

I don't care so much about the user interface, so I am toying with letting it run in parallel to the logic loop. That would mean that the game would render slightly inconsistently, but would people notice ~16ms inconsistencies?

Perhaps have something like this to couple the UI to the game loop?
27  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-23 21:00:51
Don't think he's going to finish either. Pointing

Latest commit message "Transforming to efficient structure" doesn't sound time-efficient.
28  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-23 20:45:58
@Heroes
Using Piston I'm guessing? How did that go?
29  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-23 20:42:22
You tried with Rust?
30  Game Development / Newbie & Debugging Questions / Re: LibGDX - rotate player to face the mouse on: 2014-08-23 18:36:52
I figured as much, but there was the possibility that that was not Sprite.rotate(), so I thought I'd ask.
Pages: [1] 2 3 ... 40
 

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

The first screenshot will be displayed as a thumbnail.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (31 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (44 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!