Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411482 Posts in 69370 Topics- by 58426 Members - Latest Member: shelton786

April 24, 2024, 12:05:44 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 197 198 [199] 200 201 ... 279
Print
Author Topic: The happy programmer room  (Read 678276 times)
EdFarage
Level 2
**


I can upload avatars


View Profile
« Reply #3960 on: January 10, 2015, 10:39:20 AM »

what thats crazy
how would that work
Logged
Fallsburg
Level 10
*****


Fear the CircleCat


View Profile
« Reply #3961 on: January 10, 2015, 11:24:47 AM »

Ah good ole DTED level 1.  The crazy stuff comes at like level 5 (1 meter level accuracy [but there's obviously not a lot of it, and it's not publicly available]).
Logged
Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3962 on: January 10, 2015, 01:26:39 PM »

what thats crazy
how would that work

How wouldn't it?  It's just a seamless 90m/pixel height map split up into degree-by-degree tiles, easy to use.  Although I suppose I have to do some projection, especially for regions far to the north or south, as the data is presented in equirectangular.

Ah good ole DTED level 1.  The crazy stuff comes at like level 5 (1 meter level accuracy [but there's obviously not a lot of it, and it's not publicly available]).

I originally was looking at the 30m resolution stuff but that's only available across the US and more recently Africa.  Plus it's not really that worth it since it's only for background scenery.
« Last Edit: January 10, 2015, 01:36:41 PM by Boreal » Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
bdsowers
Level 3
***



View Profile WWW
« Reply #3963 on: January 10, 2015, 02:33:04 PM »

Discovered an amazing public-domain global height map data bank.  20GB of data at 90m resolution covering 80% of the Earth's land mass.

When you choose to create a track (it's a racing game) at a given latitude and longitude, I'll use libcurl and zlib to grab the data from the .gov server and then use it to build a heightmap for the surrounding terrain.  That way you can have tracks in real places without the need to manually find and import a height map.

Alternatively I could just download everything and redistribute it with the game, but again it's 20GB of data that's probably going to be 99% ignored.  I suppose I could just mirror it on the game's server if I'm worried about the .gov server going down for some reason.

Where at? That sounds like a pretty awesome data set. I like playing around with procedural building generation... could combine those two quite nicely.
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3964 on: January 10, 2015, 06:47:16 PM »

It's all available here.  http://e4ftl01.cr.usgs.gov/SRTM/SRTMGL3.003/2000.02.11/  Be warned as there's thousands of files and the index will take a long time to load.

In other words, I managed to get a system for fetching the height data based on a latitude and longitude.  It downloads the zipped file from that host using libcurl and then decompresses it and swaps the endianness (the height is archived in big-endian).  Next step is to project it to get a non-sheared area and build a 3D terrain out of it after I refactor and add in error handling.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #3965 on: January 10, 2015, 10:49:20 PM »

If you use unity I can provide code I used to turn into a png file
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3966 on: January 11, 2015, 01:23:16 AM »





My hometown in 3D!  Height is exaggerated by a scale of 5 for effect.
« Last Edit: January 11, 2015, 02:25:22 AM by Boreal » Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #3967 on: January 11, 2015, 02:42:45 AM »

Or what about a scenic trip to the Grand Canyon?  (now with actual lighting)

« Last Edit: January 11, 2015, 02:12:51 PM by Boreal » Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Sik
Level 10
*****


View Profile WWW
« Reply #3968 on: January 11, 2015, 08:57:12 AM »

Alternatively I could just download everything and redistribute it with the game, but again it's 20GB of data that's probably going to be 99% ignored.  I suppose I could just mirror it on the game's server if I'm worried about the .gov server going down for some reason.
If I was you I'd make the server address a configurable setting (probably an advanced setting, but still), that way you can easily mirror the data anywhere else and change the address if the original one becomes unusable.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #3969 on: January 11, 2015, 10:58:02 AM »


Here is my own test, grid unity square is 10km² wide, scale is 1:1
Logged

pelle
Level 2
**



View Profile WWW
« Reply #3970 on: January 12, 2015, 05:30:10 AM »

This weekend I wrote some 8086 assembler and managed to get nice colored (and blinking!) characters moving on an emulated (dosbox) CGA text-mode screen. Very happy about that! Biggest chunk of asm code I ever wrote. Hope I can stay motivated to complete the little game I want to make, and that it ends up running on the real old hardware not just dosbox.
Logged
tjcbs
Level 1
*


View Profile WWW
« Reply #3971 on: January 14, 2015, 12:03:15 PM »

I've been fighting the problem of resolution independent fonts for a while now. Messing with different versions of the font optimized for different ranges of resolutions. It's been a huge pain in the ass. I just had an idea. Why not just use trilinear filtering?

So easy, and it works wonderfully! Now, the same bitmap font that looks crisp at 1080p, is perfectly legible at 640x480. I didn't realize it, but the main reason that 1080p looked good was the fonts. Now, 640x480 looks fine, maybe 70% as good as 1080p. This opens up a whole new market of Eastern Eurpoean and South American gamers stuck with  geforce 6200s to buy download my game!
Logged

RareSloth
Level 0
***


making apps and taking naps


View Profile WWW
« Reply #3972 on: January 17, 2015, 04:38:12 PM »

Hilarious bug we found today with our new game.

https://www.youtube.com/watch?v=LBCrBaAOqyw&feature=youtu.be

Logged

Our mobile games: Yukon Warrior | Furdemption | King Rabbit
SeaWyrm
Level 0
**


View Profile WWW
« Reply #3973 on: January 29, 2015, 08:18:09 PM »


Perlin noise, at last!
Logged

I'm writing monthly Douglas Adams-esque short stories on Patreon: Doomsday Comet and the Twelve Moons of Beledde IV
Sik
Level 10
*****


View Profile WWW
« Reply #3974 on: February 05, 2015, 11:42:06 AM »

Coded a loader for a mesh format and it works flawlessly \o/ (and it's one that has to cope with future extensions and with invalid files, it can't make any assumptions)
Logged
oahda
Level 10
*****



View Profile
« Reply #3975 on: February 05, 2015, 11:47:45 AM »

Woop! What are you going to be using it for? And what are the technical details (programming language, shader language, windowing framework)?
Logged

Emperor Ing
Level 0
**


Hypt Developer


View Profile WWW
« Reply #3976 on: February 05, 2015, 12:31:32 PM »

So this happened a while ago, but it's amusing nontheless. In my game Hypt, there was a game-breaking glitch that popped up out of the woodworks where my entire level would flip upside-down if the player collided with a boundary. Even if my invisible walls weren't connected to the level, they'd still flip around and break the game. Not fun times.

After spending days trying to find the problem, something occurred to me, and I happened to find the problem.

Three lines of code.

Removing that fixed the glitch completely.

Would anyone else be willing to share stories of their own game-breaking glitches with shockingly simple fixes?
Logged

Hypt on Steam Greenlight
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #3977 on: February 05, 2015, 12:53:27 PM »

Boolean operations. Clipping free-formed triangle soups against polygons with no promised whatsoever - convex, concave, selfintersecting, degenerated. And it works. It's even reasonably numerically stable.

Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #3978 on: February 05, 2015, 02:17:42 PM »

That's cool! I can see many uses for that. Would you care to elaborate a bit on the technical details?

M'self I'm a happy programmer today for having gained an increasing understanding of shaders – supports for which I just recently added to my game/engine – and have managed to add lights as well as a wobbly water effect to the (underwater) game! Also a bit of general ambient colouring, of course. Particles for floating algæ will supposedly be the next big shader thing I add!
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #3979 on: February 05, 2015, 03:33:50 PM »

It's a complicated topic. I'll suggest what everyone else would suggest: don't try this at home! Take a library for that. For 2D, there's ClipperLib, which is quick and stable. It uses integer arithmetic to work around most corner cases. For 3D, I suggest using "carve". It's the lib which Blender uses. Unfortunately, it's LGPL and therefore incompatible with Assimp's ZLIB license.

If you're going to implement it: you're marching into madness. A lot of human assumptions like "If it's crossing there and then returning, it should cross there again" is false when dealing with computer math. I fighted it by adding an additional state to every intersection test. Instead of simply intersecting a line with a plane, for example, I added a parameter to the check that says which side is preferred. So if you're coming from the white side of the plane and the line ends within 1e-6 at the plane, it's not considered a hit. The next segment then starts from the plane and reports a hit only if the line goes significantly into the other side. This catches even die-hard cases nicely where you have a range of polygon segments that run in parallel with the plane, then 3 steps later you get a segment that goes deep into the black side.

A simple intersection test, on the other hand, explodes into your face if your polygon lies in the plane and floating point inaccuracies report hits everywhere. Then you add a filter for "line parallel to plane within 1e-6" and fix some of the problems, but get a whole range of new ones.

But like someone said: if it would be easy or fun, you wouldn't get paid for it.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Pages: 1 ... 197 198 [199] 200 201 ... 279
Print
Jump to:  

Theme orange-lt created by panic