Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (569)
Games in Android Showcase (154)
games submitted by our members
Games in WIP (618)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6 7 ... 10
 41 
 on: 2015-04-16 18:43:18 
Started by Mads - Last post by gouessej
Hi

Mads, you've just reminded me that I have to work on portal culling and I've found this open source (permissive license, BSD) library in C++ which I can partially port:
http://www.visualizationlibrary.org/documentation/pag_guide_portals.html

Coming here is almost always a pleasure, thanks to all.

 42 
 on: 2015-04-16 18:32:16 
Started by tommohawkaction - Last post by VaTTeRGeR
We used it in our high school in 8th grade to teach some veeeeeery basic programming stuff.
You can change, rotate and move the sprites and set custom background tiles and add logic but doing anything complex goes against it's intended use, which is learning OOP, basic java syntax and programming logic.
It forces you to use a grid and tiles and integer positions etc.

tl;dr -> it is not really for game development.

 43 
 on: 2015-04-16 13:23:44 
Started by noctarius - Last post by noctarius
My pleasure Smiley

 44 
 on: 2015-04-16 12:04:56 
Started by tommohawkaction - Last post by tommohawkaction
From developer to developer i want to know what do you think of GreenFoot as my college will be using it next year and personally I think its a an advance version of scratch but allows people who have no experience of java to go straight into game dev.

 45 
 on: 2015-04-16 09:24:08 
Started by Mads - Last post by junkdog
If you go with a grid for spatial partitioning (which sounds like a good fit for a TD game), consider to register each entity in all cells they occupy. I used to only put the anchor point in the cell, which required checking neighboring cells for collisions too.

My approach is usually to have a 1d array of Bitsets representing the grid and entities; though it requires that your entities/colliders can be represented by a zero-based numbering scheme.

http://gameprogrammingpatterns.com/spatial-partition.html

 46 
 on: 2015-04-16 09:22:29 
Started by Mads - Last post by theagentd
Grids are good. They're extremely easy to query (loop over grid tiles that intersect the query area) and they're fast to maintain (check if all objects still are inside their grid tile. If not, remove from current tile and add to the correct tile).

 47 
 on: 2015-04-16 08:55:53 
Started by Mads - Last post by Roquen
+1 for a uniform grid

 48 
 on: 2015-04-16 08:53:17 
Started by Mads - Last post by princec
For a tower defence game you'll only need a regular cell grid. Well, that's what I've used, and it's plenty fast enough.

Cas Smiley

 49 
 on: 2015-04-16 08:14:50 
Started by Mads - Last post by Mads
Googling "java <name of data structure>" and maybe even "site:github.com" seems to do well...
Another term sometimes used is "spatial index"

What specifically do you need?

That only yielded shady results (might be buggy), or huge libraries that're made for other purposes than being fast and practical (I'm thinking of http://sis.apache.org/).

I need to query nearest neighbor, bounds intersection and fast updating when elements are moved. These would be what is needed for any tower-defence game.

JSI seems great, but it is difficult to move entities around. It requires deletion and reinsertion, and deletion requires the element's index in the tree. This seems like a hassle - especially since elements might come and go in a matter of frames.

In an old thread someone suggested bit-shifting element's positions, in order to add them to a grid of lists, making queries a bit faster. This grid would be cleared every frame, making it easy to move, add and delete elements. However, I believe it had some other problematic flaw, making it less ideal. I'll tyr to dig it up later.

What do you guys use for this problem?

 50 
 on: 2015-04-16 07:42:48 
Started by Mads - Last post by BurntPizza
Googling "java <name of data structure>" and maybe even "site:github.com" seems to do well...
Another term sometimes used is "spatial index"

What specifically do you need?

Pages: 1 ... 3 4 [5] 6 7 ... 10
 
Riven (23 views)
2015-04-16 10:48:47

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

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

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

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

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

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

ags1 (51 views)
2015-04-02 10:58:48

Riven (49 views)
2015-04-01 18:27:05

ags1 (66 views)
2015-03-31 10:55:12
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!