Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Is there a small geometry library for java out there?  (Read 1314 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Posted 2013-11-02 21:24:12 »

What I need is a small, simple geometry library with shapes and intersection. I googled it, and nothing useful came up.

Anyone know of one?

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Offline JFixby
« Reply #1 - Posted 2013-11-02 21:46:30 »

what for?

my dev log: http://jfix.by/
Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Reply #2 - Posted 2013-11-02 21:49:53 »

For my game engine MERCury. I realized that I cannot re-invent the wheel with geometry, so I want to get a small, simple library.

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline opiop65

JGO Kernel


Medals: 124
Projects: 7
Exp: 3 years


Team Alluminum


« Reply #3 - Posted 2013-11-02 21:52:16 »

Its better just to do it yourself, honestly. If you're having trouble with collision detection, thats a whole other issue, but a basic geometry library isn't hard to create, just tedious.

Edit: I found this:
http://tsusiatsoftware.net

Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Reply #4 - Posted 2013-11-02 21:58:13 »

Ok, thanks  Grin.
I usually make my own libraries, and for geometry, I just felt that I might be doing something less efficient than someone else has...
But if it is that easy, then I will just do it for myself.
Thanks!

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Offline JFixby
« Reply #5 - Posted 2013-11-03 18:33:46 »

I dunno, maybe it make sense for you to use Box2D wrapped by libGDX. Check it out anyway.

my dev log: http://jfix.by/
Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Reply #6 - Posted 2013-11-03 22:50:32 »

I said 'small' and 'simple' 'geometry library,' not a physics library!

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Offline Jeremy
« Reply #7 - Posted 2013-11-03 23:47:55 »

I said 'small' and 'simple' 'geometry library,' not a physics library!

http://www.vividsolutions.com/jts/JTSHome.htm

I haven't used it personally, but it is quite robust, mature and it works in pure Java which is also a plus.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline opiop65

JGO Kernel


Medals: 124
Projects: 7
Exp: 3 years


Team Alluminum


« Reply #8 - Posted 2013-11-04 02:33:30 »

Yes, but we all know box2D is a full out physics library, which is not what he needs. A simple class that creates geometry based on coordinates that are passed in should be more than sufficient. I don't see the need to overkill it with box2D, not that its a bad library, its actually very good.

Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Reply #9 - Posted 2013-11-04 02:53:19 »

Quote
then I will just do it for myself.

I just said, I made it my own. Went wonderfully. End of conversation.

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CommanderKeith
« Reply #10 - Posted 2013-11-04 06:18:58 »

Hi,
I had the same problem and tried to make one: straightedge (https://code.google.com/p/straightedge/). It's on google code and you can download the source. You would be most interested in the KPolygon and KPoint classes. They contain most of the useful geometry methods.
For more advanced geometry stuff, try JTS. It's more advanced than my library, but not made for speed.
Cheers,
Keith

Offline StumpyStrust
« Reply #11 - Posted 2013-11-04 07:44:58 »

What is wrong with the ones in java? You said you looked online but never looked at java? Java has everything you want. Make a polygon and test other polygons against it.

I would NOT write your own. They are simple but hard to make fast. CommanderKeiths like is good. Use that lib.

Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Reply #12 - Posted 2013-11-04 13:12:02 »

For the last time! It is a done deal! I already just made m'y own. Worked beutifully!

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Offline Nate

JGO Kernel


Medals: 129
Projects: 3
Exp: 14 years


Esoteric Software


« Reply #13 - Posted 2013-11-04 19:30:02 »

It's a discussion forum, people are discussing. You don't get to end a thread, even if you started it. Smiley

libgdx has a Rectangle, etc class. There is an Intersector class and most if it would be easily ported for use anywhere.

Offline wessles

JGO Ninja


Medals: 49
Projects: 4
Exp: 3 years


Coding with bad posture since 2011... Nonstop.


« Reply #14 - Posted 2013-11-04 20:40:44 »

Ok, sorry  Clueless.

You don't know nerdiness yet; you haven't even met me!
www.wessles.com
Pages: [1]
  ignore  |  Print  
 
 

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (48 views)
2014-04-15 18:08:23

BurntPizza (44 views)
2014-04-15 03:46:01

UprightPath (60 views)
2014-04-14 17:39:50

UprightPath (42 views)
2014-04-14 17:35:47

Porlus (58 views)
2014-04-14 15:48:38

tom_mai78101 (82 views)
2014-04-10 04:04:31

BurntPizza (140 views)
2014-04-08 23:06:04

tom_mai78101 (240 views)
2014-04-05 13:34:39

trollwarrior1 (200 views)
2014-04-04 12:06:45

CJLetsGame (207 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22: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!