Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (575)
Games in Android Showcase (154)
games submitted by our members
Games in WIP (623)
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]
1  Game Development / Newbie & Debugging Questions / Re: LWJGL water shader effect 2D not working on: 2015-04-23 12:35:43
Can you elaborate on what's not working exactly? The program you posted (assuming it's correct - it looks correct, but I might be missing something) just does straightforward rendering of textured geometry without any special effects, but maybe you know that and just haven't gotten to the water simulation code yet.

In any case, some more details would probably help.

[Edit: It looks like you edited your original post, so at least some of what I wrote here is no longer relevant.]
2  Discussions / General Discussions / Re: Need halp (help) testing native binaries on Mac and Linux on: 2015-04-21 10:46:55
If PM is acceptable, I could help out that way (I have a Mac and a Linux machine available).
3  Game Development / Newbie & Debugging Questions / Re: Changing animation of an AI on: 2015-04-20 05:46:37
In addition to chrislo27's suggestion, here's another approach you could try. In short, if the entity is moving 'more' up or down than laterally (as determined by the absolute values of the velocity components) you'd use an up or down animation, else you'd use a lateral animation. Pseudocode (may be errors):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
// If exact comparisons to zero aren't suitable for numerical reasons, or if you
// know a priori when the entity isn't moving, you can use some other method here
// for determining that the entity is stationary.
if (vel.x == 0 && vel.y == 0) {
    animation = "stationary";
} else if (abs(vel.x) > abs(vel.y)) {
    animation = (vel.x < 0) ? "left" : "right";
} else {
    // You might need to invert this, depending on your coordinate system.
    animation = (vel.y < 0) : "down" : "up";
}

If the entity is moving more or less diagonally, you might find that it switches back and forth between two animations frequently in a way that may not be desirable. This can be addressed by applying some hysteresis (this would make the code a little more complex though).
4  Game Development / Newbie & Debugging Questions / Re: 3D collision on: 2015-04-19 12:54:24
What I have been looking for is a system that will be able to identify if two OBJ files intersect and resolve to it.

Are the objects potentially non-convex?
5  Game Development / Newbie & Debugging Questions / Re: libgdx position of a body in relation of it´s plattform? on: 2015-04-18 20:53:46
i want my enemy body to walk left and right on a plattform without falling.

Assuming you want the enemy to remain entirely on the platform (that is, not to hang over the edge), the enemy should not be allowed to go any farther left than the left edge of the platform plus half the enemy's width, and should not be allowed to go any farther right than the right edge of the platform minus half the enemy's width. Pseudocode (no guarantee of correctness):

1  
2  
float extent = enemy.width / 2;
enemy.x = clamp(enemy.x, plaform.left + extent, platform.right - extent);

There are of course other considerations, such as how the enemy will move and so on, but the above at least addresses the specific question of how to constrain the enemy to the platform.
6  Game Development / Newbie & Debugging Questions / Re: calculateBoundaries on: 2015-04-15 15:47:43
By model position, I just mean the position of the model. So yeah, based on the code you posted, we can conclude that sceneX/Y/Z is the position of the model relative to the camera position.

Quote
I find it difficult to read rotations, how were you able to suspect that it is the z value?

In 2-d, a rotation matrix looks like this (column vectors - all examples off the top of my head, so no guarantees of correctness):

1  
2  
3  
4  
5  
c = cos(angle)
s = sin(angle)

[ c -s ]
[ s  c ]

When rotating into camera space, we want to do the opposite of the camera rotation. For example, if the camera yaw is 45 degrees, we want to rotate by -45 degrees. To get the opposite rotation, you invert the matrix, like this:

1  
2  
[  c s ]
[ -s c ]

If you transform a vector by this matrix, you get:

1  
2  
[  c s ][x] = [  cx+sy ]
[ -s c ][y]   [ -sx+cy ]

Notice that if you substitute z for y, the second component of the result above is exactly how 'a' is computed: that is, a = cz-sx. In other words, it's the result of transforming 'z' into view space.

Quote
View space is just another word for screen coordinates right?

Not quite. View space (sometimes called camera space) is the local space of the camera, conceptually speaking. 'Screen space' usually refers to a later stage in the pipeline.
7  Game Development / Newbie & Debugging Questions / Re: calculateBoundaries on: 2015-04-15 13:49:27
Quote
For example, the minimum boundaries start as very high numbers because the vertices corresponding component should always be below it. The opposite goes for max boundaries.

Sure, I understand that. I was just pointing out that the value '99999' is arbitrary. I'm sure it's fine in the given context, but for modern code I'd use the actual numeric limit for the type instead. I understand this is old code though.

Beyond that, honestly this doesn't look like the easiest code to unravel Tongue Assuming though that sceneX/Y/Z is the model position relative to the camera, maybe we can make sense of the first few lines.

The variable 'a' looks like it's maybe the z value of the sceneX/Y/Z position after being rotated into view space to account for yaw. 'b' may be a similar correction for pitch. After this the maximum extent of the object (computed earlier) is factored in. The function then early-outs if the object is outside the projection range based on these values.

It looks like the code that follows does similar checks against the edges of the frustum and so on. It would take some time to make sense of it all, but that's a start at least.
8  Game Development / Newbie & Debugging Questions / Re: calculateBoundaries on: 2015-04-15 05:45:00
The elliptic paraboloid stuff is interesting, but I don't think it's directly relevant here (it's just incidental to the fact that you're performing length and squared length computations).

For what it's worth, here:

1  
maxDepth = sqrt( x^2 + z^2 + minY^2 )

You've omitted the inclusion of 'minDepth' in the original code, although that may be intentional.

The use of integers and the arbitrary boundary initializers (+/-99999) could also be problematic, depending on the circumstances, but maybe that's done for a reason as well.

If you need more info, perhaps you could tell us a little more about the context, such as where the code is from, what space the computations take place in, and so on.
9  Game Development / Newbie & Debugging Questions / Re: Rotation Problem on: 2015-04-14 01:56:07
In addition to the above, you might take a look here and here. As mentioned above, with the method you're using, it seems likely pixels may be missed due to rounding. In the aforementioned links it's suggested to iterate over the destination pixels rather than the source pixels, and rotate backwards to find the corresponding source pixel. In this case you may sample some source pixels more than once (and may skip others), but you'll be sure to hit every destination pixel. I haven't implemented image rotation myself so can't speak from experience, but iterating over the destination instead of the source is something you could try in addition to the above suggestions.
10  Discussions / General Discussions / Re: Hiring a Java developer on: 2015-04-14 01:36:55
Voice recognition software can help.

Oh, it's nothing like that - thanks though.

Anyway, the suggestions and feedback here have been very helpful, so thanks to everyone who replied.
11  Discussions / Business and Project Management Discussions / Re: [PAID] Looking for Java consultant on: 2015-04-13 19:17:04
Maybe this and this can help. Good luck.

Thanks, I will take a look at those.
12  Game Development / Newbie & Debugging Questions / Re: Using AABB in a platformer not working well on: 2015-04-13 11:34:30
No guarantees of correctness (I've been away from this stuff for a while), but here's what I noticed.

1  
A.setY(A.getY() -  2);

Here you're moving the player up a little after a collision has been detected, presumably to move the player 'out of' the platform. The problem is that the collision detection function doesn't differentiate between colliding with the platform from the top and colliding with it from the side. Because of this, whenever the player collides from the side, the player is moved upwards, leading to the undesirable behavior you're seeing.

Assuming you can guarantee the player won't move far enough in a single update to tunnel through the platform, you can solve this problem using a slightly more sophisticated version of the separating axis test. As a bonus, this will also give you more robust handling of interactions between the player and the platform.

Specifically, what you're looking for is the 'minimum translation vector'. A Google search for 'sat minimum translation vector' turns up a lot of promising-looking hits, so that'd probably be a reasonable place to start.
13  Discussions / General Discussions / Re: Hiring a Java developer on: 2015-04-13 10:55:45
But beware, good java developers cost some money. (50-80$ an hour, maybe more, depending on the job and skill set ... consultants are even more expensive.)

Yeah, I understand, and I'd be more than happy to pay those rates for 3-5 hours of work.

Thanks for the suggestions of places to look - I'll check them all out.

Having said all that, clearly the most common response has been just to post in the forums :) Without going into detail, let me just say that I have a condition that makes programming a very slow process for me. The kind of help I need will require a little patience, which is why I'd be more comfortable paying someone for assistance than posting in the forums. (If I can't find anyone though, I may just have to brave it.)
14  Discussions / General Discussions / Re: Hiring a Java developer on: 2015-04-13 05:16:08
Quote
It depends on how much money you are willing to spend. Hiring programmers online like that can be very expensive from what I have seen.

What kind of project is that? Is it supposed to be a commercial project for some kind of legit company?

It's a personal project for now - at the moment I'm just focusing on getting the end product to the highest quality I can. As for cost, I know hiring experienced developers can be expensive, but all I'm looking for is some consultation via email (maybe a few hours work total), which I'm prepared to pay professional rates for.
15  Discussions / General Discussions / Hiring a Java developer on: 2015-04-13 03:31:45
I was wondering if anyone here had any suggestions on how to go about hiring an experienced Java developer for help finishing up a game project.

I've tried posting here a couple times, but haven't had any interest (it was suggested that I just ask for help in the forums, but the scope is really too much for that setting). I've tried a few other places as well and am continuing to search, but I haven't had a great deal of luck so far.

Does anyone have any thoughts or suggestions on where or how to advertise for something like this? (If this would fit better in a different forum, please feel free to move it.)
16  Discussions / Business and Project Management Discussions / Re: [PAID] Looking for Java consultant on: 2015-04-10 05:28:08
Your issues (concurrency and embedded JRE) seem simple enough to not have to pay people for assistance. Who doesn't NOT want to spend money?  Tongue

Yeah, I understand Smiley Again, I may try the forums as well, but I actually have some specific reasons for wanting to hire someone despite the simplicity of the tasks. I won't clutter up the thread by elaborating here, but I'll be happy to provide more details to anyone who's interested. Meanwhile though I'll just say that even though the tasks are fairly simple, I'm still interested in hiring someone, so if there's anyone who's interested in some contract work please don't hesitate to get in touch.
17  Discussions / Business and Project Management Discussions / Re: [PAID] Looking for Java consultant on: 2015-04-09 23:58:42
Quote
Depending on your questions, we have many experts and semi-experts here, we might be able to answer your questions or give code suggestions simply via the forums.

Thanks, I may try the forums as well. That said, the scope of what I'm looking for might be beyond what's appropriate for the forums, so at this point at least I'm still looking to hire someone. In any case, if anyone is interested or would like additional information, please don't hesitate to post here or PM me.
18  Discussions / Business and Project Management Discussions / [PAID] Looking for Java consultant on: 2015-04-09 03:20:19
I'm looking to hire one or more experienced Java developers to help with a couple things. Specifically, I'm looking for:

- Help with some simple concurrency issues.

- Consultation regarding distribution of Java apps in native executable form with an embedded JRE.

I advertised here some time ago and didn't get any takers that time around. I know there are many experienced Java developers here though, so let me emphasize that this is paid work and I'm prepared to pay professional rates. So, if either of the items above seems like something you'd be able to help with, please get in touch.
19  Discussions / General Discussions / Re: Synchronous loading on: 2015-04-07 09:06:11
Quote
FTL (Faster Than Light) had a problem in the early versions where the game was essentially loading one tiny resource at a time, then swapping buffers (Display.update()). The loading screen obviously went at an FPS of several 1000s, but if you enabled V-sync the game took almost a minute to load due to the FPS being capped to 60 and hence, 60 resources per second.

Yeah, loading one resource per buffer swap doesn't work for exactly this reason. To avoid this problem I load multiple resources between buffer swaps. With my current setup (with v-sync at 60), loading takes < 3 seconds on a fast machine, and there's never more than a half-second or so between buffer swaps (and I can easily lower that if needed).

Quote
Although I have to admit I do kind of judge a game's stability based on how well it handles loading screens, it still seems redundant in your case.

This is my concern. Although it really doesn't seem like multi-threaded loading is needed here (or even that it would be particularly beneficial), I worry that publishers or end users might evaluate the game as de facto poorly implemented if there's even a hint that the loading screen isn't asynchronous.

Anyway, if you or anyone else knows what's common among commercial games these days (or if anyone would be willing to share what they're doing in their own projects), I'd be very interested. I'm still hoping to avoid multithreading, but maybe it's the safest way to go.
20  Discussions / General Discussions / Re: Synchronous loading on: 2015-04-07 07:33:50
Quote
From your new response, I assume you mean having a separate thread for loading resources while the main thread just takes care of the load screen? In this case, you won't get any noticeable performance increase as you're not really splitting up the workload between multiple threads or increasing your queue depth. The additional complexity does not sound worth it.

Your description is correct; it would just be a single extra thread while the main thread handles the loading screen.

My reason for considering it isn't performance, since as you mention there's unlikely to be any gains there. Really, my only concern about the single-threaded version is that it can block the main thread for up to a half-second or so, and, being paranoid, I worry that publishers or end users might view this as poor form.

As far as I know, lots of commercial games have used synchronous loading, so it doesn't seem like it should be a problem. I'm not completely confident about that though, so I'm just looking for some reassurance on the issue.

Thanks for the feedback so far. Any further thoughts or suggestions are welcome.
21  Discussions / General Discussions / Re: Synchronous loading on: 2015-04-07 06:41:22
Thanks for your reply.

Quote
Loading multiple resources at once is not a good idea. The biggest bottleneck in resource loading is the hard disk read speed, and trying to read two files at once will add overhead because the hard disk has to keep switching the location it reads from instead of reading contiguous chunks.

I'm not quite sure what you're referring to here. Are you talking about e.g. loading one resource in thread A while simultaneously loading another resource in thread B?

If so, that wouldn't happen even in the multithreaded version. There would only be one extra thread for loading, and all resources would be read in sequence in that thread. Also, the resources are actually stored in an archive that's read from disk and decompressed in one go, so no matter what there'll only be one read from disk.

I'm definitely looking for suggestions though, so if I'm misunderstanding you or if it sounds like I'm taking the wrong approach, please let me know.
22  Discussions / General Discussions / Synchronous loading on: 2015-04-07 00:56:19
So far in my Java-based game everything has been single-threaded, including loading. I'm now in the process of finishing everything up and am wondering if I need to make the loading asynchronous. Although this would be a fairly simple application of multithreading, it would add quite a bit of complexity and would make it considerably more difficult to ensure correctness.

Basically, I'm interested in people's opinions on whether sticking with synchronous loading would be a viable option. The loading for the game takes between 2 and 5 seconds (depending on the machine), there's a loading bar, and the main thread is never blocked for more than half a second or so.

Does this sound acceptable for a commercial product? Might publishers or game portals reject a game that doesn't load resources asynchronously?
23  Discussions / Business and Project Management Discussions / Looking for assistance with Java packaging and distribution (paid) on: 2013-10-02 14:59:14
I have a casual puzzle/arcade game in the final stages of development. The game is written in Java using LWJGL, with scripting in JavaScript using Rhino, and targets Windows, OS X, and Linux PCs.

I'm looking for one or more people with expertise in Java and distribution of Java applications to help with creating native executable packages (e.g. .exe, .app) and to help with a few other related issues. It should only amount to a few hours of work total, but it might be spread out over several weeks.

Compensation will be a fixed or hourly fee to be negotiated.

If you're interested or would like more information, please post here or send me a PM.
Pages: [1]
 
BurntPizza (27 views)
2015-04-23 03:42:11

theagentd (31 views)
2015-04-22 16:23:07

Riven (45 views)
2015-04-16 10:48:47

Duke0200 (52 views)
2015-04-16 01:59:01

Fairy Tailz (39 views)
2015-04-14 20:13:12

Riven (41 views)
2015-04-12 21:36:37

bus hotdog (58 views)
2015-04-10 02:39:32

CopyableCougar4 (61 views)
2015-04-10 00:51:04

BurntPizza (62 views)
2015-04-06 22:06:58

ags1 (62 views)
2015-04-02 10:58:48
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

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
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!