Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (581)
Games in Android Showcase (162)
games submitted by our members
Games in WIP (632)
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 ... 9
1  Game Development / Newbie & Debugging Questions / Re: HashMap issues... on: 2015-05-25 21:46:12
And does hashCode need to be overridden to check for equality? I've never overridden it.

Yes I believe so try this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
 @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * hash + Float.floatToIntBits(this.x);
        hash = 59 * hash + Float.floatToIntBits(this.y);
        hash = 59 * hash + Float.floatToIntBits(this.z);
        return hash;
    }

   
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Vector3f other = (Vector3f) obj;
        return Float.floatToIntBits(this.x) == Float.floatToIntBits(other.x)
                && Float.floatToIntBits(this.y) == Float.floatToIntBits(other.y)
                && Float.floatToIntBits(this.z) == Float.floatToIntBits(other.z);
    }


Edit: cleaned looked ugly.
2  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 02:37:18
I ran across that in my googling journey. I'm going to give that a look in the future.

I doubt the list will get large enough to need it.
3  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 02:31:38
I'm just going to keep the lambda version for now and profile later down the road.

I got what I was looking for [:
4  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 02:25:45
Yeah that's the conclusion I'm reaching.

Thanks guys!
5  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 02:15:07
Well both run just fine. But I'm trying to get used to using lambdas.

But I'm not aware of possible downsides yet. Like in this case.

Excuse the double. Didn't see @BurntPizza 's post
6  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 02:13:21
Interesting that you say that. That's what I do for my entity hierarchy.

However, that will not work in this case.

So I'm guessing ultimately in this case both are equals?
7  Discussions / General Discussions / Re: Java 8 - Stream vs Loop on: 2015-05-25 02:03:54
It's for my game's input handling. So it will be registering countless times a frame.
8  Discussions / General Discussions / Java 8 - Stream vs Loop on: 2015-05-25 01:50:37
So I've been wondering what offers best performance:

Note: items are rarely added/removed from this list after initialization.

1  
list.stream().anyMatch((i) -> (i.check()));


or:

1  
2  
3  
4  
5  
6  
for (Object i : list) {
    if (i.check()) {
        return true;
    }
}
return false;
9  Games Center / WIP games, tools & toy projects / Re: Pantless Hero on: 2015-04-13 12:29:58
Woah. Epic pixel art!
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-04-10 12:57:37
Snails have eyes in their anntenas. Plus it would look more cute
11  Java Game APIs & Engines / OpenGL Development / Re: libgdx opengl - black borders sometimes showing on a texture region on: 2015-04-07 13:36:40
I had similar issues.  Try using GL_NEAREST filtering.
12  Java Game APIs & Engines / OpenGL Development / Re: Vulkan and SPIR-V Presentation on: 2015-04-04 21:16:46
Multiple Vulkan instances and GPU handles sounds pretty exciting!
13  Game Development / Newbie & Debugging Questions / Re: JMonkey3 not compiling projects to Android... on: 2015-04-02 18:32:19
You're better off posting on JME official forum.
14  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java Universal Model Importer (JUMI) - Early Alpha on: 2015-04-01 18:53:06
Will you be supporting IQM? By far the best (super subjective).
15  Game Development / Newbie & Debugging Questions / Re: LWJGL - Shadow issue and need tips on: 2015-03-27 00:13:14
Well how would you go about implementing it in forward rendering? I can't find examples. And it seems tailored towards deferred rendering.
16  Game Development / Newbie & Debugging Questions / Re: LWJGL - Shadow issue and need tips on: 2015-03-26 21:25:04
Solved the shadow issue!

However does anyone know of a technique for AO in a forward rendering system?
17  Game Development / Newbie & Debugging Questions / LWJGL - Shadow issue and need tips on: 2015-03-26 14:23:56
So I starting texturing my models and started modular parts of the map. Like cliffs.

However, it looks like theyre floating... How can I break this illusion.

And another new issue for some reason now when models are UV mapped the shadows are wonky...


18  Discussions / Miscellaneous Topics / Re: What Anti-Virus are you using? on: 2015-03-22 16:06:48
I've never had issues with Norton 360 (now known as Norton Security). And its not even a monthly subscription. You must be thinking of the crappy Norton Antivirus, which doesn't exist anymore..

Tomsguide ranked it pretty high http://www.tomsguide.com/us/best-antivirus,review-2588.html
19  Discussions / Miscellaneous Topics / Re: What Anti-Virus are you using? on: 2015-03-22 00:52:37
I've used Norton 360 for years. It's now known as Norton Security. It's quiet, optimizes PC automatically, never gets in the way. So I couldn't be happier.
20  Discussions / Community & Volunteer Projects / Re: Starting a team (Music Composer, Developer, 3d designer, and writer needed) on: 2015-03-17 14:07:19
...

It's okay ABOODYFJ. People here get VERY hostile when there's another team building thread. Everyone has had bad experience with a "team."

So any mention of it boils our blood.

Especially when the OP has no credit within the community.

I would at least show what your "engine" is capable of.
21  Games Center / WIP games, tools & toy projects / Re: Bit Siege - 2D Competitive Multiplayer PvP Game. (Patch v1.4.2 out now!) on: 2015-03-12 01:41:25
Nice it's coming together so well! Adding in bots now was a great idea.
22  Game Development / Newbie & Debugging Questions / Re: [Slick2D] Issue with tearing when rendering tiles on: 2015-02-23 02:33:44
In my experience this has to do with the precision of your tile positions. Use floats and don't round.
23  Discussions / General Discussions / Re: Engines on: 2015-02-21 15:36:24
First of all LibGDX is a library of game development extensions. Not a full engine.

I just LWJGL because I love Java, even though many people "talk sh*t" about it.

I work on games (that I never finish) for fun on my free time. Originally I was going to develop my personal game engine in c++, however it just wasn't as fun for me. I rather work on game mechanics than worry about garbage collection, although I do enjoy developing a clean program in c++. Just not games. 

And if someone says the Java is not efficient for game dev they're nuts. Well, at least if you're an indie developer. As an indie developer the perks of another language is quite irrelevant.

This is all my own opinion. I am not that great of a game developer as its just a hobby of mine.
24  Java Game APIs & Engines / Java 2D / Re: 2D game engine. on: 2015-02-19 21:40:38
LibGDX is a great way to go.

Or Mercury, I've never used it but it's developed by a fellow JGO member and looks very promising .
25  Game Development / Newbie & Debugging Questions / Re: Realtime 3D Terrain Splat Mapping on: 2015-02-19 18:09:58
There's nothing wrong with it. Just wondering if that's how you would normally do it.
26  Game Development / Newbie & Debugging Questions / Re: Best way to do Entity Collision on: 2015-02-19 15:52:53
Check if they collide at the new position before you set them to the new position.
27  Game Development / Newbie & Debugging Questions / Re: Best way to do Entity Collision on: 2015-02-19 15:47:26
Create a bounding rectangle for each entity and check if the rectangles intersect.

You could go pixel perfect but that's much slower. Where you check all the pixels on each entity to see if any overlap.

Depending on how efficient it runs you can use a tree structure to organize your entities if you really have to.
28  Game Development / Newbie & Debugging Questions / [Solved] Realtime 3D Terrain Splat Mapping on: 2015-02-19 15:44:18
Hello again! Hopefully someone can give me some insight.

I added splat mapping to my terrain editor, but I'm not sure if the way I'm painting the blendmap is best way.
 
Currently I am "projecting" the shape and color of the brush onto an FBO for each chunk that the mouse is over.

I was thinking about using a pixel map and updating the texture using glTextSubImage2d but I figured that would be slow.

Also I heard that I could use PBOs

I hope I was clear

What would you do?


Solved.

Yeah I tried other methods I could think of. But I just ended up projecting onto a FBO. This made it easier to have really customizable brushes.
29  Game Development / Game Play & Game Design / Re: Terrain Chunk Sizes on: 2015-02-18 18:52:53
I'm not tiling. 3D texture splatted terrain.

What do developers normally use for dimensions?

@Ed_RockStarGuy yeah 16x16 sounds good.

Plus terrain data will not be streamed from server. It will not be procedural terrain.
30  Game Development / Game Play & Game Design / Terrain Chunk Sizes on: 2015-02-18 18:39:42
So I've been working on an editor for my game. And I've reached a point where I would like to ask what everyone thinks the best practices are.

What I would like to know is how can I determine the best resolution for the terrain blendmap for each chunk.

And what are good dimensions for a terrain chunk. Currently my chunks are 33x33 verts

What would you do?
Pages: [1] 2 3 ... 9
 
MrMapcom (16 views)
2015-05-23 20:26:16

MrMapcom (22 views)
2015-05-23 20:23:34

Waterwolf (29 views)
2015-05-20 15:01:45

chrislo27 (36 views)
2015-05-20 03:42:21

BurntPizza (71 views)
2015-05-10 15:53:18

FrozenShade (56 views)
2015-05-07 09:11:21

TheLopais (218 views)
2015-05-06 13:36:48

TheLopais (202 views)
2015-05-06 13:35:14

TheLopais (207 views)
2015-05-06 13:33:39

TheLopais (227 views)
2015-05-06 13:32:48
List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

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