Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 410 411 [412] 413 414 ... 796

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

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6165 on: August 19, 2014, 09:47:45 am »

Languages in general take, like, two week to learn once you actually figure out programming. Maybe a weird one with symbols out the ass might give you trouble.

Go with a language with very little boilerplate for your first language. Something like Python.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: if self.isCoder(): post() #Programming Thread
« Reply #6166 on: August 19, 2014, 04:38:44 pm »

Python +1.

Now that I think of it, my only posts in this thread have been for recommending Python. I wonder what that says about me.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6167 on: August 19, 2014, 04:43:32 pm »

Python +1.

Now that I think of it, my only posts in this thread have been for recommending Python. I wonder what that says about me.
It says that you know something about Python.
Logged

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6168 on: August 19, 2014, 10:17:38 pm »

Languages in general take, like, two week to learn once you actually figure out programming. Maybe a weird one with symbols out the ass might give you trouble.

Try teaching Prolog to Java programmers ;D
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6169 on: August 19, 2014, 10:22:43 pm »

Languages in general take, like, two week to learn once you actually figure out programming. Maybe a weird one with symbols out the ass might give you trouble.

Try teaching Prolog to Java programmers ;D

"How do I do an if statement?"

Mephisto

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6170 on: August 20, 2014, 04:54:35 pm »

This is not a language implementation. It is a willing submission to DRM in which you try to force programmers that you don't pay to implement said DRM.
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6171 on: August 20, 2014, 05:07:37 pm »

This is not a language implementation. It is a willing submission to DRM in which you try to force programmers that you don't pay to implement said DRM.

I don't think its supposed to be a language implementation...  Personally I think its a nice idea, even if its not very practical. 
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6172 on: August 20, 2014, 07:04:36 pm »

Yeah, that's an interesting if odd way of trying to enforce the idea of free software.  I'm currently wondering what's stopping someone from just slapping the @licstart and @licend stuff at the top of their page in a script tag and putting license stuff in the comment that indicates it's not free.
Logged
Through pain, I find wisdom.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #6173 on: August 21, 2014, 09:09:55 am »

unit tests!

These are for a prefix interpreter I'll write tomorrow.

Basically, I want to specify formulas for calculating item properties from materials, stored in a json file. I plan on using notation like this:

["+", ["/", "$hardness", 50], ["sqrt", "$weight"]]

which is the same as

Code: [Select]
return math.sqrt(arguments["weight"]) + arguments["hardness"]/50
where arguments is a dictionary of the local variables I want to pass into the expression.
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

Sergius

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6174 on: August 21, 2014, 11:35:29 am »

So, any procedural/fractal experts out here?

I need some help generating random terrain for a game. I need an algorithm or method to generate "endless" terrain, like a game such as Minecraft would do. This is NOT detailed 3D terrain or even heightmaps, I'm talking at the biome level, as a 2D tilemap, overland type map. Imagine a Civilization or FreeCiv map, or even the zoomed out view of UnrealWorld, or heck any JRPG in existence, except it's created on the fly as you explore. So, just something that looks "realistic" in that mountains chain together and water could form oceans or you get spans of desert larger than 1 or 2 tiles and everything isn't just random noise :P.

I know I could generate a big "world" map using other methods like Perlin and then subdivide/displace as you zoom down until I get the detail I want, but I want to know if that can be avoided.

Just helping pointing me in the right direction will do, no need to actually do the work for me 8)
Logged

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6175 on: August 21, 2014, 12:15:44 pm »

Not sure how useful this will be but I might as well link it.
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule

Sergius

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6176 on: August 21, 2014, 12:23:04 pm »

I just realized the way I intend to create random towns with roads, I'd probably be better off creating some sort of jigsaw region generator, to make entire continents instead of rolling terrain... just have no idea how  :o

Not sure how useful this will be but I might as well link it.

Using rainfall and temperature/latitude seemed like a good way to actually make the biomes, I intend to do that. Right now I just need terrain. DF uses, I think, standard subdivide/displace noise stuff but the problem is that's top down, it creates the entire world then details it then saves the whole thing.
Logged

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6177 on: August 21, 2014, 12:39:33 pm »

Okay, first things first.

Do you want to generate seamless and random terrain, or whole continents which don't interact?

Basically, what kind of "endless" do you want?
Logged

Tick, tick, tick the time goes by,
tick, tick, tick the clock blows up.

Sergius

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6178 on: August 21, 2014, 01:26:00 pm »

Basically, this:

Spoiler (click to show/hide)

But in a way that it's created as you walk (or on-demand for whatever reason). And consistently from a seed, that always generates the same no matter where you come from.

The endless part is mostly a procedural thing, in practice it can end at whatever arbitrary distance I want (like, I can just say "the world ends at X 500, Y 500" and that's it, but the generation itself isn't constrained by that)
Logged

Sergius

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #6179 on: August 21, 2014, 01:31:56 pm »

I wonder how messy this would be: randomly assign to every tile a 0 or 1 value. Contiguous matching tiles form a region, creating some sort of jigsaw puzzle. Then, randomly assign a "biome type" from a list of presets to each region, maybe based on the center tile or something and the seed. (two regions that touch can get the same type).

EDIT: Ugh, I think I should use that... Voronoi wossname thingy and find a way to work in "infinite".
« Last Edit: August 21, 2014, 01:40:31 pm by Sergius »
Logged
Pages: 1 ... 410 411 [412] 413 414 ... 796