[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/agdg/ - Amateur Game Development General

AGDG - The Board
Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov, swf, pdf
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


Welcome to AGDG, keep working on your game anon!
See also: /ideaguy/ | /vm/

File: cfc97e5792b1955⋯.png (1.79 MB,1276x718,638:359,cantintomath.png)

File: 2f31890b723e8da⋯.png (32.64 KB,873x718,873:718,tilemap.png)

751db9 No.28109

Im working on a RTS game, and i want to generate the map not based on a heightmap but on a map of tiles. The tilemap is just a 2x2 integer array that holds terrain IDs, they can represent water, shore, flatland, swamp, mountains and so on. Height and texture is dependent on the ID, not on a heightmap and blendmap as usual. Is this a shit idea? If yes, whats a better method to achieve RTS maps? The scale isn't a battlefield like AoE or Starcraft, but more on par with /gsg/ or Totalwar games, that's why the system seems to make sense to me.

Assuming there isn't a better method, how do i do proper terrain smoothing? I've got simple smoothing working, but corners are fucked, and after two hours of trying to develop an advanced algorithm my shit looks like pic related. I've tried to subdivide each tile into 9 zones, which each smooth out based on their 4 cornerpoints, with the middle zone not smoothing out at all. Turns out that this shit is hard to debug and im giving up by posting here.

Additionally, how do i get more than 4 textures on my terrain? All i find is using blendmaps, which don't go beyond that amount.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28147

File: 651d9a736c4a571⋯.webm (5.31 MB,960x540,16:9,daynight.webm)

Please /agdg/, im begging you, i don't know what to do about the texturing problem. Webm related is some progress on a shit day/night cycle and functional UI buttons

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28151

It looks like you're trying to reinvent the diamond-square algorithm?

Also no one can tell you how to do more than 4 textures when you wont tell them what engine you're using or what graphics library.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28155

File: b1cbf78d8214794⋯.webm (6.7 MB,1280x720,16:9,more progress.webm)

>>28151

>reinventing diamond-square algorithm

Looks like it, thank you, i'll take a look

>what engine you're using

None, im writing one myself in Java using an OpenGL wrapper. I've solved the problem though: Im now using 4 textures based on terrain height, and a blendmap to add three additional textures as a bonus ontop wherever i want them to appear.

Next on the list is entity mouse picking (figuring out which entity is clicked on). I think the best method is rendering all entities silhouettes onto a hidden FBO where they only have one flat color which is created from an id associated with the entity. When a click happens, you take the pixel that is clicked on and calculate the id from its color.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28156

>>28155

How did you do the water waves? Is this a technique that's described somewhere on the Internet? Is it simple waves on a flat water body?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28157

Dice rollRolled 1, 3, 3 + 3 = 10 (3d3)

>>28155

I remember hearing about that technique, but not with silhouettes. Maybe I didn't read too much into it though.

>>28156

My guess is an animated normal map, but not OP.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28159

>>28155

>Next on the list is entity mouse picking (figuring out which entity is clicked on). I think the best method is rendering all entities silhouettes onto a hidden FBO where they only have one flat color which is created from an id associated with the entity. When a click happens, you take the pixel that is clicked on and calculate the id from its color.

Color picking works really well, provided your drives etc. don't misbehave and give you a slightly different shade than you asked for. I've seen this on old systems, the solution was basically to space the colors apart as much as possible and then look for the closest one if there's no exact match. The technique is useful for 2D stuff too, like parts of the interface that might need to be irregular etc.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28176

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28177

File: 2644607d89204f3⋯.webm (5.26 MB,1280x720,16:9,ray-sphere intersection.webm)

>>28156

I can post the fragment shader if you want, it's just one gigantic quad with two polygons. It uses a normal map plus a distortion map that then distorts the refraction, the space under water, which is first seperately rendered onto an FBO. There is also a reflection, sperately rendered as well, that is blended with the refraction depending on viewing angle. Not as complicated to implement as it sounds though.

>>28159

I've researched some more and got the impression that color picking is considered a "hack" and is needlessly dragging performance down, so i've gone with Ray intersection calculations now. Im too dumb and lazy to implement Ray-OBB intersection so right now the ray just intersects with invisible spheres around the entities. The big boys solution would apparently be using a physics engine like Bullet or Havoc for the ray tracing because it is assumed that you need one anyway for a AAA-game, but i don't think i'll need one so im going with the middle ground.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28178

>>28177

I don't need the code thanks. I'm more interested in the theory for educational purposes. I just need to know names of the specific techniques you've used and I can spend my time studying what they are. I not quite ready to make use of this knowledge into any of my work in the near future.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

751db9 No.28179

File: e9a36e39facd679⋯.png (482.09 KB,512x512,1:1,waterDUDV3.png)

>>28178

Dont think i can give you the exact names. The multiple rendering of the scene per frame is done by rendering to FBOs, Frame buffer objects, and what you're trying to achieve for the refraction FBO is a fresnel effect using a DUDV map, which looks like a normal map with a yellow taint, pic related.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]