Temple of The Roguelike Forums
Announcements => Other Announcements => Topic started by: Konton 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.
-
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..
-
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
-
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.
-
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 :)
-
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:)
-
Beginner guides for roguelike development arise from time to time
Those have been the latest ones:
* http://groups.google.com/group/rec.games.roguelike.development/browse_thread/thread/a1df62d3fe88e201
* http://www.roguetemple.com/2007/05/23/terror-in-ascii-dungeon/
-
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
-
Use loops, not labels. Loops are HORRIBLE programming practice.
-
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.
-
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.
-
What OS are you working on? any details?
-
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
-
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)
-
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
But now I'm just playing the annoying twit
haha, i know the feeling ;)
-
Now I'm curious. What do they use it for?
We used asm in one of the classes at university, just for the sake of having the basis and understanding what programs usually compile to. We only did real basic stuff, though, and only went as far as calling asm "functions" from C programs.
-
multi view 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)
Ok, there's cool, and then there's practical. Eventually practicality will win. Sure, the first time or two it might be fun running through halls (directory trees I assume) to access your files, but eventually it will just be needless memory usage for something that can be accomplished by clicking the mouse two or three times.
-
I agree with you, Gamer. What I want is a functional, responsive OS.
However, graphical enhancing sytems (?) like Beryl and Compiz (and Vista) are gaining popularity. I see a bunch of people with that stuff installed all the time. Ugh. Wouldn't touch it with a ten foot pole. Ubuntu now brings compiz by default too - I'm thinking of switching to Debian... I'm worried about an OS that brings that kind of thing by default.
Also, programming an OS must be really interesting, especially from an educational point of view. I've always rather enjoyed most of the low-level stuff the university throws at me :) I do wish you the best of luck.
(I'm being nicer because I actually got 10h of sleep today, unlike the 5h average I've been on :D)
-
However, graphical enhancing sytems (?) like Beryl and Compiz (and Vista) are gaining popularity. I see a bunch of people with that stuff installed all the time. Ugh. Wouldn't touch it with a ten foot pole. Ubuntu now brings compiz by default too - I'm thinking of switching to Debian... I'm worried about an OS that brings that kind of thing by default.
The nice thing about compiz (beryl has since been reintegrated into compiz as compiz-fusion) is it's entirely up to you as to what effects, if any, are applied. The real benefit is the acceleration of the rendering of the desktop - so even if you decide to use no window decoration and no special effects, you're more than likely getting a speed (and therefore usability) boost from just having compiz.
That having been said, I love the wobbly windows. When I'm bored or am thinking about a problem, grabbing and shaking a window to watch it bounce is amusing. I even find myself trying to do it on my XP machine at work (to a disappointing end).
As for distros, have you considered Gentoo? I've been 100% Linux at home, all with Gentoo. The ability to handpick which parts of packages get installed and to have optimized builds for suboptimal systems (my SVN server is a repurposed original XBox) is a joy to see realized.
-
multi view 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)
Ok, there's cool, and then there's practical. Eventually practicality will win. Sure, the first time or two it might be fun running through halls (directory trees I assume) to access your files, but eventually it will just be needless memory usage for something that can be accomplished by clicking the mouse two or three times.
i hope you realize that ive already got it somewhat working
Also, programming an OS must be really interesting, especially from an educational point of view. I've always rather enjoyed most of the low-level stuff the university throws at me I do wish you the best of luck.
yea its cool stuff, and its amazing what you figure out :)
now back on topic really. i guess I shouldent of posted that stuff because its hijacking the thread