Author Topic: [REQ]Roguelike programming for dummies...  (Read 52159 times)

Konton

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
[REQ]Roguelike programming for dummies...
« on: November 24, 2007, 06:05:27 PM »
Someone know some opensource version or a tutorial for program a roguelike in C+/C++ or Python?

Sorry for errors and for my engrish.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: [REQ]Roguelike programming for dummies...
« Reply #1 on: November 25, 2007, 01:50:59 PM »
Roguelike or game programming is not for dummies. At least you need to actively search for information yourself. Sometimes I feel young people can't do anything without a tutorial..

Anvilfolk

  • Rogueliker
  • ***
  • Posts: 374
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #2 on: November 25, 2007, 04:50:23 PM »
Programming is terrible. I thought I knew programming when I played around with a bit of flash and php+mysql when I was in highschool, then I started studying at university. I thought I knew programming in the first semestre, then the second one started. Then I thought I was pretty decent, but then 3rd semestre started. And then you start realizing, you'll never know enough.

It's a HUGE world. Seriously, it's absurdly humongous. You CAN program plenty of stuff just by learning by yourself, though. Tutorials are a decent way to start, in my opinion, but research is what you need to be doing after you've got the basics. Read programming articles, introductions, whatever you can get your hands on. There's no point in reading something you don't understand, so I'd suggest learning a language. It'll be just technical, to help you get into the mindset.

Python is really friendly, and there's a great resource at www.diveintopython.org. I read that from start to finish, and when I was through, I felt I had some skills I could actually put to use (I had programmed before though, and "invented" the matrix by myself - LOL! Funny times, those, in retrospect).

When you feel comfortable with the programming language syntax (it won't change that much from language to language), start with a couple of small things just to try it out by yourself, with no guidance. Whenever you run into a problem, google it. Don't stop until you've come up with a solution (and a lot more knowledge). Even if you don't gain full understanding over a lot of subjects, you'll get acquainted with them, and that's important.

From here on, it's experience. Trial and error. Headaches. And loads of fun when it finally starts working :)

Also, you'll feel a little lost, as most programming languages by themselves will only allow you to input and output from/to a console screen. You'll have to search and learn API's for other (graphical) libraries, but I'd suggest you do that when you're comfy as a programmer, otherwise I think you'd just get ahead of yourself (then again maybe not).

Well... good luck! :D
"Get it hot! Hit it harder!!!"
 - The tutor warcry

One of They Who Are Too Busy

tseckington

  • Newcomer
  • Posts: 23
  • Karma: +0/-0
    • View Profile
    • Email
Re: [REQ]Roguelike programming for dummies...
« Reply #3 on: November 25, 2007, 05:42:20 PM »
Roguelike or game programming is not for dummies. At least you need to actively search for information yourself. Sometimes I feel young people can't do anything without a tutorial..

That's kind of harsh. Programming isn't a question of just being intelligent or mastering the syntax, it's mostly a game of patience and having an eye for detail. I didn't possess those last two, that's why I got out.

Anyway, I know there's "for dummies" books on just about every subject. I wouldn't be surprised if Python was included. A lot of people work in C++ or C#, I believe, so those might be good to check out. C# I remember as being pretty easy to pick up and a flexible language.

Depending on how much time and money you want to invest in this, you might also check out if your local or community college offers programming classes. Who knows, someone might let you make a RL as a project.

Anvilfolk

  • Rogueliker
  • ***
  • Posts: 374
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #4 on: November 25, 2007, 06:45:36 PM »
If you've no programming experience, I'd not recommend C/C++ or even Java/C#, those require compilers and virtual machines for the last two, that's extra stuff you don't REALLY need at the start. The main thing is really getting the concept of "programming" and having some ability at it. Once you've got a language, you should be able to adapt to another fairly quickly :)

Python's interpreted, don't need to compile or know really fancy syntax or keywords, just type "python <your_python_file>" and it's off :) This is one of the main reasons I recommend it - and also because of the link I left in my last post.

Also, Krice is harsh by nature. *grin*

What I think he's trying to say is that you can't really expect to have a guideline that, if you follow, you get a roguelike at the end. Especially something as niche as roguelike development. Roguelikes can get pretty complex. Baby steps first! And even those babysteps are damn hard. Like I said, coding is a huge thing, it's easy to get overwhelmed, especially if you have no idea what you're getting into :)
"Get it hot! Hit it harder!!!"
 - The tutor warcry

One of They Who Are Too Busy

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: [REQ]Roguelike programming for dummies...
« Reply #5 on: November 25, 2007, 08:01:25 PM »
If you've no programming experience, I'd not recommend C/C++ or even Java/C#

I don't understand this advice. It's a waste of time to learn something else and then move to C++ for example. Learning a programming language is actually quite easy, but the real question is what you can do with it. Some programs are easy to do and the same goes to some games (puzzle games probably the easiest of them). So what I recommend is learn some programming language (doesn't matter what) and then try to make some really simple game, like Tetris. Or 7DRL:)

Slash

  • Creator of Roguetemple
  • Administrator
  • Rogueliker
  • *****
  • Posts: 1203
  • Karma: +4/-1
    • View Profile
    • Slashie.net
    • Email
Re: [REQ]Roguelike programming for dummies...
« Reply #6 on: November 26, 2007, 04:12:43 PM »

dopefish7590

  • Newcomer
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #7 on: December 01, 2007, 02:05:44 AM »
Sometimes I feel young people can't do anything without a tutorial..

haha, its funny how you think that :p

ever seen my work?

duke3d.vachu.com
forums.3drealms.com
amc.planetduke.gamespy.com

some of my stuff is on theese places, i am also starting work on an OS, you can ask "oak man" on forums.3drealms.com about some of my artwork.

i have barely ever used a tutorial, i just experiment until i get the drift and go ergiht to the command refrences



ever tried qhack?
it shows how to program a roguelike in C/C++
you can get it at http://adom.de/misc/qhack.php3

also if you want to program an engine from ground up... its also quite easy

its basicly

this is label a
display player at x,y
if the player hits left a = x - 1
if the player hits right a = x + 1
if the player hits up b = y + 1
if the player hits down b = y - 1
if a = 0, then set a = x
if b = 0, then set b = y
if a wall is at a,b then set a = 0 and set b = 0 then goto label a
or else set x = a, and set y = b, and set a = 0, and b = 0 then goto label a


this is just what you have to do... its not a programming language, its just a logical thought that you can easily change into usable code for basic, c, pascal, or something else
« Last Edit: December 01, 2007, 03:32:17 AM by dopefish7590 »
- Swim, swim, hungry

Gamer_2k4

  • Rogueliker
  • ***
  • Posts: 86
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #8 on: December 04, 2007, 04:41:04 PM »
Use loops, not labels.  Loops are HORRIBLE programming practice.
Gamer_2k4

Anvilfolk

  • Rogueliker
  • ***
  • Posts: 374
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #9 on: December 04, 2007, 07:48:23 PM »
You mean labels are horrible. *grin*

What exactly IS your work on those sites? I get a few forums and a webpage.

Besides, tutorials are great, although most of them tell you exactly how to do stuff, but not WHY you do it that way. That's what they should focus on.
"Get it hot! Hit it harder!!!"
 - The tutor warcry

One of They Who Are Too Busy

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: [REQ]Roguelike programming for dummies...
« Reply #10 on: December 04, 2007, 09:24:11 PM »
i am also starting work on an OS

I was thinking hard how you are related to what I said, but then I realized it must have been about that young people and tutorials. So you are offended pretty easily. I guess it's normal behavior from young people who are not condifent of themselves. And you are starting to work on an OS? Really. That's.. interesting.
« Last Edit: December 04, 2007, 09:27:49 PM by Krice »

Slash

  • Creator of Roguetemple
  • Administrator
  • Rogueliker
  • *****
  • Posts: 1203
  • Karma: +4/-1
    • View Profile
    • Slashie.net
    • Email
Re: [REQ]Roguelike programming for dummies...
« Reply #11 on: December 05, 2007, 08:41:52 AM »
What OS are you working on? any details?

dopefish7590

  • Newcomer
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #12 on: December 05, 2007, 05:43:53 PM »
I know one should use "for" loops, but my reason for using labels there would have to be the fact that not all programming languages have them, granted most do, but im just making a general guide that should wourk in ALL prgramming languages. one of theese launguages that im trying to keep on the list of "this will work for" is assembler
- Swim, swim, hungry

Anvilfolk

  • Rogueliker
  • ***
  • Posts: 374
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #13 on: December 05, 2007, 06:54:29 PM »
Almost noone uses assembly these days. Sure, some people do, and it's a nice show of geekiness, and also of use for very, very specific reasons, none of which include programming a roguelike *grin*

I don't even know how to use labels and gotos in all the languages I know, except in assembly, and I'm pretty sure modern ones don't even include that functionality. Honestly, who would want to program in a language you couldn't write a for cycle? You can code in efficiency without ever using assembly - and your gains by using a better algorithm would also be a lot better than removing even half the lines of assembly code.

And also, how about Line-of-Sight algorithms? Dungeon generation algorithms? AI for monsters? Each of these topics is a "little" world of its own. But now I'm just playing the annoying twit ;)



Also, on a completely unrelated topic: I now dub Slash, the Diplomat, because he's always placating Krice's comments by showing interest! I do believe we may call him... "The Slashiplomat"! :P (yeah, I blew a fuse or something)
"Get it hot! Hit it harder!!!"
 - The tutor warcry

One of They Who Are Too Busy

dopefish7590

  • Newcomer
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: [REQ]Roguelike programming for dummies...
« Reply #14 on: December 06, 2007, 02:59:18 AM »
i guess i should reply to a few questions ive been asked :p

and my work on the duke3d.vachu.com would be dukonnector (a few people worked on this)

for forums.3drealms.com, youll have to ask "Oak man" one of the members for a bit, becusae i gave lots o stuff to him

as for AMC, i post some of my projects there

as for Red OS, so far only ive got a very simple framework of an OS that includes a mouse engine, a bit of support for programs, multi veiw modes. (planned to be the first OS with a way to set up the OS as a 3d firstperson OS (for diehard gamers but takes a high system requirement) and some editibility, i am currently using open watcon as a compiler for the fact that it can compile programs as a bootable OS without windoze, DOS, mac, luinix, unix... or anything.

the plans for the OS are

- COMPLEATE editibility
- fully funcional OS that looks good and isnt a resource hog unless you want it to be :p
- Mac, Dos, Windows, and Luinix compatibility
- 4 veiwports (Classic screen w/ windows and icons, 3d classic veiw w/ 3d windows and icons, 3d firstperson which is a real bitch to program =\, and an optional ASCII veiw for the ascii freaks)
- portability and will include open source programs, so far the current build itself is 26mb so it will fit on a 32 mb sd card

I may release some media when i deem it to be a good time

this thing is getting off topic, back to the original topic.



i would reccomend looking at programmersheaven for some good stuff to lern how to make stuff




@anvilfolk: trust me, i know people who use assembler. it is actually quite common. i personally consider them n00bs because they use it becuase they cannot code efficiently in any other language. its not hard to learn to code in asm, its just remebering commands and absolutaly no need for structure



Quote
But now I'm just playing the annoying twit
haha, i know the feeling ;)
- Swim, swim, hungry