Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,135 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
level_ent min, max? #382412
09/08/11 00:50
09/08/11 00:50
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Hi guys,

So I'm doing a large overhaul of the collision code in GRUNTS, and there's some level information that I need. Specifically, the collision surface with the greatest/least X value, the collision surface with the greatest/least Y value, etc. At first I thought that the min and max vectors for level_ent might provide me this information, but it seems that they only return the largest valid coordinate in the level, which is either 5000 or -5000 depending upon whether you're reading from the max or min vectors, respectively.

Anyway, does anyone know if/where the engine stores this information?

Last edited by Redeemer; 09/08/11 00:53.

Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: level_ent min, max? [Re: Redeemer] #382414
09/08/11 01:31
09/08/11 01:31
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
It seems to me as if one level dimension does not exceed the absolute value of 5000, the respective level_ent.min/max will stay at -5000/5000.
Seems like a bug to me, too.
The obvious solution is to add, f.i. one dummy entity per level that contains the information. You/ sPike has to enter it in WED manually, of course.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: level_ent min, max? [Re: Superku] #382415
09/08/11 01:46
09/08/11 01:46
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Quote:
The obvious solution is to add, f.i. one dummy entity per level that contains the information. You/ sPike has to enter it in WED manually, of course.

That involves more human interaction than I'd like this system to rely on, but I suppose it'll have to do.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: level_ent min, max? [Re: Redeemer] #382416
09/08/11 02:01
09/08/11 02:01
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Can I ask why you need that information?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: level_ent min, max? [Re: Superku] #382417
09/08/11 02:20
09/08/11 02:20
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
I plan to implement my own engine's collision system into GRUNTS, because I know mine works very, very well. But my system requires that the data is in a special format whereby columns of obstacles are packed into a grid. Therefore I will have to generate my own collision map for a level before I can put my code to work.

I'm sure this sounds like quite a clumsy process, but Gamestudio gives me little raw data to work with, and I know this will work quite well once I get it all plugged in.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: level_ent min, max? [Re: Redeemer] #382454
09/08/11 14:29
09/08/11 14:29
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I've once coded my own AABB movement function for my sidescroller with box and polygonal collision detection on models as well as polygonal block detection.
All you need to know/ use is "ent_buffers". Using this function you could easily loop through all blocks (and their vertices) to calculate the information you need (min/max) manually.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: level_ent min, max? [Re: Superku] #382466
09/08/11 15:28
09/08/11 15:28
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline OP
Serious User
Redeemer  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Hmm. I was unaware that such a function existed.

Thanks for the advice, Superku! It's much appreciated. laugh


Eats commas for breakfast.

Play Barony: Cursed Edition!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1