Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 259 260 [261] 262 263 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 907819 times)

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3900 on: February 14, 2013, 05:20:53 am »

You really aren't helping as much as you might think you are.
« Last Edit: February 15, 2013, 06:08:11 am by Valid_Dark »
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3901 on: February 14, 2013, 05:31:39 am »

Do you know the rule one of programming questions?

Rule one is "post code you actually has problems with." :/
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3902 on: February 14, 2013, 05:36:55 am »

I had problems with it yesterday, then I sent it to you, then today someone asked if I could post it in here, so I posted the current version of it,
« Last Edit: February 15, 2013, 06:08:44 am by Valid_Dark »
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3903 on: February 16, 2013, 06:52:52 am »

So... I'm making an erosion simulation. Right now, I'm using 2D bitmap graphics. I wonder if there is an easy way to draw terrain, then water on it, in 3D. I don't think I want to invest the time needed to learn DirectX from the ground up and implement water myself. Are there any easy tools that do those two things? One, render a heightmap. Two, render water on the heightmap.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3904 on: February 16, 2013, 07:57:02 am »

How 3D do you want it? :P You could make a pseudo-3D view if you want the camera to be stationary without much issues. Water could just be a colored and slightly translucent plane, or can be faked pretty well by applying a depth based coloring to any parts of the heightmap that are below water.
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3905 on: February 16, 2013, 08:02:32 am »

It needs to be pretty, and it needs to be able to show me how much water there is. xD The problem I'm having is that I can't intuit how much water there is on a pixel (=cell), even with interpolating between a dark blue and a light blue based on height :/

Incidentally, how do you make it transparent/translucent? Multiplying doesn't work that awesomely, nor does adding. >.>
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3906 on: February 16, 2013, 08:45:48 am »

You might be able to do it by alpha blending with the water to make it translucent. WaterColorBlend = ColorOfTerrain + WaterColor.RGB * WaterColor.Alpha. This may or may not be what you were doing already. You are wanting to be able to visually determine the height of water at any point without needing to keep a reference?

Do you have a picture that you could throw up for your 2D?
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3907 on: February 16, 2013, 09:21:02 am »

BlendedColor = TerrainColor * (1 - WaterOpacity) + WaterColor * WaterOpacity
Fix'd.
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3908 on: February 16, 2013, 10:11:38 am »

Knew I was missing a step! Thank you MagmaMcFry! ^_^
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3909 on: February 16, 2013, 10:46:48 am »

Knew I was missing a step! Thank you MagmaMcFry! ^_^
*blushes*

Also, why the fuck does MSVC++ use four whole gigabytes of drive space? What does an IDE need that space for?
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3910 on: February 16, 2013, 11:06:39 am »

I expect it's all of the libraries and misc. files, but then again it is a Microsoft product so what do you expect*? :P I'm tempted to try and throw MSVC++ onto ramdisk and see if it works, and see if there is any change in compile times. I do think it is probably the always present 'feature' of MSBloat v.Always.To.Much.01.b
MSVC++ (+) Windows SDK (+) DirectX SDK = Bloattasticalness... though doing dx work is fuuuuun when it works, and equally infuriating when it doesn't heh.

*disclaimer: I use Microsoft products so am not bashing from a fanboyish hatred of them, just their stuff has a tendency to be bloated for no reason
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Soadreqm

  • Bay Watcher
  • I'm okay with this. I'm okay with a lot of things.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3911 on: February 16, 2013, 11:24:54 am »

I want to print some special characters with the Windows console, using C#. Specifically, Greek capital letter Phi. And it didn't work. At first, I thought it was some kind of stupid character encoding issue, but even after replacing the characters in my code with unicode code points cast to chars, and fiddling with the Console.OutputEncoding property, they were still printing wrong. It appears that the default Terminal font that came with my Windows 7 simply does not have Greek letters! Wrong code page, I guess.

I don't like either Consolas or Lucida Console, the other two available-by-default fonts, but I found this replacement Terminal font that apparently has all the characters. All of them. Or at least the Greek alphabet, the Cyrillic alphabet, loads of accented characters and box drawing.

My question is, if I ever end up sharing this piece of shit with anyone else, what can I do about the font situation? Should I make some kind of installer to install the font and edit the registry to make it available on the console? Also, what kind of fonts do people generally have installed? Also, am I and idiot for messing with the console in 2013?
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3912 on: February 16, 2013, 11:25:51 am »

So still no way to have easy, pretty 3D terrain and water? Dx
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3913 on: February 16, 2013, 11:40:06 am »

So still no way to have easy, pretty 3D terrain and water? Dx

Well, there are easy ways, and there are pretty ways. I wrote a Java/LWJGL application framework that lets me easily render some OpenGL stuff in a 3D environment with a movable camera, and in the process of my newest project I'm currently writing the same thing for C++/SDL, so I can give you the code when I'm finished, along with some quick usage examples of OpenGL. Interested?
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3914 on: February 16, 2013, 11:41:49 am »

@Soadreqm: If you can I'd look for a font loading system, or build one, and then just distribute the font inside of the built distributable package. You may need to get permissions though, going by this line "However if you plan to ship this font with a commercial product, please check with Bitstream Inc, or otherwise do it on your own responsibility." from the linky you posted.

@Skyrunner: Maybe not super easy*. I'll see if I can find an GPGPL or other public domain library/source in C++ you can use to get this working :D

Edit:
* Deferring to MagmaMcFry since he's already working on something and he'll be infinitely more knowledgeable about 3D with C++ than I (>O.o)>---*
« Last Edit: February 16, 2013, 11:43:36 am by GalenEvil »
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.
Pages: 1 ... 259 260 [261] 262 263 ... 796