Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9 ... 72

Author Topic: The Roguelike Development Megathread  (Read 247372 times)

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: The Roguelike Development Megathread
« Reply #90 on: January 29, 2009, 12:49:00 pm »

Oh... And If someone knows a nice clean algorithm to make animations based on time (like zapping a wand in ADOM) I would appreciate it.

Assuming you're using some sort of sprite-based animation, you could load all pictures into an array, set a variable to 0, load the first picture using the variable and increment the variable by one. Rinse and repeat, by putting the code that increases the aforementioned variable in the loop that gouverns the game.

oh no... im using curses with ANSII chars... my problem is with the time header of c++ time.h ... I couldn't use it easyly.  But later with a bit more time I may study it a bit more.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #91 on: January 29, 2009, 02:30:07 pm »

I'm going to continue level generation and design later; I just got a brilliant idea for handling skills.
Logged

JoshuaFH

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #92 on: January 29, 2009, 02:35:45 pm »

If you guys finish your things, i'd be more than happy to test play them.
Logged

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #93 on: January 29, 2009, 02:46:48 pm »

Wow, this thread is exactly what I've been looking for.  I learned how to code in JAVA about six years ago, but I haven't touched it since then.  It's been hard getting back into things since JAVA changed in that time - but C++ works much the same way, at my newb level at least, and all the old logic is coming back to me.

Problem: I'm using the Terror In The ASCII Dungeon tutorial, and it's fantastic.  But, there's no link to Part 5 in the original thread.  I assume there is a part 5, anyone know where to find it?  I'm reading through the later posts, but there's indications the guy who wrote them never got around to finishing 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.

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #94 on: January 29, 2009, 02:50:37 pm »

I've searched the web, there's no trace of the next part.
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #95 on: January 29, 2009, 02:53:44 pm »

Terror in the ASCII Dungeon was unfortunately abandoned after Part 4.
Logged

deadlycairn

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #96 on: January 29, 2009, 02:56:02 pm »

Well I FINALLY managed to get my guy to walk around - there's a call to it at the end of the Draw function for the room (not sure if that's the right way to do it, but oh well). Of course, with no collision checking whatsoever, hilarity ensued when i went out of the room.

EDIT: Damnit can't upload the image. Lots of little smileys all floating about outside the room.

From here I'll work on collision checking, then attacking, then some (basic) AI for the duck.

Logged
Quote from: Ampersand
Also, Xom finds people that chug unidentified fluids pleasing.
Quote from: Servant Corps
Ignorance of magic does not give scientists the power to resist fireballs.

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #97 on: January 29, 2009, 02:57:33 pm »

Perhaps if the author was put under some degree of pressure, he would finish his tutorial. Let us all sign up on those forums and heckle that character!
Logged

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #98 on: January 29, 2009, 03:01:34 pm »

Considering the part 4 was put up a year and a half ago, I think he's made peace with being a failure on the Internet.

Man, why's every genuinely helpful tutorial have to die halfway through?

Well, now to figure this out myself.  Somehow, I know my version going to involve a giant pile of while loops...
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.

deadlycairn

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #99 on: January 29, 2009, 03:10:18 pm »

Join the club. I'm pretty sure mine will be glued together with generous usage of the switch statement, the while loop, hope, prayers, wasted hours and random button mashing - thats what happens when I try to do something without a tutorial - I manage, but it's not pretty. ;D
Logged
Quote from: Ampersand
Also, Xom finds people that chug unidentified fluids pleasing.
Quote from: Servant Corps
Ignorance of magic does not give scientists the power to resist fireballs.

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #100 on: January 29, 2009, 03:15:28 pm »

Some suggestions on how to continue that tutorial:

- If it's your first roguelike, go ahead and do collision checking based on the graphics themselves.  Meaning...  Look at what's currently drawn in the tile you want to move into.  I think there's a command for that.  If it's one of the walls, cancel the move.  If it's not, assume that tile is walkable, and see if it contains a monster to fight; otherwise, just move.  Of course, this means that nothing can EVER be drawn over the walls, and you can only have one floor tile...  Still, it's an easy and very classic approach, and it's OKAY.

- Your loop, most likely, is going to be:  "Draw the screen.  Read player input, until they give you a key you want to handle.  Handle the player's turn.  Handle everything else's turn.  GOTO 10.  Oh yeah, and make sure the user can press a key like Q as their input to break out of the loop, because games you can't quit are annoying."
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #101 on: January 29, 2009, 03:18:35 pm »

I'm having a wee bit of difficulty. I read somewhere that global stuff is bad, so I have a Game class that holds my map. The trouble is, I need to store my vector of objects in said class, but then how do I loop through them to draw them? Should I just make the class do that itself, or should I perhaps have a function that returns a copy of the vector?
Logged

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #102 on: January 29, 2009, 03:19:59 pm »

- Your loop, most likely, is going to be:  "Draw the screen.  Read player input, until they give you a key you want to handle.  Handle the player's turn.  Handle everything else's turn.  GOTO 10.  Oh yeah, and make sure the user can press a key like Q as their input to break out of the loop, because games you can't quit are annoying."

Yeah, that's one programing trick I never go into - pseudo code.  For some reason I just a have violent aversion to writing down anything I think I could fit in my head.  I know I'm going to need to map this out to keep the logic moving properly.

Hmm...  Maybe, I should set the entire map system up as a separate function, so I can have a chargen frontend...
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.

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: The Roguelike Development Megathread
« Reply #103 on: January 29, 2009, 03:21:27 pm »

Join the club. I'm pretty sure mine will be glued together with generous usage of the switch statement, the while loop, hope, prayers, wasted hours and random button mashing - thats what happens when I try to do something without a tutorial - I manage, but it's not pretty. ;D

I don't even use switch statements, or even for loops...


Also, I personally am finding that a global array for the screen works well. Maybe it's just what I'm using (C and openGL).
Logged
Eh?
Eh!

Granite26

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #104 on: January 29, 2009, 03:24:57 pm »

Yeah, that's one programing trick I never go into - pseudo code.  For some reason I just a have violent aversion to writing down anything I think I could fit in my head.  I know I'm going to need to map this out to keep the logic moving properly.

Hmm...  Maybe, I should set the entire map system up as a separate function, so I can have a chargen frontend...

Technically, every 'mode' you've got should be totally independant of the 'main' function  (So you could window up a 'start' screen that launches chargen or worldgen, or whatever, do that and 'save' it, then return.  Play should be exactly the same way.
Pages: 1 ... 5 6 [7] 8 9 ... 72