Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 32 33 [34] 35 36 ... 796

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

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #495 on: January 13, 2012, 05:01:47 am »

Honestly, I gave up on hoping for perfection long ago.  As long as there's an A, Q, Z, and R somewhere I assume it's probably supposed to be me.  Does make me confused with a few other members, like Azzuro.

Then again, Max White has certainly established that he apparently does his best programming when schnockered.  I assume?

I got the number of rooms randomized like this:

Success!  Or probably close enough to success anyway.
Spoiler (click to show/hide)

I had forgotten to get rid of the other two
Code: [Select]
random = new Random(i); in AddDoors.   :P

Slammin', that's good enough for me.  Everything is objects, now I can finally get to my corridor walker, and it'll be a lot easier to do with stuff rewritten.  Thanks a million Levi, I don't know why I didn't just follow everyone's advice and do that in the first place.
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #496 on: January 13, 2012, 05:04:12 am »

Intellesence: All of the logic with none of the spelling errors! I'm fucking slamming code... If only every language has a half decent IDE.\

Spoiler (click to show/hide)
I know this doesn't look like much, but this is a single 'TreeRoom', containing two 'ArrayRoom's... When I implement recursion, it will lead to a treeRoom within a treeRoom within a treeRoom and so on until it gets too small and makes an array room.
Quick level gen with all rooms connected and taking up 100% of the level space. It is fucking miracles.

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #497 on: January 13, 2012, 08:31:41 am »

Spoiler (click to show/hide)

At first I thought the character was supposed to be you.

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #498 on: January 13, 2012, 09:33:26 am »

Recently I've been playing around with Cellular Automata. The "cavern generation" article at Rogue Basin is pretty interesting ^^
« Last Edit: January 13, 2012, 09:39:19 am by MorleyDev »
Logged

nitnatsnoc

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #499 on: January 13, 2012, 11:16:56 am »

In the real world, sometimes you have a GUI directly from Java.  More often you have a non-graphical UI so you can use it on the command line or you have an independant GUI that just interfaces the Java application and grabs data to display from there.  Businesses like using Java to write internal-use applications.  As such, they don't necessarily have to be pretty since nobody outside the corporation is supposed to see them.  Or the Java code get run server-side and output data gets displayed with HTML and JSPs or PHP or something.  I'll write a tutorial on coding AWT/Swing/SWT eventually.  If you want, I can write some on JSPs and other methods of interfacing with Java apps on a server at some point.

I'll probably write the next tutorial this afternoon.  I like to go into a lot of conceptual detail, so these take awhile to write.

What tools are you trying to replicate?  Some of these may be more effective and potentially easier to replicate in C++.  Incidentally, if you're a sysop, you probably want your tools to run with a CLI anyway, so a GUI may not matter to you.

In reality I picked Java because I have some experience already, and I was really getting into your tutorials. Part of my desire for a GUI is just to make whatever I end up with more tangible. And I'm also a Windows admin more than anything, and outside of Exchange Shell or device CLI's, I rarely see/use a CLI anymore. As a basic application to test my learnings, I was thinking of something that can ping a device and return a live/dead result.

In the end, I have no particular attachment to any specific language. I just want to focus on one long enough to get my head around it.

BTW I'm very slow to respond here, as I really only get to do this on my slow days at work. Trying to do this at home is near to impossible.
Logged

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #500 on: January 13, 2012, 11:51:48 am »

In reality I picked Java because I have some experience already, and I was really getting into your tutorials. Part of my desire for a GUI is just to make whatever I end up with more tangible. And I'm also a Windows admin more than anything, and outside of Exchange Shell or device CLI's, I rarely see/use a CLI anymore. As a basic application to test my learnings, I was thinking of something that can ping a device and return a live/dead result.

In the end, I have no particular attachment to any specific language. I just want to focus on one long enough to get my head around it.

BTW I'm very slow to respond here, as I really only get to do this on my slow days at work. Trying to do this at home is near to impossible.

It's as good a reason as any to pick Java.  I can understand that reasoning for wanting a GUI.  Whether or not the real world uses them, I've written a bunch of them.  Surprisingly, I'm actually pretty good at Swing programming (which most people both hate and consequently neither know how to do nor desire to do it).  I think Java is great for what you want, to learn to program in the first place.  I'll look into pinging things.  The first few entries of Google are all ten to twelve years old, so I may have to do some hunting.  You may be able to do this by using java.net.InetAddress.isReachable(int), but I haven't looked into how that specific method works yet.

Next tutorial is coming.  I'm just distracted the past few days with life.
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #501 on: January 13, 2012, 01:41:53 pm »

Recently I've been playing around with Cellular Automata. The "cavern generation" article at Rogue Basin is pretty interesting ^^

I wish I could adapt it to my purposes.  I tried some cave generation before myself and it turned out to be pretty hard!

My requirements were:

1)  To be able to specify points around to center some big cavern rooms around.
2)  To be able to specify the rough size of these cavern rooms.
3)  To be able to make meandering tunnels (of various thicknesses) between the rooms.

I never got it quite working nicely though.  It always looked like crap, so I gave up and started a different project.   :P

I suppose I could have used that algorithm to make the rooms on my map by restricting the boundaries, but I'd still have to figure out something for carving out tunnels.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #502 on: January 13, 2012, 01:50:47 pm »

I really would like to do a nice cave generation algorithm at some point. It sounds like a lot of fun. I think for good variety you'd probably actually want to use more than one algorithm though - I mean, there's more than one that's used in real-life!

I'd rather make caves that look realistic than are actually fun to explore with a roguelike though... hmmm... though a roguelike with some real cave explorationy elements would be pretty cool. Crawling through small gaps, dealing with lots of pooled water, following cave streams down into the earth, squeezing through seemingly impossible gaps...
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #503 on: January 13, 2012, 01:56:32 pm »

I'd rather make caves that look realistic than are actually fun to explore with a roguelike though... hmmm... though a roguelike with some real cave explorationy elements would be pretty cool.

I agree!  The original idea was for there to be a world that had no surface, the entire universe was nothing but dirt and rock and caves.  Civilizations and such built up and made their homes in the bigger caverns.  I was hoping to go a little minecraftish by having you build up your own cave area by digging out your own little piece of civilization, or to just go around and explore.

I had gotten to the point of making a mostly complete "Infinite map" class to work with, but the actual generation of caves proved to be beyond me.  :)
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #504 on: January 13, 2012, 02:05:03 pm »

I'm fucking slamming code... If only every language has a half decent IDE.
Emacs is the answer to all your problems.

Does anyone know of an algorithm to generate side scrolling cave like shapes? My map generator is missing caves.
Logged

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #505 on: January 13, 2012, 02:09:07 pm »

The primary thing that causes caves is water and tectonic movement, so Im gonna have to look into that...

Relevant:
http://www.bgs.ac.uk/mendips/caveskarst/caveform.htm
Spoiler (click to show/hide)

It would be cool to actually model it by having some surface sources of water, a water table, and then have the ground rise (or the water table fall, I suppose) in uneven chunks...
« Last Edit: January 13, 2012, 02:11:40 pm by GlyphGryph »
Logged

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #506 on: January 13, 2012, 03:40:27 pm »

Aquifer.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #507 on: January 13, 2012, 04:42:29 pm »

I actually went to the library and got books on caves. They're cool :)

Uncool: "The procedure entry point A4BLdList_Node_base_hookblabla could not be located in the dynamic library stdc++6.dll"...  :(

WTF.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #508 on: January 13, 2012, 04:51:02 pm »

Note that link was really only for Limestone caves (karst-style), there's lot of other processes that cause them too. Even the solutional Limestone ones. If you want real cave variety, you should totally mix and match.

Man, I am totally hooked now. Shame I'll probably never find the time to play with this :/
Logged

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #509 on: January 13, 2012, 04:56:03 pm »

I actually went to the library and got books on caves. They're cool :)

Uncool: "The procedure entry point A4BLdList_Node_base_hookblabla could not be located in the dynamic library stdc++6.dll"...  :(

WTF.

I though I was the only person who still went to the library to find books.

I hate DLL Hell...then again, it beats having to write whatever the DLL is providing yourself.
Logged
Pages: 1 ... 32 33 [34] 35 36 ... 796