Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (594)
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 ... 286
1  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 15:03:58
The map operation is relatively slow, and what's more, it causes a total GPU stall. The correct way to do things is probably to map one large buffer.
There is neglible overhead for mapping unsynchronized buffers, they will never cause a GPU stall, they can however cause a driver stall. See: http://www.java-gaming.org/index.php?topic=32169.0
Quote
Similarly, mapping a buffer forces the game thread to wait for the server thread to finish any pending operations, stalling the game thread until the buffer can be mapped. What we're seeing is not glMapBufferRange() becoming more expensive; we're seeing a driver stall! Using unsynchronized VBOs eliminates the synchronization with the GPU (to ensure the data is no longer in use), but the internal driver thread synchronization cannot be avoided this way.

GL_UNSYNCHRONIZED_BIT is brand new but immediately replaced with GL_MAP_PERSISTENT_BIT, which neither causes GPU nor driver stalls.



Cas, didn't you say, the power of mapping gl buffers comes from using threads ?
Yes, you can fill your mapped buffers from worker threads, which is especially effective on AMD processors, as they have crappy memory controllers (compared to Intel i7), causing individual cores to have severely limited bandwidth.
2  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 14:02:37
@theagentd: except that we discovered (when using LibStruct) that persistent mapped buffers had horrible performance in the mapped memory region. It was a lot faster to write into another region and copy that into the mapped region. persecutioncomplex
3  Discussions / General Discussions / Re: Forum Bug(s) on: 2015-01-28 10:04:33
Meh, stupid SMF. I don't actually have access to the 'internal data' in SMFs 'template engine'.

Sources/Load.php

1  
2  
3  
4  
5  
6  
array(
   ...
-   'posts' => $profile['posts'] > 100000 ? $txt[683] : ($profile['posts'] == 1337 ? 'leet' : comma_format($profile['posts'])),
+   'posts' => $profile['posts'],
   ...
);

Themes/default/Display.template.php

1  
2  
-   $postCount  = $message['member']['posts'];
+   $postCount  = intval($message['member']['posts']);

If there are other easter-eggs, the intval(...) will drop your $postcount to zero, which will reduce your rank somewhat - you might lose a star or two, until you once again have a post count that is expressed as a number. Roll Eyes
4  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 09:56:56
VAOs were meant to reduce OpenGL API call count, pushing state into the GPU, at the expense of code complexity.

In the end the complexity is a real problem, and more importantly, VAOs actually have worse performance. So it's pretty much a lose-lose situation.
5  Game Development / Newbie & Debugging Questions / Re: Access violation with glDrawArrays on: 2015-01-28 00:39:17
Can you make a self-contained, compilable executable example, for us to reproduce the problem?
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-27 12:08:03
Ooooh, 7MB embedded PNG! Think of the children (with expensive mobile plans)!
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-27 09:31:12
Nobody really cares about such insinuations, really.

His "web history" might have revealed to Google he is in the "25 - 35y male" demographic, and that might have been enough to trigger such ads. I get ads for Java Developer jobs and a few trading companies that are after my vast accumulated wealth - I just have to invest a meager $350,000 - so I immediately enabled Google Ads on JGO to fund it. persecutioncomplex
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-27 08:59:26


Got an ad for an "adult store" on JGO...
I miss Project Wonderful and Ray's not-quite-a-perfect-loop-but-close-enough-to-annoy-you ad...

Hm... I recently allowed Google Ads through Project Wonderful's ad-platform. I might have to reconsider opening the flood gates persecutioncomplex It, however, brings in enough dough to make JGO break even within six months or so persecutioncomplex

http://www.java-gaming.org/content/finance
9  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2015-01-27 08:31:50
yet
Postpone it for as long as possible. We talked out it before, but let me reiterate:
 - DNS is unreliable
 - TCP connections are unreliable
 - antivirus software will lock/delete/corrupt your new files (between checking the digest and loading resources from them)
 - spiffy SSDs are notorious for being... full.

Writing a launcher / auto-updater that has workarounds for all this madness, and has a proper UI, is a lot of work.
You'd typically want a two stage launcher, as you want to auto-update your launcher - as there will be bugs.

TL;DR: Let Steam do the heavy lifting for you, until rolling your own is worth the time spent on it.
10  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LibStruct on: 2015-01-23 00:56:11
a method like
Struct.map(some.class, bb)
could be useful, at least convenient :
1  
public static <T> T map(Class<T> structType, long pointer) // pointer to object
and maybe :
1  
public static <T> T[] map(Class<T> structType, long pointer, int numElements) // pointer to object-array

maybe better use a "view"
1  
public static <T,A> A view(long pointer, Class<A> asType,int offsetMultipleOf4)
and maybe use int-handles instead of long-pointers.

seems almost trivial since we need the pointer anyway when mapping a bytebuffer.
long addr = StructMemory.alignBufferToWord(buffer)
. would alignment cause trouble ?

that would open Struct up a bit and bring more pointers from who knows where from onto the table.

Quite a bit has changed in LibStruct, and I incorporated your request.
https://github.com/riven8192/LibStruct/blob/master/src/net/indiespot/struct/cp/Struct.java#L261

1  
2  
3  
Vec3 vec = Struct.fromPointer(long pointer, Vec3.class);
Vec3[] vecs = Struct.fromPointer(long pointer, Vec3.class, int length);
Vec3[] vecs = Struct.fromPointer(long pointer, int stride, int length);


Note that struct arrays are actually
int[]
filled with references, behind the scenes. It introduces a bit of overhead to have this indirection between the array index and the struct pointers, as we're fetching values from memory that we can calculate instead (memory is slow). Let's imagine we allocate an Vec3[]:
1  
Vec3[] vecs = Struct.mallocArray(Vec3.class, 10001);

This causes an int[] to be created like so:
1  
2  
3  
4  
int[] vecs = new int[10001];
long pointer = malloc((long)sizeof * vecs.length);
for(int i=0; i<vecs.length; i++)
   vecs[i] = pointer2handle(pointer + (long)i*sizeof);
basically we have an int[] with a lot of predictable (redundant) values. It has its merits, as it allows you to do:
vecs[13] = vecs[138];
or
vecs[14] = new Vec3();
but often you simply want to 'map' an array to a fixed range of memory.

Therefore (yet) another API has been introduced to get rid of this level of indirection, by adding convenience methods that help addressing contiguous structs:
1  
2  
3  
4  
5  
6  
7  
8  
// old skool:
Vec3[] vecs = Struct.mallocArray(Vec3.class, 10001);
for(int i=0; i<vecs.length; i++) {
   Vec3 vec = vecs[i]; // indirection
  // compiled to: int vec = vecs[i];
   vec.x = i * 0.125f;
}
Struct.free(vecs); // puts some strain on the LibStruct GC, which has to free 10001 handles

1  
2  
3  
4  
5  
6  
7  
8  
9  
// die hard mode:
int count = 10001;
Vec3 base = Struct.mallocArrayBase(Vec3.class, count); // no int[], just an int
for(int i=0; i<count; i++) {
   Vec3 vec = Struct.index(base, Vec3.class, i); // direct pointer
  // compiled to: int vec = base + (12 >> 2) * i;
   vec.x = i * 0.125f;
}
Struct.free(base); // no strain on the LibStruct GC, which has to free only 1 handle

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
// fully in control:
Bytebuffer bb = ...;
long addr = StructUnsafe.getBufferBaseAddress(bb);
for(int i=0; i<10001; i++) {
   // doing the math yourself - this is actually not as fast as
   // Struct.index(...) due to converting ints to and from longs
   Vec3 vec = Struct.fromPointer(addr + (long)i * Struct.sizeof(Vec3.class), Vec3.class);
  // compiled to: int vec = (int)((addr + (long)i * 12) >> 2);
   vec.x = i * 0.125f;
}
// no GC whatsoever, as we never malloc'd.


Hopefully this 'opens up' LibStruct for more general purpose projects Smiley


Breaking news: the structs returned by mallocArray/mallocArrayBase are guaranteed (since a few weeks) to be in a contiguous block of memory. All memory handles (ints) are treated as unsigned integers (longs) and bitshifted 2 positions to the left. This allows you malloc & address up to 16GB (OS/hardware limits apply) with 32 bit handles.
11  Discussions / Suggestions / Re: Font for code blocks on: 2015-01-21 18:46:32
I can't make it more platform independent than it currently is...
1  
2  
3  
4  
5  
div.syntax *
{
   font-family: monospace;
   font-size: 10pt;
}


Your browser / OS is missing some crucial fonts Smiley
12  Discussions / General Discussions / Re: Posting in wrong thread on: 2015-01-19 18:12:42
The topic ID of the topic you're posting in, is contained in the URL (a GET parameter). It is then written out in the page source as a hidden input field of a form. The topic ID is then submitted to the server, and used to execute an INSERT sql query.

Note that the topic ID is never stored in the php session, so it's unlikely to go 'out of sync' in the manner you described.
13  Discussions / General Discussions / Re: Posting in wrong thread on: 2015-01-19 18:09:23
test
14  Discussions / Miscellaneous Topics / Re: Facebook integrated JGO account, but facebook is being deleted. on: 2015-01-18 22:33:21
You can migrate your jgo-facebook account to a jgo-google account. Just login with facebook and sign in with google right after, it will give you the option to migrate.
15  Discussions / Miscellaneous Topics / Re: If OS==linux && isInstalled(Steam) --> ABORT! ABORT! on: 2015-01-16 13:13:51
TL;DR:
rm -rf "$SOME_UNDEFINED_OR_EMPTY_VAR/*"


Rookie mistake.
16  Game Development / Shared Code / Re: An easy way to count up at a constant (frame-independant) rate. on: 2015-01-16 08:25:25
Make your code stricter. If per_x_seconds <= 0.0, you should throw an exception, as the callsite is clearly in an invalid state. Never have silent errors, this is neither PHP nor C. Pointing
17  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [Slick2D] Why the F is it so slow? [SOLVED] on: 2015-01-10 14:59:16
@kevglass: just throwing it out there: if the slow path is too slow for basically anything (OP said: 32*32 tiles @ 9fps), then why expose this slow path to developers? Why not throw a YoureDoingItWrongException instead?

I know Slick2D is no longer supported by you, so it's more of a question regarding why you made this decision a long time ago. Smiley (when the slow path ran on 'worse' hardware, too)
18  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-07 19:07:20
You might as well move all of the crappy 2D Minecraft clones to Archived Projects as well. Pointing

This is already the case and has been for over a year or two. It's the Cube World Projects board Pointing
19  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-06 18:04:06
To those suggesting to use a board named 'WIP Tools', 'WIP Engines' or 'Community Tools', I'd like to stress that the effect of removing the aforementioned incentive would be greatly diminished. The board name has to have a negative connotation, just like with the Chitchat Monster board - people should have the feeling to steer clear of whatever slumbers in its depths.

'Archived Projects' is indeed a misnomer, and will be renamed to something better once inspiration strikes.
20  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-06 00:15:26
@Elsealabs: indie games made mostly by hobbyists, not professional games. WIP games are encouraged, even if you don't mean to finish them. As long as it shows progress and can inspire others (to actually finish theirs). After a few projects you'll manage to finish a game, publish it, maybe even make a few bucks. Going through the entire process and making 'only' $10 by direct sales, is invaluable.
21  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-06 00:10:26
Just peek at:
   http://www.java-gaming.org/content/stats
and scroll down to 'releases'.

The light blue vertical bar in 2010 is when I took over JGO from ChrisM.

Since then, quite possibly due to a series of tiny changes, JGOs game output went from 8 games per month, to a little over 30 games per month. Most of these changes were an attempt to create a suitable eco system for indie developers. That mainly revolves around encouraging good behavior, but discouraging bad behavior is sometimes necessary, and unfortunately it's less subtle than positive reinforment. People are going to notice and push back. I'll take the feedback into consideration, and tweak the 'new rules' to make them a tad less crude, if you will.

In the end JGO is just a forum, with little to no moderation, so 'making you see the light' is mainly based on social cues. Kiss There will be differences of opinion, but we can work it out, as long as it means we continue nudging indie game developers into... developing games.
22  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-05 19:52:47
As said - if it attracts indie developers that actually produce games with it, it will be back in WIP or Showcase in no time. Seems like a fair deal to me. Once again: 'archive' is not the end of the world, it's just the name of a regular board, it's a label. The project is simply not in the spotlight anymore. Any game deserves the spotlight, engines have to earn it.
23  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-05 19:23:06
If your engine is used by other developers than those how build the engine, by developers who noticed your awesome games... then the people have spoken, and the engine will be moved back to WIP, or more likely: Showcase.

Off the top of my head, only LibGDX and jPCT would qualify at this time.
24  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-05 18:54:35
*points raised about tools*
Game Engines are little more than a set of tools and libraries. Standalone tools and libraries are not frowned upon at all. An audio library for example is usually extremely helpful to get things up and running quickly. Libraries and tools should specialize on a small subset of functionality, and excel at it. Once it turns into a clutter, it raises the bar to both adopt and maintain it. If you feel you have an engine with little gems hidden in it: split it up into independent libraries and create a few topics in the WIP/toys/tools board. This helps you focusing on your end user, and helps the end user to actually find and take advantage your work.

I'm glad you've done this, but I don't necessarily agree with stopping people from posting them altogether.
I'm not stopping people from posting. Everything is still the same, except the board in which the topic resides, and therefore the member stats, and therefore the ranking, and therefore... persecutioncomplex but everything else: the same.
25  Game Development / Newbie & Debugging Questions / Re: My Gameloop is messing with me!!! Stuck at 30FPS on: 2015-01-05 18:43:11
1  
Thread.sleep((lastLoopTime-System.nanoTime() * OPTIMAL_TIME) / 1000000);


sleep(a-b * time)
!=
sleep((a-b) * time)
26  Discussions / General Discussions / New rules regarding Game Engine topics on: 2015-01-05 18:15:32
Too many members of our reasonably sized community spent their valuable time plugging their teeny tiny little game engines to the general public. Although it can be worth spending a few rainy afternoons attempting to write a game engine, trying to plug said game engine to fellow developers is considered (by yours truly) highly unproductive, given that practically nobody capable of writing a small game, will be able to take advantage of these game engines, given they are usually written by novices that learn the basics while developing.

Game Engines (especially small ones) are going to be tied to a genre, a visual style or, to introduce my final point, a developer. Your engine matches your knowledge level, your skill, your games. It's virtually useless to anybody else. Mostly because - and you'll agree with this in a few years - it's utter rubbish. It's a bug ridden, poorly designed can of worms. I hate to break it to you (well, not really, but I'm nice and all).

The most important matter is whether your game engine is useless to you. Mostly likely not, actually! It might allow you to develop some small games, and learn a lot from the experience. Note, however, that the emphasis is on games. Developing, publishing, maintaining games is the narrow and twisty winding road to success. Actively pushing teeny tiny little engines is going to hurt your progress and, equally important, your reputation. Keep it to yourself - not to polish your crafty little turd - squeeze it in arbitrary shapes to support your shiny new games. Amaze us!


Having said that: game engine threads will be, effective immediately, moved to 'Archived Projects' and not count towards your 'Projects' stat anymore! Pointing Please note you will still be able to make updates in your thread - it won't be locked. For those that take offense: please don't. This rule has been put in place to take away some of the incentive. It is by no means meant to disregard your work - although my personal opinion is that you should focus on games instead, given the spirit of JGO.

*gasp*



Flame away!
27  Games Center / Contests / Re: Java4K Competition 2015 on: 2015-01-02 21:05:36
If there's no rush, I can make a 2nd attempt halfway January.

Added bonus would be that I could code-sign all your applets with a CA trusted cert. Applets might be dead, but it'd still be a nice alternative for a clunky Launcher desktop app.
28  Discussions / Miscellaneous Topics / Re: IRC? on: 2015-01-02 16:30:41
I actually considered that... you know, like your average shoutbox from 1995.

It sounds fun, but with the size constraints of the sidebar it gets messy, quirky and basically yield a crappy user experience. Not to mention the strain on the server, as we need (long) polling after every pageload, with fairly high request/response rates.

That not a single website does it, it pretty telling, too Smiley
29  Discussions / Miscellaneous Topics / Re: IRC? on: 2015-01-02 14:36:14
Conceptually, that is was backed and plugged by yours truly. Pointing
30  Discussions / Miscellaneous Topics / Re: IRC? on: 2015-01-02 12:57:04
It used to be freenode.net #jgo, plugged in the JGO header, but it was deserted.

For a reason. Wink
Given that it was there long before you joined JGO... can you elaborate?
Pages: [1] 2 3 ... 286
 

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

The first screenshot will be displayed as a thumbnail.

Archive (12 views)
2015-01-29 04:26:08

theagentd (16 views)
2015-01-28 15:33:52

GamerIDGoesHere (25 views)
2015-01-27 01:23:23

GamerIDGoesHere (24 views)
2015-01-27 01:22:15

CopyableCougar4 (32 views)
2015-01-27 00:34:41

CopyableCougar4 (20 views)
2015-01-26 04:47:56

Olo (14 views)
2015-01-25 21:26:00

Olo (18 views)
2015-01-25 18:44:22

Robo11 (36 views)
2015-01-25 06:14:26

basil_ (29 views)
2015-01-17 22:29:32
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

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

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17
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!