Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 796

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

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #60 on: January 05, 2012, 10:57:28 am »

I've been making things in PHP again lately. It's been years since I last used it for anything.

I'm trying to make a customizer for my Minecraft texture pack as minecraftcustomizer.net has a bug stopping me upload and there are things I want that it doesn't do.

Right now I'm stuck making a number of decisions. Having users pick from a number of 32x32 images for each item / texture and then having it assemble them into images is easy enough but not everything sits in neat 32x32 boxes. There are the mob skins of various dimensions, the GUI panes all 512x512, and more besides including places where images of many sizes need to be assembled into one final image. I can't decide whether to make a bespoke assembler and set of MySQL tables for each or make a more generic system that can handle the lot. The choice boils down to either having many simple specific tables and assemblers or few complex less specific tables and an assembler.

Then there is the question of how to store the images. I could have them stored over multiple sheets with their sheet number and coordinates stored in the database (or X is always 0 and Y is n*32 with n stored in the database for 32x32 things) or kept as separate images with their file location stored in the database. They could even be stored in the database directly as blobs.

I'm just thinking out loud really but any advice would be appreciated.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: if self.isCoder(): post() #Programming Thread
« Reply #61 on: January 05, 2012, 12:51:24 pm »

An interesting series from a blogger I respect on roguelike (ya know, like DF) game development in C#

(with a playable (Silverlight) demo on the page itself)

http://blogs.msdn.com/b/ericlippert/archive/2011/12/12/shadowcasting-in-c-part-one.aspx
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #62 on: January 05, 2012, 04:45:56 pm »

Like I said, it was making the int's private that caused it to lock down.  I took that off and it compiles fine.
When you declare something outside of a method it is called an 'attribute' variable, and is owned by the object. You can make these public, private or protected*. When you declare something in a method, it is a 'local' variable, and exists only inside that method for as long as the method is running. As such, you can't give it a access modifier, because nothing but the method will ever be able to access it.


*Protected is similar to private, but other classes that extend that class will also have access to it, making it pretty fucking useful.

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #63 on: January 05, 2012, 04:54:17 pm »

exists only inside that method for as long as the method is running. As such, you can't give it a access modifier, because nothing but the method will ever be able to access it.

Ah, fantastic.  I was afraid of the other way around, so this solves a lot of concerns for me.  Why I didn't already know this was the case, when it's pretty much exactly why For loops can all use 'i' I don't know.

http://blogs.msdn.com/b/ericlippert/archive/2011/12/12/shadowcasting-in-c-part-one.aspx

An excellent read, line-of-sight programming was one aspect of roguelike-coding I was dreading, I didn't even know where to start.  I imagine so of this could be used for generating Nethack-style connecting tunnels too.
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.

lordnincompoop

  • Bay Watcher
  • Allusionist
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #64 on: January 05, 2012, 05:06:04 pm »

An excellent read, line-of-sight programming was one aspect of roguelike-coding I was dreading, I didn't even know where to start.  I imagine so of this could be used for generating Nethack-style connecting tunnels too.

Libtcod beta is available for C# and provides POV, dungeon generation, truecolour console-like output and dungeon generation tools amongst others.
Logged

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #65 on: January 05, 2012, 05:14:25 pm »

Libtcod beta is available for C# and provides POV, dungeon generation, truecolour console-like output and dungeon generation tools amongst others.
I've had great fun messing around with that.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #66 on: January 05, 2012, 05:15:48 pm »

An excellent read, line-of-sight programming was one aspect of roguelike-coding I was dreading, I didn't even know where to start.  I imagine so of this could be used for generating Nethack-style connecting tunnels too.

Libtcod beta is available for C# and provides POV, dungeon generation, truecolour console-like output and dungeon generation tools amongst others.

Well, I was certainly looking for handholding, but that's kind of a lot of handholding.  The stuff about POV drawing is certainly good for me though, my usual method of learning being "smash together two tutorial examples then change things until I know what breaks it".
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 #67 on: January 05, 2012, 05:27:02 pm »

Well it is a significant improvement from 'Follow a tutorial to the letter, then wonder how to do anything else'

Although Libtcod is pretty nice, especially as far as input and output is concerned.

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #68 on: January 05, 2012, 06:58:37 pm »

An excellent read, line-of-sight programming was one aspect of roguelike-coding I was dreading, I didn't even know where to start.  I imagine so of this could be used for generating Nethack-style connecting tunnels too.

Libtcod beta is available for C# and provides POV, dungeon generation, truecolour console-like output and dungeon generation tools amongst others.

Well, I was certainly looking for handholding, but that's kind of a lot of handholding.  The stuff about POV drawing is certainly good for me though, my usual method of learning being "smash together two tutorial examples then change things until I know what breaks it".

That is exactly how programming really works. As Blake said in his Proverbs of Hell, "You never know what is enough unless you know what is more than enough."

PsyberianHusky

  • Bay Watcher
  • The best at being the worst at video games.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #69 on: January 05, 2012, 11:08:06 pm »

I have just got eclipse set up today, and I am gunning for learning how to code java.
I got the hello world done somehow, but I am at a loss of where to go from here. I would like to understand the whole class thing going on in the sidebars I guess.
    My end game is making a game, but I am cool with jumping though hoops until I get to that point.
Logged
Thank you based dwarf.

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #70 on: January 05, 2012, 11:19:32 pm »

I have just got eclipse set up today, and I am gunning for learning how to code java.
I got the hello world done somehow, but I am at a loss of where to go from here. I would like to understand the whole class thing going on in the sidebars I guess.
    My end game is making a game, but I am cool with jumping though hoops until I get to that point.

My first Java game was Breakout.  It's just plain beyond your ability right now, but it's a good longer term goal.  How much Java do you know?  Any?  If you want, I can start walking you through the basics of Java.

Also, your two best friends are Google and the Java API.
Logged

PsyberianHusky

  • Bay Watcher
  • The best at being the worst at video games.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #71 on: January 05, 2012, 11:52:27 pm »

None at all, the most I have done with coding is scripting a calculator to answer physics programs.

I think that is what I am gonna try next.
Logged
Thank you based dwarf.

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #72 on: January 06, 2012, 12:00:44 am »

None at all, the most I have done with coding is scripting a calculator to answer physics programs.

I think that is what I am gonna try next.

Scripting with what?  Coding a basic calculator is easy.  Coding one that respects order of operations is harder.  Coding one that does calculus is a reasonable challenge.  Java isn't exactly difficult, but you'll want to start with something easier just to learn the basics of Java.  Then you can move into your calculator.  Make it basic and then slowing make it more complex as you learn more.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #73 on: January 06, 2012, 12:35:25 am »

Hmm, would you guys like some lessons on OOP programming? A lot of basic tutorials cover some of the syntax, but don't explain as much as they should, and I don't think I have ever see any go into design patterns.

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #74 on: January 06, 2012, 12:51:53 am »

I wasn't planning to point him to some random tutorials.  I was planning to write a curriculum myself that I felt would best bring him into the language.  Yeah, I was going to include a lesson on OOP without any code just to hammer it in.  Want to collaborate on a Java lesson series?
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 796