Bay 12 Games Forum

Please login or register.

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

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

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #465 on: January 12, 2012, 09:55:35 pm »

I can take a look if you'd like.  We've established that I don't know C#, but based on experience from other languages and Google, I should be able to read your code just fine.  I can probably find problems and say how to address them in a generalized sense.  Just don't expect me to be able to give you C# code that fixes it.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #466 on: January 12, 2012, 09:57:56 pm »

I would raise my hand, but my internet renews tomorrow. It has been a long week without it, but I can start doing that sort of a thing tomorrow...

Might put up a copy of my current code if anybody wants to brows.

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #467 on: January 12, 2012, 10:01:26 pm »

I would raise my hand, but my internet renews tomorrow. It has been a long week without it, but I can start doing that sort of a thing tomorrow...

Might put up a copy of my current code if anybody wants to brows.

I always love seeing other peoples' code.  It's enlightening to see something someone did gracefully and realize how much of an idiot I am for not thinking of that.
Logged

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: if self.isCoder(): post() #Programming Thread
« Reply #468 on: January 12, 2012, 10:09:55 pm »

I would raise my hand, but my internet renews tomorrow. It has been a long week without it, but I can start doing that sort of a thing tomorrow...

Might put up a copy of my current code if anybody wants to brows.

I always love seeing other peoples' code.  It's enlightening to see something someone did gracefully and realize how much of an idiot I am for not thinking of that.

I can't wait until I get to do a technical interview of someone. Because I'll have them try and figure out what this bit of code I wrote does:

while ((r = ((x ^ n) & ~(c ^= ((n <<= 1) >> 2)))) < x);

Spoiler (click to show/hide)
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.

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #469 on: January 12, 2012, 10:17:02 pm »

Well, I guess if people are offering to help, I'll throw it up then.

Mediafire Link

So here's the whole process map, to find what's going wrong.

1) MainBodyMethod in Program.cs establishes a new MapObject.

2) The MapObject constructor calls the placeholder method GenerateMap(), which calls the MakeDefaultUnderground() method from its established generator (MapGenerator.cs).  The argument determines how many cells (in the x-dimension) the map should have (and should only by 3 or 4).

3) MakeDefaultUnderground (in MapGenerator.cs) randomly determines which cells should have rooms in them, and counts through the map, calling the MakeDefaultUndergroundPattern class (no really) with arguments for whether the room should be long, tall, or square.

4) MakeDefaultUndergroundPattern randomly determines what size room to make (and seems to work fine), and feeds that data to make a new RoomObject.  Later when the RoomObject comes back, it calls the ReconcileRooms function to draw the RoomObject's data into the MapObject's overall array (this also seems to work fine).

5) The RoomObject constructor (in its .cs) passes that data to DrawDefaultUndergroundRoom (don't judge me) which fills in a properly sized array of MapTiles with the walls and floors for a room, then calls the AddDoors function to edit itself.

6) AddDoors is supposed to generate and shuffle an array to tell it which side to put a door on, then count down that side a random distance and place a door.  I currently have it set up so the Room-drawing class feeds a random number of doors to the AddDoors method, but I originally had it inside AddDoors.  This appears to be where everything is going wrong for no good reason, because I'm getting this cockamamie result no matter which way I set things up.


So yeah, good luck and godspeed guys.  I am completely and totally stumped, and I really don't want to be stumped, both because I'd really like Rooms to be objects now and not revert back to my original design, and also because as I said before, it was exactly this sort of seemingly-unsolvable "error" that scared me out of programming the first time around.
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.

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #470 on: January 12, 2012, 10:39:49 pm »

Okay, so you guys are making me feel like an idiot. I'm going to attempt to remedy that by asking a question:

What should I learn to make vidja gaems? I have a semester of C++ and VB apiece under my belt and feel like I haven't learned anything of use. I have a tenuous grasp of loops and the very basics like functions and whatnot, but that's about it. Sifting through the ocean of information on the internet is more frustrating than helpful, as I really don't know what I'm supposed to be learning to do useful things, like music and getting artwork onscreen and whatnot. Where do I start, B12?
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #471 on: January 12, 2012, 10:43:07 pm »

Okay, so you guys are making me feel like an idiot. I'm going to attempt to remedy that by asking a question:

What should I learn to make vidja gaems? I have a semester of C++ and VB apiece under my belt and feel like I haven't learned anything of use. I have a tenuous grasp of loops and the very basics like functions and whatnot, but that's about it. Sifting through the ocean of information on the internet is more frustrating than helpful, as I really don't know what I'm supposed to be learning to do useful things, like music and getting artwork onscreen and whatnot. Where do I start, B12?

Roguelikes are a good start! 

http://roguebasin.roguelikedevelopment.org/index.php/Complete_Roguelike_Tutorial,_using_python%2Blibtcod 


Aquizzar:  I think I see the problem, but it'll take me a few mins to install a c# compiler and test it.
« Last Edit: January 12, 2012, 10:45:39 pm by Levi »
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Sirus

  • Bay Watcher
  • Resident trucker/goddess/ex-president.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #472 on: January 12, 2012, 10:45:36 pm »

What if I wanted to make an RPG that used classic JRPG mechanics (turn-based combat and the like)? What language would anyone recommend for that?

I tried the RPG Maker series, and it's ok. The problem is that you need to know how to code to do anything nifty, and the maker offers no clue into how the coding works.
Logged
Quote from: Max White
And lo! Sirus did drive his mighty party truck unto Vegas, and it was good.

Star Wars: Age of Rebellion OOC Thread

Shadow of the Demon Lord - OOC Thread - IC Thread

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #473 on: January 12, 2012, 10:46:15 pm »

What should I learn to make vidja gaems?
What sort of games? XNA is pretty sexy and ports right over to XBox.

Anyway, I must have gone retarded. Seriously, there is no other explanation.

Spoiler (click to show/hide)

is being invoked with

Spoiler (click to show/hide)

So I'm expecting a square that is 20 * 20, with a top left position of (2, 3)
For some reason it just make a rectangle 1 * 20.
THE FUCK?!?!?

Aqizzar

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

So I'm expecting a square that is 20 * 20, with a top left position of (2, 3)
For some reason it just make a rectangle 1 * 20.
THE FUCK?!?!?

Gee I dunno, because you should reset Y before it's while loop?  That way it'll count down again.

Whaddaya know, I can catch some bugs too.  Just really really obvious ones.  I'm contributing!
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 #475 on: January 12, 2012, 10:49:50 pm »

...

RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGUI[JKJ;TRLKSJGNMKR;LDSNGLGRSEMPOTGJSREILJMREPWASBHFRLJSGTRMNI[TNISTOIROFGTGJRGTRGSGR=NJG;LN;JKGL

Thank you.

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #476 on: January 12, 2012, 10:51:54 pm »

@Aqizzar: Downloaded, I'll be intensely staring at it for a little bit and hopefully will figure out something.

@MaximumZero: This and this are both good tutorial websites. I used the former when I was first learning, and the latter to learn concepts that the former didn't cover well (classes, pointers, structs and unions), as well as a language reference when I don't remember how something in the standard library works.

@Max White: Happens to the best of us. Nested loops for iterating over map tiles (or points on a graph) make me have to stop and think really hard.

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #477 on: January 12, 2012, 10:52:02 pm »

What should I learn to make vidja gaems?
What sort of games? XNA is pretty sexy and ports right over to XBox.

See my sig for the answer to that. Other than that, I have a couple hundred ideas floating around.
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting

Aqizzar

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

@Aqizzar: Downloaded, I'll be intensely staring at it for a little bit and hopefully will figure out something.

Don't feel like you're under any obligation to help me or anything, I'm just stumped and when I'm frustrated I stay stumped.  I won't be back to work on it for six hours anyway, so feel free to mess with it all you like.
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.

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #479 on: January 12, 2012, 10:56:29 pm »

Okay, so you guys are making me feel like an idiot. I'm going to attempt to remedy that by asking a question:

What should I learn to make vidja gaems? I have a semester of C++ and VB apiece under my belt and feel like I haven't learned anything of use. I have a tenuous grasp of loops and the very basics like functions and whatnot, but that's about it. Sifting through the ocean of information on the internet is more frustrating than helpful, as I really don't know what I'm supposed to be learning to do useful things, like music and getting artwork onscreen and whatnot. Where do I start, B12?

There's really no particular reason you can't make a great game in VB or C++ if you already know the basics of them.  If you want to learn something new, Python is easy to learn and if you've paid any attention to this thread, you know I'm a fan of Java.  Pick a language.  We'll teach you what you need to know.  The OP has links to most, if not all, of the tutorials we've produced in this thread.  Regardless, at least skim over my Java tutorials.  They give examples in Java but also give a lot of conceptual information that is mostly language-agnostic.  That is, its conceptual information that is valid for a lot of programming in general.

What if I wanted to make an RPG that used classic JRPG mechanics (turn-based combat and the like)? What language would anyone recommend for that?

I tried the RPG Maker series, and it's ok. The problem is that you need to know how to code to do anything nifty, and the maker offers no clue into how the coding works.

If I'm remembering right, RPGMaker uses Ruby as it's programming language.  Best I can tell you.

Aqizzar - I'm getting to yours.  There's a lot I need to do right now.

What's with this thread?  I think the last seven replies were written while I typed this!  I know, I write replies slowly because I carefully consider what to write and re-read it five times, but still!
Logged
Pages: 1 ... 30 31 [32] 33 34 ... 796