Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
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 ... 298
1  Games Center / WIP games, tools & toy projects / Re: [libgdx] Cthulhu ftaghn on: 2015-09-01 19:10:19
Granting unlock-request. Pointing
2  Discussions / Miscellaneous Topics / Re: My Latest Project: Wagery on: 2015-08-30 08:38:23
Your Dropbox images are not public - you are the only one who can see them.

Your domainname redirects to http://73.9.75.150:8886/index.html, which is accepting connections but timing out.
3  Discussions / Miscellaneous Topics / Re: OpenAL fails on my computer on: 2015-08-27 22:34:05
Am I, as a socially awkward overlord, simply too lenient? For years, hell, probably a decade, Julien has fought this wars of the APIs on JGO, spreading annoyance and misery to those involved. We had to close down entire boards, had to issue countless warnings and moderations (after which Julien threatened to sue JGO into oblivion, and as he has sued websites before, it wasn't an idle threat).

He has been banned, warned again, escorted to the padded room and resided there for months, and then... only weeks later, there are these insinuations, indirect references to 'the others which are different which should not be compared', causing even those among our elite to finally... lash out.

Julien, I am lenient once again, because somehow I feel sorry for you, but this is your last warning: one more insidious remark about the 'profound' difference between LWJGL and JogAmp, and you are out. Forever. Joining only a handful of people that were ever perm-banned on JGO. We can do without the toxicity.
4  Game Development / Newbie & Debugging Questions / Re: About separating game logic from rendering on: 2015-08-26 12:07:26
Take into consideration that this should be considered a guideline, not a holy grail. When you develop your game, you will most likely suck at it at some level, and the code will be a complete mess. This is okay, as long as you learned something developing these small games. People who get stuff done, tend to be less uncomfortable with crappy code.

So don't start refactoring just yet - developing and finishing a game is - at this point - the goal. Keep general guidelines in mind, but by all means don't try to make the renderer swappable. Such things are incredibly hard for developers with a decade of experience under their belt. Ask yourself this: will you port your game to another platform any time soon? If not, don't bother, just get your game playable, that is hard enough as it is, when you're new to the game.
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-23 14:06:47
My impression is that here are no optimal values, as we have different CPU brands, controllers, generations, frequencies - same applies for RAM. Then you have all permutations of those. Each system will have its own sweetspot. Redistribution of entities over cells is a relatively cheap operation, as it is O(n), and the operation is cache friendly, as you use a more or less ordered dataset to fill another ordered dataset.

Lets say you adjust the cellsize every 20 frames (3Hz). Then you have a dataset of avg performance over the last 20 frames, and the avg performance over the 20 frames before that. If the performance improved, make the same change you did last time (grow or shrink cell size),  if performance degraded, do the opposite. Outliers will have been averaged out (with 20 frames, their effect is 5%). In the grand scheme of things it is not even bad to guess wrong quite frequently anyway. It will converge back to a more optimal cell size within the next second or so.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-22 21:58:08
I once has this grid that was self-adjusting. Every N frames it would either grow or shrink in cell size, and measure performance differences. It would converge to the optimal solution, and then adjust itself when the environment changed, and converge to the new optimal solution. Give it a try, it is easy to implement.
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-21 07:21:18
4) Discovered that FP abs (which ignores negative zeros) really should look like this
as opposed to which implementation?

return Float.intBitsToFloat((Float.floatToRawIntBits(a) & (-1>>>1)));

About three weeks ago I had the same idea, and I'm still not sure why there is a discrepancy between Math.abs(float) and Math.abs(double), according to the javadoc.

1  
2  
Math.abs(float) --> Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))
Math.abs(double) --> Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)

The result is the same, but why would you want two shifts instead of one masking operation.
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-20 22:10:17
It should be either load/store or get/set, not store/set.

My two cents. Kiss
9  Discussions / General Discussions / Re: MySQL insert became fast after adding an index on: 2015-08-19 20:30:52
There isn't enough information for us to answer the questions really. All i can say is that full table scans are slow.

If you want to get to the bottom of this, just drop the index and profile your code.
10  Games Center / WIP games, tools & toy projects / Re: Ooze - Android 2D Jumper on: 2015-08-19 19:42:32
The moment I try to 'become a beta tester' Google's webserver produces a nice Internal Server Error. Clueless
11  Discussions / General Discussions / Re: MySQL insert became fast after adding an index on: 2015-08-19 19:26:48
Maybe the non-indexed SELECT queries were swamping the server so much that the INSERT queries barely came through...? The SELECT queries would have had to be hammering on the database continuously though... that might be rather unlikely.
12  Discussions / General Discussions / Re: MySQL insert became fast after adding an index on: 2015-08-19 16:34:10
Quote
In most cases, ALTER TABLE makes a temporary copy of the original table. MySQL waits for other operations that are modifying the table, then proceeds. It incorporates the alteration into the copy, deletes the original table, and renames the new one.
from mysql.com

Maybe a fragmented table got rebuilt into a new one.

Also: InnoDB? MyISAM? Using transactions? Which isolation level? Doing bulk inserts or prepared statements?
13  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-19 15:36:14
So you wanna keep it pure, eh? Pointing

1  
2  
TranslationRotationScale.interpolate(trs1, trs2, alpha, trsDest);
trsDest.toMatrix(matDest);
14  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-19 15:18:28
@KaiHH: given your latest pastebin, it seems almost trivial to extract the code from that method to make it happen.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public static void interpolateTransform(
   Vec3 position1,
   Quaternion orientation1,
   Vec3 scale1,

   Vec3 position2,
   Quaternion orientation2,
   Vec3 scale2,

   Matrix4 dest
) {
   // this is where the magic happens...
}


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public static void interpolateTransform( // assumes both scales are 1.0
   Vec3 position1,
   Quaternion orientation1,

   Vec3 position2,
   Quaternion orientation2,

   Matrix4 dest
) {
   // this is where the magic happens, once again...
}
15  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-19 15:08:19
@theagentd: isn't the conceptual issue that matrices are a rather poor fit to hold this information in the first place, and it's just that they are convenient (relatively graspable, as opposed to quaternions) and GPUs are optimized for dot-products, which multiplying a vector by a matrix basically boils down to. To summarize: matrices are nice as a final result, but should not be used as *inputs* for operations like interpolation.

Basically, to allow for interpolation between matrices, you'd need to decontruct them into a translation component (vec3), a scale component and a orientational component (quaternion), lerp these components, then construct a new matrix from these.

The original data (translation, scale, orientation) is likely to be available elsewhere, so the conversion to and from a matrix (to allow for interpolation) is potentially redundant.

In conclusion: it certainly won't hurt anybody, but... is it the right thing to do? (and should we care about doing the right thing?)
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-18 20:18:19
opiop: the developer that left you with that code is doing the right thing. the bug is somewhere else entirely. you should write some unit-tests so *you* get a firm grasp on the ugly and quirky JDBC API. if you are changing business logic you'd better be damn sure you know how your API behaves. write unit-tests to prove your assumptions, because the spec / javadoc can be unhelpful/ambiguous at times.
17  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-18 17:48:58
What about this optimisation:
https://en.m.wikipedia.org/wiki/Fast_inverse_square_root

Would it be applicable, or would it affect accuracy too much?
Maybe it is not even faster in HotSpot and/or on modern CPUs.



As another note on performance: I wouldn't write into each field of dest twice. Only write the final 4 values into the object. You can use localvars to allow HotSpot to be more aggressive.
18  Discussions / General Discussions / Re: Azul Zulu on: 2015-08-18 16:16:00
Interesting indeed, but what are the pros (for us)?

Being open sourced there's nothing stopping you from hacking out the bits you don't want, either.
This depends on the license. Pointing
19  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-16 22:05:17
I think we can generalize the statement made by KaiHH, and observe that pointing out problems whilst not intelligibly explaining a solution, does not work in the majority of social contexts. Only in rigid hierarchies such communication can potentially be considered helpful or motivating, but even then it is frowned upon, and usually used as a last resort.

To paraphrase myself from an earlier reply: being correct is meaningless when you cannot convince people that you are correct. You have to descent all the way down to the level of whoever you're trying to convince.

I will probably split all this off into it's own thread, once things settle down, so we can focus on JOML again, soon.
20  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-16 21:28:22
KaiHH != Zero.
21  Game Development / Game Play & Game Design / Re: Octalysis gamification framework on: 2015-08-14 19:29:26
Don't forget the activation-quiz, that fuels 'elitism' for the newbies and 'high five' for everybody else.

JGO is such a meta game these days Roll Eyes
22  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-11 15:46:05
My experience with the 'Program Files' folder (on Windows XP / Vista) is that you may create files and write data into them, but you may not overwrite said files. The OS blocks this action with a permission error. It's better to keep every file that may change at one point in the far future, either in the home-dir, or in %appdata%.
23  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-08-06 13:14:52
Going the extra mile... impressive. A disoriented woman once said: being right is fruitless when one fails to convey.
24  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-04 17:00:29
One 'problem' with that approach seems to me, that for the launcher to update itself, it has to be launched twice. If the launcher is broken (which is the reason you want it to update itself) this might be a no-op and the player would be stuck. (short of redownloading the installer, which contains the new launcher)

For me it was all about getting 'stage 1' to only download one file, no GUI, no threading, lean and mean - to reduce the chance that it ever needed an update. Once that works reliably you can modify the 'stage 2' updater as often as you want, without any fear that your latest updater will include a bug that will 'brick' the game and breaks the sync, forcing a redownload of a new installer by the player.

Anyway, I feel like I'm pushing it a bit too much, even when I'm 'just' explaining how we did it Pointing
25  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-04 08:18:56
You have to check for corrupted files, deleted files and locked files.

You'd do this during sync (obviously), and immediately before launching the game.

We'd have one hosted 'index' file, that listed all relative paths and (post-decompression) hashes, and start the sync from there.

26  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-03 15:16:15
Which means if the game launcher updater doesn't work, you can't do anything and nothing works.
Ofcourse, at one point, something has to work, but the game-directory must always be in a state that is launchable - that is: no partial updates, ever.

If the launcher (stage 1) doesn't work, the current version of the updater (stage 2) will be started.
If the updater (stage 2) doesn't work, the current version of the game will be started.
This implies that your installer is not an 'empty shell', you must ship a (supposedly) functioning version of your game in your installer, as people may not have a working internet connection when they first launch the game.

The updater (stage 2) is typically tiny (say, 200KB) so that the launcher (stage 1) can download and store it. The launcher does not extract DLLs or anything too advanced. The ~200KB download is so small, that the 'logic' to handle stalled downloads can basically be boiled down to: "if it didn't finish in 10s, abort and launch updater".
27  Discussions / General Discussions / Re: How does JGO use long polling? on: 2015-08-03 13:01:11
Active polling through a JDBC connection (
SELECT MAX(ID_MSG) FROM jgo_msg
at 1Hz) is not worthy of optimization. I've got better things to do than to worry about 1 second of CPU time per day Pointing

JGO is never deserted Smiley and even if it were, sobeit. It is a constant load, so if it is okay when the server is under heavy load, it's certainly acceptable if the server is idle. The most important resource to consider would be my limited time, not to get a near-idling CPU to fully idle. It would be trivial to add though, but I can't be bothered.

What you have to consider though is minimizing the Socket send/recv buffer sizes, as that can take quite a bit of RAM.
28  Game Development / Newbie & Debugging Questions / Re: 3D Frustum Clipping with Textures on: 2015-08-03 12:41:42
Any one know how to fix this? I tried making the new triangle(s)' texture vectors the same as the texture vectors on the original unclipped triangle but this isn't working.
You have to calculate the new texcoords. Try to visualize the tesselated triangle, or draw it with pen and paper, and figure out how texcoords are interpolated, to figure out which texcoords are at every pixel. Once you have that down, you can calculate texcoords for an arbitrary pixel, which leads you to the answer to your question.
29  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-03 11:20:44
But how would you sync the files without an JVM? You would be moving more and more critical logic into scripts, and those scripts are limited - multi-threading is required in such a sync, and you really want a proper GUI to show while the download is in progress.

Having said that, even with a JVM you can update the JVM by simply putting one along side the current one, and invoke its java-executable.

Anyway, I'm not saying what we did at Puppygames was the holy grail, but it allowed us to update the updater, which turned out to be absolutely necessary, as getting something as simple as downloads to be reliable was truly a headache, given DNS issues (add fallbacks to raw IP-addresses, as some DNS servers will resolve to the wrong IP for sub-domains!), misconfigured firewalls (only use port 80 and 443), crippling anti-virus suites (hash your files, check the hashes regularly - you cannot overwrite a temporarily locked file either), crappy network-connections (people barely inside their wifi-range), full harddisks (if you write until it's absolutely full, you're screwed and the player's OS may get affected), etc, etc. What happens if the player accidentally launches the game twice - and the syncs will run concurrently...

There are a ton of edge cases. You simply cannot handle this all with a .bat / .sh file properly.
30  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-03 09:28:43
There is no need for scripting.

Make this launcher jar that is bare bones, that syncs the game-updater, that syncs the game.

This three-stage setup allows you to have a tiny launcher jar (no GUI, tiny chance of bugs) that can update the game-updater (has GUI, will need maintenance) that then spawns the game.

This all happens in the same JVM - use classloaders to load in the jars after the sync.

Keep in mind that 'downloading' is actually a hard nut to crack. You will need to handle stalled connections, have retry logic, etc. You cannot rely solely on socket timeout exceptions, you need a thread that monitors the I/O per download and disconnect when throughput stalls for more than N seconds. It took us quite a few iterations to handle all corner cases.

This is how we did it at Puppygames, before ditching it to fully rely on Valve's CDN.
Pages: [1] 2 3 ... 298
 
Coldstream24 (5 views)
2015-09-03 00:41:28

Andrew_3ds (22 views)
2015-09-01 19:08:10

afikri (15 views)
2015-08-31 09:30:22

afikri (23 views)
2015-08-31 09:30:07

afikri (11 views)
2015-08-31 09:27:24

afikri (15 views)
2015-08-31 09:26:40

Roquen (21 views)
2015-08-29 11:30:54

GamerC4 (33 views)
2015-08-22 20:38:50

GamerC4 (29 views)
2015-08-22 20:37:18

GamerC4 (35 views)
2015-08-22 20:37:01
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30
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!