Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 10:44:34 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsDelver
Pages: 1 ... 100 101 [102] 103 104 ... 179
Print
Author Topic: Delver  (Read 782479 times)
Spilli
Level 0
*


View Profile
« Reply #2020 on: December 06, 2012, 05:23:07 PM »

Yeah, really you don't want the GC been called too much. I really try to only get it to call in loading screens, or over a large space of time.

Are you recalculating the hash each frame or only when the entity crosses over chunks?
Logged
Joshua
Level 5
*****


Be rad to one another!


View Profile WWW
« Reply #2021 on: December 06, 2012, 05:25:44 PM »

Can you tell when it crosses a spatial partition without rehashing?
Logged

Dinsfire
Level 0
**



View Profile WWW
« Reply #2022 on: December 06, 2012, 11:06:19 PM »

In regards to your move: I just moved over the weekend. Not exactly my idea of a good time, but it's always nice to get a fresh start in somewhere new. Hope everything goes smoothly for you.
Logged

Check out my music while you're at it! click!
Interrupt
Level 5
*****



View Profile WWW
« Reply #2023 on: December 07, 2012, 08:34:20 AM »

Can you tell when it crosses a spatial partition without rehashing?

Yeah, really you don't want the GC been called too much. I really try to only get it to call in loading screens, or over a large space of time.

Are you recalculating the hash each frame or only when the entity crosses over chunks?

It's pretty easy to build up the hash, so I've been clearing and refilling it every frame. Checking if an entity has moved into a new hash would probably be just as much work so I went with the more straightforward option.


In regards to your move: I just moved over the weekend. Not exactly my idea of a good time, but it's always nice to get a fresh start in somewhere new. Hope everything goes smoothly for you.

It'll be great when it's done, will be super stressed over moving plans and selling the house until then. So many moving pieces, it makes game engine programming look easy.
Logged
Joshua
Level 5
*****


Be rad to one another!


View Profile WWW
« Reply #2024 on: December 07, 2012, 08:35:56 AM »

It's pretty easy to build up the hash, so I've been clearing and refilling it every frame. Checking if an entity has moved into a new hash would probably be just as much work so I went with the more straightforward option.

Yeah, this is the route I've taken in the past. Since most of your entities are dynamic, it makes sense.
Logged

Interrupt
Level 5
*****



View Profile WWW
« Reply #2025 on: December 07, 2012, 10:05:45 AM »

It's pretty easy to build up the hash, so I've been clearing and refilling it every frame. Checking if an entity has moved into a new hash would probably be just as much work so I went with the more straightforward option.

Yeah, this is the route I've taken in the past. Since most of your entities are dynamic, it makes sense.

I store two lists of entities too, one for dynamic and one for static. Static entities are things that never move and never collide with anything, so they can skip logic checks and never end up in the hash.
Logged
Joshua
Level 5
*****


Be rad to one another!


View Profile WWW
« Reply #2026 on: December 07, 2012, 10:58:10 AM »

The only reason I could see you hashing static entities would be for some sort of view culling. Do you get this for free with libGDX?
Logged

Quarry
Level 10
*****


View Profile
« Reply #2027 on: December 07, 2012, 11:00:11 AM »

Pfftssss... Real OpenGL programmers don't need no cash to make games
Logged
Joshua
Level 5
*****


Be rad to one another!


View Profile WWW
« Reply #2028 on: December 07, 2012, 11:09:26 AM »

To clarify:
For free, as in libGDX has frustum culling built-in and you don't need to roll your own.
Logged

Quarry
Level 10
*****


View Profile
« Reply #2029 on: December 07, 2012, 11:18:47 AM »

It's built INTO OpenGL
Logged
Joshua
Level 5
*****


Be rad to one another!


View Profile WWW
« Reply #2030 on: December 07, 2012, 11:21:55 AM »

True. But you might not even want to make the draw call in the first place.
Logged

Quarry
Level 10
*****


View Profile
« Reply #2031 on: December 07, 2012, 11:23:35 AM »

Wouldn't it require you to scroll through the static entities and then get the distance then decided to draw them? Simply using OGL culling is way more easier and probably faster. On top of that you really wouldn't need to use the first way even if you wanted to cull different types of objects at different distances
Logged
Joshua
Level 5
*****


Be rad to one another!


View Profile WWW
« Reply #2032 on: December 07, 2012, 11:33:39 AM »

No, you don't have to scan all the entities each frame. You build a spatial hash of them once, and then query that data structure each frame. The 1D equivalent is searching via scanning or binary search. The former is O(N) where the latter is O(log N).

Also, frustum culling is more about volume than distance.
Logged

Interrupt
Level 5
*****



View Profile WWW
« Reply #2033 on: December 07, 2012, 02:17:32 PM »

No, you don't have to scan all the entities each frame. You build a spatial hash of them once, and then query that data structure each frame. The 1D equivalent is searching via scanning or binary search. The former is O(N) where the latter is O(log N).

Also, frustum culling is more about volume than distance.

On level load I batch up the level into 17x17 mesh chunks that I check against the view frustrum when deciding whether to draw. Each chunk is also loaded with all of its static entities and is in charge of drawing them, so I can cull out a large number of objects at once instead of checking them one at a time.
Logged
MrDaaark
Level 0
**


Hi


View Profile
« Reply #2034 on: December 09, 2012, 08:37:24 PM »

On level load I batch up the level into 17x17 mesh chunks that I check against the view frustrum when deciding whether to draw. Each chunk is also loaded with all of its static entities and is in charge of drawing them, so I can cull out a large number of objects at once instead of checking them one at a time.
Any optimization to make it run faster on my phone is appreciated.  Kiss

Is the optional directional pad (for Doom/Wolfenstein-like navigation for Android still being considered? Especially since the traps came in, I find it extremely hard to even play lately.

Quote from: Quarry
Pfftssss... Real OpenGL programmers

As for this real OpenGL programmer malarkey. OpenGL will cull triangles that won't appear on screen, and it will clip ones partially on screen, but it doesn't do free object frustum culling, you have to do that yourself. OpenGL doesn't do much beyond set render states and make draw calls. Any un-needed draw calls or state changes are a huge waste.

It's the programmer's responsibility to organize and minimize draw calls and state changes by first culling out unseen objects, and then sorting the rest by state change (usually material). Then you draw what is left over.

You can go even further than that, and render a pre-pass front to back and do occlusion tests on those left over objects, since those in-frustum objects may be all or partially occluded by other in frustum objects. Then you can decide to not bother rendering them if they are blocked out completely, or use a cheaper shader if they are heavily occluded.

Logged

...
Seiseki
Level 5
*****


Starmancer


View Profile WWW
« Reply #2035 on: December 10, 2012, 12:15:46 PM »

Ouya is giving away 10 dev consoles to indie developers.
If you plan on releasing on the console, you should tweet them using the tag #myouyagame.
Logged

Dylinian
Level 0
*



View Profile
« Reply #2036 on: December 12, 2012, 10:05:14 AM »

Hey i want to report a bug, on the android version if you walk over a item sometimes the information doesnt come up. If you know what i mean Concerned
Logged
PurpleHatch Games
Level 0
**


View Profile
« Reply #2037 on: December 13, 2012, 12:43:12 PM »

Hey,

Just played Delver for the first time, and I have to admit I really enjoyed it. I love the art style, the whole pixel-retro thing is absolutely beautiful, and perfectly executed. I'm also slightly envious that you made this game before I. In terms of gameplay, I thought it was enjoyable but perhaps the weapons in the early levels are a bit too powerful, but then again I prefer really hard games and a lot of people don't so I think you seem to have a very good balance here. Some sort of hardcore mode would be awesome, I'd love to play that Smiley My only criticism is that it is a little too easy for me at the beginning. Apart from that, I'm loving it, keep up the awesome work and I'll buy it as soon as I have the cash.

Thanks,

Jordan Hart

PurpleHatch Software

P.S. If you ever need some testing help or anything I'd love to try and help out Smiley
Logged
Quarry
Level 10
*****


View Profile
« Reply #2038 on: December 14, 2012, 02:26:20 AM »

This ain't no mail, it's a forum
Logged
kiddRaddical
Level 0
***

ALT UNIVERSE SEGA SATURN DEV


View Profile WWW
« Reply #2039 on: December 14, 2012, 03:02:46 AM »

This ain't no mail, it's a forum

lol. Maybe it's their company account, and he wanted to give his personal opinion.
Logged

posting (too) regularly on Twitter: @EthanRedd
EthanRedd.com
Pages: 1 ... 100 101 [102] 103 104 ... 179
Print
Jump to:  

Theme orange-lt created by panic