r/roguelikedev • u/aaron_ds Robinson • Jun 18 '19
RoguelikeDev Does The Complete Roguelike Tutorial - Week 1
Welcome to the first week of RoguelikeDev Does the Complete Roguelike Tutorial. This week is all about setting up a development environment and getting a character moving on the screen.
Part 0 - Setting Up
Get your development environment and editor setup and working.
Part 1 - Drawing the ‘@’ symbol and moving it around
The next step is drawing an @ and using the keyboard to move it.
Of course, we also have FAQ Friday posts that relate to this week's material
- #3: The Game Loop (revisited)
- #4: World Architecture (revisited)
- #22: Map Generation (revisited)
- #23: Map Design (revisited)
- #53: Seeds
- #54: Map Prefabs
- #71: Movement
Feel free to work out any problems, brainstorm ideas, share progress, and as usual enjoy tangential chatting. :)
16
u/aaron_ds Robinson Jun 18 '19
In past years a top request was a forkable git repository for this event. If you would like an empty project to fork and commit you work to feel free to use this one. https://gitlab.com/aaron-santos/roguelikedev-does-the-complete-roguelike-tutorial/tree/master. If you are not interested in using git feel free to ignore this comment. :)
5
u/[deleted] Jun 18 '19
I’m using R along with the package Shiny. I am not a developer, and this is entirely a hobby project. I use R mostly for data analysis. I’m not aware of any games made with R (perhaps for a good reason)!
My working title is RoveR. It’s will be a simple roguelike about a planteary rover with the tagline “My battery is low and it’s getting dark”. I'll be following the tutorial but with R, not python.
4
u/EsotericRogue Jun 18 '19 edited Jun 23 '19
I'll be streaming my participation again this year.
I hope I'm going to be using Kivy and Python 3.7 with libtcod. Give me some hours; we'll see how it goes.
Going live now, starting with the how to use Kivy tutorial :/ Baby steps, argh.
[postscripts:]
Lesson 1: How to fix Kivy app only running once (without restarting). https://stackoverflow.com/a/55057636/5953688 --- or not. Doesn't reset everything: graphical objects leave tracers (not erasing on movement) unless kernel is reset
Lesson 1a: The long and short of my case is that Spyder IDE does not place nice with Kivy. I am no longer using Spyder.
•
u/Kyzrati Cogmind | mastodon.gamedev.place/@Kyzrati Jun 18 '19
It begins!
The initial announcement has the introductory info.
Other notes:
15
u/thebracket Jun 18 '19
Since I've written a few roguelikes before (see my incredibly verbose Sharing Saturday posts!), I thought I'd use this as an excuse to learn Rust. Rather than use a
libtcodport, I figured I'd write that, too. I have invented many wheels of varying degrees of roundness!Here is the git repo: Rusty Roguelike. If you have any interest in Rust, feel free to crib whatever you like from it. I'm a newbie to the language, so it's probably not great, idiomatic, or etc.
I've gone a little further than this week, but you browse to this commit, it's right at the end of week 1. 2 major achievements:
So, how did I get this far? This was my second ever Rust project (the first was throwing spaghetti at the wall, from console "hello world" to fibonacci sequences and threaded prime number generation; the stuff I do in every language to see if I have the slightest feel for how to plug it together) - so a lot of trial and error.
cargo new rustyrogulike --bin. This did more than I expected; it made a project skeleton (which you can test withcargo build,cargo run,cargo checkand similar), made agitrepo (so I just had to set the upstream to point it at the public Github). This gave me a canonical "hello world" on the console.glfwfrom Nox Futura, so I figured I'd use it as a base. Getting the support for it was as easy as adding a few lines tocargo.toml(cgmath = "0.16.1" glfw = "0.29.0" glm = "0.2.3" gl = "0.12.0" image = "0.19.0"). Onecargo checklater and everything downloaded and compiled. Nice.rltk(Roguelike Toolkit - the name of my C++ project that provides roguelike infrastructure), make amod.rsfile in it and put the module in there. I still didn't like having everything in one big file, so I broke it out into smaller ones. This proved troublesome. The magic incantation turned out to be that themod.rsfile had to include some lines for each file:pub use self::color::Color(for example; that exports myColorstructure from thecolor.rsfile without ridiculously huge namespace names) andmod color(to tell it to use the file).Rltkstructure that talks to OpenGL and gives me a window, and theConsolestructure that builds an array of glyph/color pairs, exposes some helpers likeclsandprint, and wraps the functionality to build vertex/index buffers describing my console in GL terms and with appropriate texture coordinates to output the characters. It also uses theimagecrate to load the terminal. I ran into a gotcha: loading apngfile didn't work properly, so the font is ajpg.main.rs) from the game logic (ingame.rs). More on that below.glfw::flush_messagescommand returns a big list of variants (union types) for events that might come from the OS/library. You loop through them andmatch eventon each of them. The wildcard matching is awesome. soglfw::WindowEvent::Key(_, KEY, Action::Press, _) => { self.key = Some(KEY); }matches events that are aKeyevent, with the type set toPress. The_means "I don't care what you put in there", and theKEYmeans "fill a variable named KEY with whatever is in this slot". At this point, I just save what key was pressed - but wrapped inSome. "Key" is an option - so it either hasNoneorSome(data). That's similar to a C++ optional, but a bit easier to read (and saves a bool, I guess).So, the main loop. Unlike other languages, if you try and use mutable (changeable) global variables, Rust will complain bitterly and make you write the dreaded "unsafe" everywhere you use them. That's because it can't guaranty that threads will treat it properly. I'm not using threads, but Rust doesn't care about such trivialities. I also wanted to make the
rltkportion reusable (maybe get to the point that a Rust version of RLTK is available), so it was important to me that therltklibrary not know anything about how the actual game works.So I ended up with the following boilerplate:
That's actually more boilerplate than I'd like, but it works. It starts by saying "I'm going to use the modules rltk and game" (the
modstatements). The main function initialisesgs, my game state. Then it initializes an 80x50 console with "Hello World" as the title. The uglylet mut tick_funcstuff is a closure - or a lambda in other languages. It definestick_functo be a special function that captures its surrounding environment - in this case the game state. So when I call themain_loopfunction, it takes that as a parameter, and calls back into my code. This was a bit of a dance, and requried learning a lot of gotchas - but it works.So on each tick, the console calls my game's
tickfunction, and - if anything changed - redraws the console. The tick function simply calls code to draw the map, draw an@at the player's location, and matches on thekeyvariable I talked about above to see if I've used cursor keys - and moves the player if I have.Hope this helps someone!
11
u/KarbonKitty Rogue Sheep dev Jun 19 '19 edited Aug 07 '19
Burglar of Babylon - TypeScript + ROT.js
Play here || Repo here || Template repo
Parts 0 and 1 are done. I hope to tutorialize the experience, but I will probably do that after the series conclude, since right now the life is in the way, and just keeping up with producing code will be difficult enough. :D
As for the game itself - I am returning to an earlier idea of mine, for a stealth-based, cyberpunk roguelike, where the player takes on a role of a cyber-enchanced burglar-slash-hacker whose goal is to uncover some secret. To this end, he or she will have to break into office towers, CEO's villas, government laboratories, military bases, and who knows where else, to steal information - which will either be used as clues or traded away for money, equipment, and sweet, sweet chrome-plated cyber-arms.
I'm using ROT.js with TypeScript, bundling all this together with Webpack. It already seems much more sustainable than my previous attempt at doing the same, which is a nice thing - previously I've started Burglar of Vratislavia when ROT.js was still, well, JS, and I was also much less experienced in setting up a client-side project. Hopefully this time I will at least finish the tutorial, and if all goes well, it will be a good base to work on later. :)
10
u/iamgabrielma Ad Iterum on Steam Jun 18 '19
If anybody else is doing it in C# and Unity we can share ideas of how to go about implementing the tutorial, I'm publishing my weekly progress here
As a general question (not only C#): Would you say is a good idea to use static classes and the singleton pattern for both the player and the map so are easily accessed anywhere and there's only one source of truth? This is my current implementation.
9
u/DrStalker Jun 18 '19
In case this helps anyone else: on windows 10 with Python 3.7.3/tcod 10.1.1 I get a few depreciation warnings:
These should all be easy to fix up by replacing the depreciated methods with the new ones, but to make following the tutorial easier I just hid depreciation warnings with
9
u/HexDecimal libtcod maintainer | mastodon.gamedev.place/@HexDecimal Jun 18 '19
You may get DeprecationWarning's from python-tcod in the tutorial, these are not errors and won't cause bugs or prevent you from following the tutorial. You can give Python the
-Wignoreflag to hide the warnings, or-Wdefaultto show all warnings in modules other thanengine.py, if it's your first time with this tutorial then I recommend ignoring these warnings. The flag needs to be given to Python and not the script itself:If you using version control then be sure to not commit any
.pyc/.pyofiles. If you're using a Python virtual environment then do not commit it to your repository. A.gitignorefile like this one will automatically ignore these files.Consider adding a
requirements.txtfile withtcodpinned to the version you're developing with (latest version is currently:tcod==11.0.0.) If you're using PyCharm it will sync its virtual environment with this file, and that will save you from having to mess with it manually.9
u/ashopov Jun 18 '19
Going browser based using Phaser3-ES6-Webpack
Repo
Demo
It's been fun poking at this for the last few days, mostly to get up to speed with Phaser. I've always wanted to adapt old school D&D to something, and the classic Keep on the Bordlands module is like a master class in adventure design, so looking to that for content inspiration. My mantra during this process is "you won't get it right the first time".
8
u/hawkprime Jun 19 '19
Last year I tried C++ with SDL2 writing my own graphics functions and Adam Milazzo's FOV algorithm. Tons of fun and learn quite a bit of C11 along the way, even picked up a C++ book.
This year I am trying it again, C++ with SFML. It's way easier so far. Tried a quick proof of concept and works great! Testing out multi-threaded rendering with vertex arrays for performance.
My setup is VSCode on Fedora Linux with GCC 9 and CMake. Hopefully I can get my butt in gear and put up a repo.
6
u/HexDecimal libtcod maintainer | mastodon.gamedev.place/@HexDecimal Jun 18 '19
My repository is here. So far I've completed part 2. I'm trying to go through the tutorial without any deprecated python-tcod features.
I'm using Python 3.7, python-tcod, and NumPy.
6
u/[deleted] Jun 18 '19
I've gotten a bit of a jump start out of excitement (and did the part 0 start up even earlier bc I'm always worried about setup install problems). I'm working on it with Python and tcod and working on it as a good "Big Project". Excited!
GitHub repo: https://github.com/SwordOfAces/roguelike-tutorial/
6
u/benfavre Jun 18 '19 edited Jun 18 '19
Will do it with pyrogue to see if it covers the necessary functionality.
https://github.com/benob/pyrogue-roguelike-tutorial
6
u/dafu RetroBlit Jun 19 '19
Excited to be joining the series this year, I missed it last year.
I'll be doing this tutorial in the RetroBlit framework, and when it is complete I will be adding it to the RetroBlit set of demos.
Week 1 is done, I'll be updating the WebGL build here as I go:
https://pixeltrollgames.itch.io/rl-tut
P.S. I'm using Kenney fantastic new 1-bit tileset, thanks Kenney!
5
u/Zardecillion Jun 18 '19
Crap now I gotta decide... my ant simulation or the roguelike stuff?
5
u/aenemenate https://github.com/aenemenate Jun 18 '19
I just got c++ to compile with bearlibterminal! I'm going to dive into this book and demystify classes and pointers while I implement the basics.
This projects aims to be a feature complete 2d10 dice roll based roguelike with ascii graphics. To spruce it up I will probably dive a bit into the procedural generation and make some interesting landscapes.
Thanks for hosting this event, aaron_ds, and thanks to all the others who helped and are continuing to help out
5
u/VikingSchism Jun 18 '19 edited Jun 18 '19
Hello, I've wanted to try making a Roguelike for a little while now, and since I'm just finishing some exams and managed to spot this happening as it started, I thought that now would be a good time to actually go for it. Although I do know Python, I'm not the most experienced with it, and really only have a grasp of the essentials, so this should be a good chance to learn a bit more about the language (heck, in part 0 I already went and learned what __name__ is)
Here's my repository, hopefully I can remember to keep myself doing this each week
Edit: I've now completed Part 1, woo
5
u/[deleted] Jun 18 '19 edited Jul 30 '19
My repository
My C# and SadConsole version is coming along nicely so far (parts 0 and 1 are done). One difference from the Python version so far is that since C# doesn't have the same flexibility as Python when returning a dict from a function, my keyboard handler method just returns an enum value representing the command to execute ("MoveNorth", "MoveSouth" and so on). Eventually as the game gets more complex I'll probably refactor it into using the Command pattern.
5
u/tpseven Jun 18 '19
Hi there! I decided to go with PureScript, because it's both functional language (that's my passion) and it compiles to JS so it's just click N play. First 2 parts are done. Looking good so far, but most interesting parts like FOV or pathfinding are still ahead. I'm also using rltiles's images, might add a switcher to ASCII version later on.
Repository & Game
5
u/TorvaldtheMad Jun 18 '19
Hi gang! I decided to work with Rust+libtcod this year, and so far I must say I am quite enjoying the different approach. I've run across a couple of things that I don't quite fully understand yet, but so far it's going well.
I'm a little ahead, I admit, but I'm going to be deviating from the tutorial a bit in order to aim for a short but actually complete game this time. I'm going to see about implementing a sci-fi/hacking aesthetic. We'll see how it goes.
Here's the repo! https://github.com/graysentinel/roguelike-rust
5
u/Laminariy Jun 18 '19
Hi! I'm going to follow this tutorial, but with TIC-80.
5
u/codyebberson Jun 18 '19
Typescript + WebGL + WGLT (my pet roguelike library). Designed to work both on desktop and mobile.
Demo
Repo
5
u/qu4ternion Jun 19 '19
I'm trying to do it in C++ but I'm still following along with the python3 tutorial for tips on architecture. I've tried following the python3 tutorial before so I'll probably deviate a little since I have some other ideas on how to do map generation and how to design the ECS. I'll post a repo link when I get around to it; any tips or advice are very much appreciated.
5
u/amuletofyendor Jun 19 '19
I think I'll try SadConsole and F#. My F# isn't great yet. So far I have the SadConsole equivalent of Hello World displaying correctly, so I think that's enough achieving for tonight.
5
u/TStand90 Jun 19 '19
My plan for rewriting the tutorial to use more updated methods didn't pan out, unfortunately. The code part of it was coming along nicely, but I forgot how long writing the actual tutorial text takes. I'll complete it at some point in the near future, but for now, the current version will still work (even if there are deprecation warnings, as others have pointed out).
Aside from trying to answer questions about the tutorial... I'll actually be participating this year! I'm going to be using Python, Bearlibterminal, and TCOD, with plans on doing write-ups on each section. Maybe even a tutorial based on it in the future. Maybe...
Repository is here:
https://github.com/TStand90/roguelike-tutorial-2019
Part 1 is complete, writeup to come later. Needless to say, this week was pretty easy. TCOD hasn't even been utilized or installed in the project yet, as Bearlibterminal can handle display and input.
Looking forward to seeing everyone's progress this year!
5
u/patrl Jun 19 '19
I'm a little late to the party at this point, but I'll be doing my best to follow along using Haskell's sdl2 bindings, and a performant ECS written in Haskell called apecs. It's been a while since I've used haskell for anything serious, so this is going to be a refresher course for me as much as anything. So far, I've got the rendering pipeline working ok, but I still haven't figured out the best way of handling input using apecs. The repo can be found here.
5
u/[deleted] Jun 19 '19
Awesome, love the improvements from last time around.
As more actions get added to the game is having a line for each type of action in the game loop necessary? My CS brain says there must be a better way around this. Anyone?
5
u/theoldestnoob Jun 20 '19
I'm doing it in Python, adjusted to clear the deprecated warnings from tcod. I'm also making other changes as the mood takes me, just to make later stages harder for myself /s. Git repo here.
So far I have completed part 0 and 1, and switched the input handling to use the class and dispatch function from tcod. I build a queue of actions in my input handler subclass and then pop an action off each time around my main loop. I'm also using a dict of tcod.event.sym to action dicts instead of a big ugly if/elif/else block. I haven't thought of an elegant way to handle modified keys like the fullscreen command (alt+enter) yet, so that is still checked in an if/elif block until I come up with a better way. You can see what I'm doing with my input handler in the "inputhandler" fork on my repo.
5
u/gawwo Jun 20 '19
I've just completed the first part with Unity from scratch (I've just took the turn idea from the unity roguelike tutorial).
Next steps is to read the various FAQs and try not to rush with the other tutorial steps until next week :)
Obviously any feedback is more than welcome!
Repo - Demo
4
u/gLeviRodriguez Jun 18 '19 edited Jun 18 '19
Kinda started last year on rust, but lost it quickly. Starting up again this year; same language, slightly more experience. Currently up to week 2, but l’ll be taking some time to clean stuff before I round that up.
https://github.com/GLeviRodriguez/rusty_roguelike
Edit: following this tutorial here, which I believe I got to from this subreddit.
4
u/RivalRoman Jun 18 '19
Super beginner here, am excited to try and follow along this year! I'm using Python and managed to get through Part 0 today; hoping to get through Part 1 tomorrow.
4
u/[deleted] Jun 18 '19
First off: I'm so excited to be going through this tutorial! Part 1 was great, and I gained a lot of understanding.
Here is my repository.
Everything was working fine, but for some reason, I keep getting the error:
Can anyone help me figure out why this is happening?
EDIT: NEVERMIND I FIGURED IT OUT BY MYSELF!! Small victory!
4
u/muvoksi Jun 18 '19
I took a headstart last week, and I'm plowing through the parts in the c++ version.
Repo
Couple things I've noted: The tutorial (old as it is) uses a weird way to iterate through actors with for loops.
I myself use the slightly easier version:
which seems to be way easier to read.
I also noticed few deprecations, namely the TCODConsole::print command. Simple print->printf fixed those.
So far I think I've learned a lot, and I'm already thinking of cool stuff to come up with for my own roguelike.
One thing I've been toying with in my mind is animation. Should i somehow have a animations variable on all actors that can animate, then in the main loop, or in the engine somewhere, i should play the animations all the actors might have every loop(i.e. actor is in fire? Then the animation could play even when turns aren't progressing.).
4
u/zachuk Jun 18 '19
excited to be following along. will be coding in Java, not using any existing libraries as I completed Trystan's tutorial using AsciiPanel previously and wanted to try it all from scratch. this is my repo.
4
u/VedVid Jun 18 '19
I had at least four ideas about how to approach the current event. Some time ago, I was tinkering with C# and liked it very much - doing a tutorial is a great opportunity to learn more. Also, I was re-learning python for job opportunity I had, so maybe it's worth to do tut with python, but writing everything from scratch on my own? Recently I finally decided to learn C++ - I was thinking about it for a year, maybe even two? But only recently I got the necessary courage to fight my own prejudices...
But... I always had a weak spot for obscure stuff, and Pony language looks really interesting. Maybe this is meant to fail miserably (documentation is almost non-existent, and it's kinda hard to figure out how to index arrays, even - it's not your usual array[index]; plus I got a lot of personal issues in few last days, mostly due taking an internship through polish government jobcentre that makes everything much more difficult than it should be), but I'm gonna try. I made even (a naive one) BearLibTerminal wrapper!
4
u/dbpc Jun 19 '19
My repository
Using C# & SadConsole, much like u/question-23. Currently I'm done with part 2.
4
u/-gim- Jun 19 '19 edited Jun 23 '19
Hi there,
not sure if I'll be able to complete it, but decided to give it a try. I'm going with (lua-based) love2d.
my repo after day 1 :) https://github.com/gim913/roguelike-complete-tutorial
unfortunately, I won't be able to do anything over weekend
and he's still not walking, but I'll get there... https://i.imgur.com/YXx3ZON.png
Finally I'm able to walk :) https://imgur.com/a/9K9ovxC
4
u/fadenpendler Jun 19 '19
Hello all!
In my other roguelike project, I switched in a fit of procrastination to bearlibterminal (with clubsandwich on top of it: this library includes a nice scene manager!) instead of tcod for the terminal handling stuff.
I completed part 1 with my newfound knowledge and I'd like to share it. I'm also working on a little write-up in the github readme to explain the difference to the tutorial.
GitHub Link
4
u/Reflex27 Jun 19 '19
I've begun and have a decent start using javascript, the rot.js library and the tutorial from http://www.codingcookies.com/2013/04/01/building-a-roguelike-in-javascript-part-1/ .
I don't have a repo to share yet because I'm still trying to figure out how to get my GitHub account and VSCode configured and working together. I don't have much experience with either of them yet. I'll also need to read up on the GitHub Pages for hosting...I think I can use that for a simple client-only web app like this.
4
u/[deleted] Jun 20 '19
First time participant and poster to this subreddit. Hi everyone!
I've decided to begin this journey with the tutorial for TCOD. Nothing too fancy, just what the tutorial has laid out as I need a larger project to work on, not to mention I do enjoy roguelikes (even if I do suck at them!). I'll probably research how to add some additional ideas I have for mechanics later. I haven't fully decided what "era" of roguelike I'm building just yet, but I'll probably look at some tabletop books for inspiration for enemy design and also some previous game design documents in case I decide to go another direction as this project will give me (hopefully) something for the portfolio and also some recreational opportunity since work is.... interesting right now. The beauty here of being the game designer is that I can shape this into whatever I want it to be and whatever I think would be fun to play.
As to my experience level as a programmer? Eh... some? Nothing quite like this. I've been too much of a magpie with languages, but Python is something I've put a bit of time into to figure out how object oriented stuff works. I also spent some time with C# since a project at work required someone to learn it at the time. And while I got a decent handle on the basics, I didn't have an opportunity to really demonstrate what I knew for reasons I won't go into here.
In addition, I figure it's high time I learned git properly. So, to the command line I went and pushed my code up to the git repository that I've set up for this project here on my personal, public account. And actually, git from the command line isn't as hard as I thought it'd be and not the monster I've heard about. (Maybe I'll just make a git monster to throw in the project for funsies.) To be fair, this is a one man show. I can see how this would get to be a nightmare in a hurry.
I haven't read ahead in the tutorial, but I'll be interested to see what mechanics we actually implement and how much I'll get to add myself (e.g. procedural generation, enemy behaviors, etc.) The cool thing about rogue likes is that graphical prowess isn't necessarily a requirement (ahem, drawing and art work isn't entirely my strong suit, but I'll probably invest a little time there as well.... Critical Role pub draw seems to be a nice, gentle intro there for me.)
I'll probably peruse some additional posts here, but it's nice to "meet" you all!
4
u/AgentMania Jun 24 '19
Excited to be joining in this year! I've posted my week 1 progress here.
I'll be following along using Construct 3 and uploading my progress to my itch.io page.
This week was pretty productive! Construct projects are fairly easy to get up and running, so I jumped ahead a bit and started working on dungeon generation. Luckily, there is a plug-in that gives Construct some of the map generation and fov capabilities that rot.js has!
See you all next week!
6
u/zwilf Jun 20 '19
New to python - I'll be following along with the tutorial (likely working ahead) and perhaps making some additions at the end. Just to be different I'll be using PyCharm on MacOS Mojave. (python3, libtcod)
Repo is here.
3
u/howtogun Jun 18 '19
I will be following along with this, probably in Unity or just libtcod and c++. I was meaning to create a roguelike based on ancient Japan probably Asuka period.
3
u/inthane Jun 18 '19
My Github: https://github.com/InThane/Roguelike
A little late to the party it seems...
I trained in college to be a software dev, then got out and ended up going a completely different direction. To give you an idea of how long ago that was, dialup internet wasn't widely available yet. I played WAY too much Moria back then...
I'm doing the challenge in Python, going through and cleaning up the depreciated warnings. Believe it or not, Git (and the connection between my local system and Github) is actually harder for me to conceptualize than the code has been for the most part. Environment is Ubuntu 19.04 + Visual Studio Code.
The first two warnings (basically just "use the property instead of the function, good OOP design) were easy fixes, but the third (hey, stop doing things this way and use our event handler object) was a little more tricky in that I had to fundamentally restructure program flow. I've actually done part of this project before, and knowing what's coming I'm aware that the changes I've made will make this more of a re-implementation than a one-for-one line copy.
3
u/OddOpusComposer Jun 18 '19
Salutations, I will be following in Python this year and to make a little cat theme roguelike. I have only dabbled in coding briefly by following old posts from previous years RoguelikeDev tutorials so I am super excited to be part of the conversations in real-time.
3
u/[deleted] Jun 18 '19
Is this done in C++?
3
u/endperform Jun 18 '19
If anyone else is trying this in Go, I'd love to follow along. That's what I'm going to attempt to use this year so I can learn it.
3
u/u1timo Jun 18 '19
Woo I did it :) Happy to be apart of this. I dabbled with programming on and off when I was younger. Making a roguelike has always been a dream. Happy to say that I managed to get through Part 0 and 1! I still need to spend this week re-reading the code/guide and what it all does. If anyone has any recommendations on resources for learning python, I would love to hear them :)
3
u/tjesionowski Jun 18 '19 edited Jun 18 '19
Doing this in D, tried bearlibterminal and got the following error when I tried to build:
source/app.d(2,8): Error: module \bearlibterminal` is in file 'bearlibterminal.d' which cannot be read`import path[0] = source/import path[1] = /home/tim/.dub/packages/bearlibterminal-1.5.5/bearlibterminal/source/import path[2] = /usr/include/dlang/dmd/usr/bin/dmd failed with exit code 1.(paging u/Elronnd for assistance, because bearlibterminal seems a bit nicer than ncurses)
Should I just switch to nice-curses? (Is ncurses a good idea for a roguelike?)
3
u/usami33 Jun 18 '19
my repository.
I am happy to participate in this event.
I will keep trying.
3
u/Thunderducky Jun 18 '19
I recently went through the original tutorial, but I'm going through it again* but a little different, namely: on the web.
I'm using Typescript and trying to not use any libraries, even tcod itself. (other than some linting and testing and what typescript requires itself)
You can find the repo here and the link can be found here
I'm hoping to make it themed around escaping from a space station.
https://github.com/Thunderducky/asteroid_story https://asteroid-story.herokuapp.com/
Good luck everyone!
3
u/sectorad Jun 18 '19
I'm using the tutorial as an opportunity to get more familiar with Lua.
As far as I can tell the Lua bindings for TCOD have not been maintained for years so I decided to use Bearlibterminal and rotLove instead.
The repository can be accessed here: https://github.com/nonni/rldev2019
Links to the code at the end of Part 0 and Part 1.
I'm done with part 10 but I started soon after the event was announced.
3
u/clamytoe Jun 18 '19
Hi peeps,
I got a bit excited when I saw the announcement the other day and started going through it in Python 3.7. I was modifying on the fly as I went but that made it a bit harder to follow along in later portions, so I’ve turned it down a notch. I plan to get to the end, add some tests and then refactor.
I just completed part 7 and have already learned lots!
Here’s my repo: https://github.com/clamytoe/roguelike
3
u/Viol53 Jun 19 '19
Hey folks! So far I've done part 0 and 1, and since it's a slow week at work I might end up doing 2 and 3 as well. I'm a bit curious as to how closely we're meant to follow the tutorial. Looking at the archives from last time I saw a ton of cool projects with a variety of extra ideas. Is that something people do after the fact, or is it more just adding extra stuff on as we follow along?
3
u/week77 Jun 20 '19 edited Jun 20 '19
Currently I follow Trystans' structure and finish the Part 0 and Part 1.
It is actually not easy for a java newbie to read other's code, so I try to learn the idea and write it by myself instead of just copying.
My own changes always make new bugs and some strange consequences, but I really learn from it.
Basically, make a simple game structure:
Here is my current game project github
made by Java + AsciiPanel
3
u/Skaruts Jun 20 '19 edited Jun 20 '19
Gonna be trying this out in Nim with libtcod_nim. I've been enjoying Nim a lot for quite a while, though also struggling a bit to wrap my head around it at times, so we'll see how this goes.
Current development in this repo.
Had a bit of a hiccup with figuring out how to replicate the messaging system, since the static typing doesn't allow the flexibility that python has. I made it work so far, though, thanks to a suggestion from u/amuletofyendor.
Also felt like writing some function overloads for libtcod_nim to abstract type castings. It's one of the peeves I have with Nim wrappers (the ones I used so far) is that they don't abstract this, and so you need to be casting function arguments to C-types all the time... Or maybe they don't do it for some good reason I'm not aware of.
I'm thinking perhaps I may throw in some SFML later on to make my own rendering stuff, just so I can have a narrow second font for the UI.
3
u/veoviscool12 Jun 22 '19
Hello all! I've been lurking on RoguelikeDev for a while, but this is the first time I've spotted the DevAlong, and it really hooked me! I'll be following the tutorial using Python 3.7 and Notepad++. My repo is here.
3
u/introsp3ctive Jun 24 '19
Am I correct in understanding that this tutorial is identical to the tutorial from last year as far as code goes? If that is the case, I'll continue to use the code base that I started working on from last year, otherwise I'll continue following along with this year's version.
2
u/PTrefall Jun 18 '19 edited Jun 19 '19
I'm writing a roguelike in Unity using my HTN planner library.
2
u/week77 Jun 18 '19 edited Jun 18 '19
As a Java newbie (Basically the AP level), I will try to do my first game (Which is called Zero Zombie) with java and asciipanel in Eclipse by following both your tutorial and the tutorial from Trystan's blog. However, I am now a little confused about the paint method of Java GUI. So I decide to do some research about how does Java GUI work.
If anyone choose java to be the language for game, I hope we can share some information and ideas about the game developing or just about java itself.
2
u/[deleted] Jun 18 '19
I'm following along in Python3. I've basically just copied the tutorial so there isn't much to see yet but here is the link to my repo: https://github.com/hufflazon/roguelikedev2019
I'm a reasonably experienced Python developer in my day job, but I haven't written a game since college and thought this looked like a fun way to get back into it.
My goal is to stick to the pacing of the tutorials but use any extra time each week to expand on the areas we've already covered.
2
u/Samba_4 Jun 18 '19
Hi, I'm trying a GUI roguelike. I'd like to let my characters walk smoothly. How should I do it? (Any references?)
Currently, I use linear tween for each walk (one cell to another). That's smooth when the game loop uses fixed time step, but not smooth when it doesn't. Should I keep using tweens & fixed time step, or is there any recommended way? Thanks.
2
u/catsanddo Jun 18 '19 edited Jun 22 '19
In step 0 it says that if you have problems then there must be something wrong with either python or tcod, but it doesn't give any explanation as to how to fix it. I'm getting the following errors:
Any ideas as to what's going on?
EDIT: Turned out to be a stupid mistake. I'm using pyCharm and forgot to add tcod to my project interpretter in settings.
2
u/nilamo Jun 18 '19
idk if this is a dumb question, but how strongly is it recommended to stick to just using ascii symbols? Obviously I can do whatever I want, but without having done it before, I don't know how much difficulty I'm adding for myself if try to make it sprite based.
2
u/mattpwest Jun 18 '19
I have the basic Python TCOD tutorial up and running!
Just a simple @ moving around the screen so far, but I'll see if I have some time to get ahead later this week... Code is up here (though it's 100% following the tutorial at this point): https://github.com/mattpwest/ghost-town.
If I get far enough along, I want to try to implement an idea I had many years ago about you playing as the cursed ghost-mayor of a little ghost town. To improve the town, you have to possess a villager and use him/her to dive into the dungeon to gain some resources. The game would likely feel very similar to Darkest Dungeon, just less party-based, more roguelike.
2
u/swish014 Jun 19 '19
I'm going to see how far I get in C#, using just the built-in Console class for portability (no external libs). I've completed part 1.
My repo is here.
As we get farther along, I'll look at some of the other libs to help with more complicated things like path finding.
2
u/[deleted] Jun 19 '19
Might be worth mentioning that there is no syntax highlighting on the bottom portion of the render_all() refactor towards the bottom of part 2 of the tutorial, I actually missed this part because of it.
2
u/Brynath Jun 20 '19
Ok Week 1 Done.
I'm posting thoughts about the tutorial on my website
My github repo
I'm looking forward to seeing what everyone comes up with
2
u/[deleted] Jun 21 '19
Part 1 Complete.
Language : Clojure
Library : http://quil.info
Repo : https://github.com/ReferentiallyMe/rld-tut-2019
2
u/phxrocker Jun 21 '19
I cut my teeth on Gamemaker and it's own language a few years ago and was happy just dabbling in that. Over the past year, I had quite a few breakout moments where I really gained a much better understanding of coding in general. Because of this, I decided now was the time to take the leap and start really focusing on a "grown-up" language that could have applications outside of just that one engine. So far, as I read some introductions to Python, I'm amazed at how much I'm able to translate over from experiences with GML and apply it here.
So I'm using this opportunity to help me learn Python. Since I've never been one for Git, I never really took the time to learn that either. I thought this would be the appropriate time to bring myself up to speed since it seems incredibly easy to push to Git from VS Code.
Here is my repo: https://github.com/phxrocker/RoguelikeDev-Tutorial
2
u/nicksmaddog Jun 21 '19
I'm working on going through the tutorial with Common Lisp and BearLibTerminal. Current code is here, covering part 0 and 1: https://github.com/nwforrer/cl-rltut . I'm thinking about writing up a Common Lisp tutorial to go along with the official tutorial. I'll try to get something together for that this weekend.
2
u/Captain_Tralfaz Jun 21 '19
Got a bit of a late start, but caught up quickly enough.
My project for this tutorial series is named HeroParty, and will be using the basic python3 with libtcod pairing.
The repo can be found here.
This is actually a change for me since I've done most of my RL hobby projects with pygame (I suppose I have a love affair with hexagon maps... Yes, I need help.)
But I felt like I really wanted to give libtcod a fair shake, as well as test out some new mechanics which could possibly turn into the land-based part of Shallow_Seas. This seemed like a good opportunity.
2
u/Nzen_ Jun 23 '19
Perhaps I should announce after refactoring. Nevertheless, I've satisfied week 1's milestone. Hmm, I made a gif, but flickr turned it into jpg of the last frame. oh well
Maudlin Honey Četyre is a java websocket server that runs the current 'game'. I've included a thin html canvas client to draw cells and forward key events. It's overcomplicated for this game; I'm unlikely to write another client in Lanterna. However, it's an architecture I've wanted to try since I read James Hague mention it in passing. For keeping score about which library I'm using, I'll likely fallback to SquidPony's SquidLib for field of view later.
2
u/endperform Jun 23 '19
I'm having a heck of a time trying to find a library to use for Go. That may be due to my lack of Go knowledge at this point. Seriously debating switching over to Python and then attempting to port to Go later on. If anyone can recommend a Go library, that'd be lovely.
2
u/voidxheart Jun 23 '19
Just finished this weeks tutorial in Unity with C#. I'm pretty new to game dev in general so some of my solutions may not be the best but here's how I went about it.
I used a Tilemap (a first for me) to hold the "map" then placed my sprite, from there the trouble was mostly learning the Tilemap functions and how to use them properly.
This ended up being pretty easy because this class has some great tools. My code ended up looking like this:
Then repeated for each direction. Direction being an enum that looks like this:
The issue with this code so far is this line:
Without that line the sprite would always end up rendering behind the tiles and therefore be invisible. This line fixes that issue but feels like sloppy implementation, so hopefully I'll be able to find a better solution.
The thing I'm going to work on until next weeks tutorial is putting boundaries on the map, I think the Tilemap class also has some tools for this as well.
2
u/HeWhoWritesCode ABC: AfricanBearCheetah Jun 23 '19
Hi, following along with the tutorials.
Just finished with "Part 2 - The generic Entity, the render functions, and the map."
Using my own pascal tui engine.
2
u/datassincorporated Jun 24 '19
*sigh*
So. I'm trying this out using Python and TCOD, exactly as in the tutorial. I'm on step one of Part 1, just drawing an @ and using ESC to close the window. The problem I'm having is that when I hit ESC, it doesn't close the window. Instead it makes the window stop responding.
I'm using macOS 10.14.5, Python 3.7.3 through IDLE, and whatever the latest TCOD is. My code looks exactly like the tutorial.
Does anyone know what's going on, or what I can try to get it fixed?
2
u/Crawmancer Jun 24 '19
Here is my progress for this first week, https://sendvid.com/xiedjx0z. I am writing it in kotlin and using libGDX for the graphics and input. It's a mobile game so the input is just tapping on the screen on different hex tiles.
2
u/MannequinRaces Jun 24 '19
Hi all, this is my first time doing this tutorial and I'll be using Python 3 and libtcod. I've dabbled with C# in Unity and Lua in Defold. This will be my first time using / learning Python. For my editor I'll be using Visual Studio Code. I completed Part 0 and Part 1.
My only question... is this the official documentation of libtcod? Are there any alternatives? http://roguecentral.org/doryen/data/libtcod/doc/1.5.1/index2.html
If so, it's very ugly. :)
Thanks for breaking this tutorial down into weeks and thanks for the motivation to learn Python!
2
u/godescalc Jun 24 '19
So, diving in and learning python (3) and working through the tutorial... it's a great introduction, and I can see why people like python too. No repo yet, maybe in an week.
2
u/RichardWizdan Jun 24 '19
Hi All! Better late than never - I managed to prepare a basic project. I'm writing the game in GML (yup, Game Maker Studio 2!), so I might be in a minority here. Here's my repo. I'll try to match the pace of the tutorial, but I also plan to add my own features. There's no demo yet, because I didn't have time to prepare it and besides, there's not much content to share yet. I'll be reporting weekly progress on Reddit and on my Twitter. I'll be looking forward to what the next couple of weeks bring!
2
u/spicebo1 Jun 25 '19 edited Jun 25 '19
Here's my update for the first week!
Repo: https://github.com/aneevel/sandwalkerRaw HTML progress report: https://github.com/aneevel/sandwalker/blob/master/info/weekOne/weekOne.html
A little bit of introduction to what info I'll share on a weekly basis; I'll cover the big things in my post that I've handled during the week, and I've also included progress reports in the form of raw HTML documents if you want to dig into what I'm doing further. These reports aren't meant to be a tutorial on libtcod, rust, or even this project. They are actually mostly meant for me, so I can document my general thought process at the time, and analyze my decision making later on. I wrote them as HTML because I might like to document this project later in my personal portfolio, or even expand on it and have a real working tutorial for others to follow. Take a look at them if you're curious about how or why I did something!
As I said in my introductory post, I'm using Rust for this project. I am somewhat familiar with libtcod, but I'm not yet very familiar with Rust or the rust bindings for libtcod. This week went a bit slowly as I became more familiar with Rust syntax and the libtcod bindings, but I didn't encounter any logical roadblocks, as I'm familiar with how to handle these tasks. I am not following any tutorials or instruction, just trying to complete the main tasks and maybe some other helpful functionality. I will be following the other users of Rust in this project after I complete weekly tasks, and hopefully they have other solutions so I can learn all about the capabilities of Rust. :)
For now, all my code sits in
src/main.rsbecause this project is so simple right now. I don't really care to break up my project until it grows a bit more in size, though I might refactor a bit earlier so I can utilize modules. Right now the file is only 92 lines long, and there's not much abstraction or functionality required, so there's no need to worry about it yet.The tasks accomplished this week were straightforward; I created a main loop which initializes the root console with a bunch of standard settings (where to find the terminal image, fullscreen, size, font type, etc.,). And then created a (then) endless loop while the console is open. This loop put the '@' in the upper left corner and displayed it. Since it's annoying to debug this program without responding to a close event, I went ahead and added the input functionality too. I decided to set the input handling up in a new function that utilized match, since it is easy to set up and even easier to add more functionality later. The result of this is the 'handle_input' function which matches attributes of the Key structure with the associated in-game response.
2
u/Jalexander39 Jun 25 '19
Just finished up Part 1 using Python+BearLibTerminal. No repo yet, but by next week, er, later today I'll try to have one to show off alongside progress for Parts 2 and 3.
I originally wanted to follow along using C++ or C#, but I appear to be stuck unable to compile. I may still keep trying with those languages but right now Python is what I've been able to wrestle into submission. (Incidentally, I'm avoiding Visual Studio because I want a workflow that is consistent between Windows and Linux)
2
u/Dovestrangler1 Jun 25 '19 edited Jun 25 '19
I have a weird problem, today I get this error message in PyCharm "Cannot run program "D:\Roguelike\venv\Scripts\python.exe" (in directory "D:\ProjectR\venv"): CreateProcess error=2, The system cannot find the file specified"
Of course, python isn't installed there. So I go to File - Settings - Project Interpreter and the path there is pointing to the correct patch in the C: drive, not the erroneous path to the D: drive. Is this some quirk because I run it in a virtual environment?
2
u/GeekRampant Jun 26 '19 edited Jun 26 '19
Exciting first week to see all the new projects coming out! Really eager to see the themes, flavors, and narratives everyone comes up with :)
I missed out on the event last year... never again. A bit late to the boards as the challenge has just entered Week 2, but wanted to have the first few blog posts up before officially joining.
It's an idea I had last year, and am reviving this year as it's a fun Halloween theme and it would be great to have it completed by then. Many things are being added post-challenge since I want the player to enjoy a cinematic narrative experience, but this is a great place to start!
This game runs in a browser, and is being done completely in plain ol' JavaScript without any frameworks or libraries. It really pays to understand how things work under the hood, and an excellent way to do that is rolling everything by hand. Then when the code is exported to other projects you have full powers of customization.
I also want to help other developers learning JavaScript and game design, and have been writing my progress up as a series of tutorials on my (neglected until now) blog. Some details are still being ironed out (CSS formatting), but this is something I've been wanting to do for a long while now and am eager to get started.
I'll post a link to the game proper during week two, once the map, entities, camera, timing, and image/sprite systems are working. Hopefully by then it will be more "show-worthy".
Best of luck to everyone :)
2
u/chad-autry Jun 27 '19
Getting a late start here. Was thinking I should just focus on my primary long-running project (which is not a roguelike), but programming at home is just a hobby, and I've had a roguelike in mind for awhile that I want to get a start on.
In short the long term plan is an mmo survival roguelike.
In long the short term plan is to make my own client components in react like I experimented with here sphericaly-connected-square-grid
I have more client side details/thoughts listed here character-perspective-client and to kick things off I imported and tweaked my web-page boilerplate into the project. Tonight I'll look at getting it built and pushed to gh-pages, and actually start work on the grid component.
Once I have the client components working, I'll hook them up and host the nascent game over at chad.autry.dev/roguelike.
Once that is accomplished (hopefully in a couple of days) that will cover it for week 1!
1
u/[deleted] Jun 18 '19
I’m excited. One more day of vacation and I can start!!
1
u/Marthusz Jun 21 '19
Well, parts 0 and 1 finished and started part 2. I managed to remove all warnings but probably it's not the proper way of doing it.
Here's the repo! I'll try to finish early and experiment with the engine and mechanics.
1
u/V1carium Jun 22 '19
Hey all,
I'm joining for the first time after hearing about this on /r/gamedev, its been years since I've played a roguelike so I've got a good bit of nostalgia backing my enthusiasm to participate.
Besides following the tutorial I've got a project I've stopped and started for years thats supposed to be a server running a game world that multiple different style of games can all use simultaneously. Ultimately I'm hoping to make my roguelike into a client for the server, it should be a very strong sanity check.
Not much there yet but heres the github: https://github.com/Vicarium/roguelike
0
u/[deleted] Jun 19 '19
[deleted] — view deleted comment
2
u/[deleted] Jun 23 '19
[removed] — view removed comment