![]() |
[PyGame] [In Progress] - Rogue-Like Game Tutorial - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: Tutorials (https://python-forum.io/forum-4.html) +---- Forum: Game Tutorials (https://python-forum.io/forum-33.html) +---- Thread: [PyGame] [In Progress] - Rogue-Like Game Tutorial (/thread-19247.html) |
[In Progress] - Rogue-Like Game Tutorial - nilamo - Jun-20-2019 There's a community on Reddit (https://www.reddit.com/r/roguelikedev) which is putting a roguelike game together, a piece at a time, on a weekly basis. It's not the first time they've done it, so we know it'll take 13 weeks. It sounds like fun, but I'm not interested in using the libtcod library to have a game running in the console, so I'm adapting it to work with pygame. Since all the tutorials are followed along with discussions, notes, and q&a, I'll try to keep the same pace as them, and link to their discussions. Likewise, I'll try to keep the project as close to the tutorial as possible, so you can read through it and have it work with very minimal changes. github repository: https://github.com/nilamo/roguelike Section 0, basic setup Tutorial: http://rogueliketutorials.com/tutorials/tcod/part-0/ Code: https://github.com/nilamo/roguelike/tree/section-00 Notes:
Section 1, basic pygame use, event loops, input handling, displaying a sprite, and moving the sprite Tutorial: http://rogueliketutorials.com/tutorials/tcod/part-1/ Discussion: https://www.reddit.com/r/roguelikedev/comments/c1xj5b/roguelikedev_does_the_complete_roguelike_tutorial/ Code: https://github.com/nilamo/roguelike/tree/section-01 Notes:
Section 2, Entity class, render functions, and a basic map Tutorial: http://rogueliketutorials.com/tutorials/tcod/part-2/ Discussion: https://www.reddit.com/r/roguelikedev/comments/c52ik4/roguelikedev_does_the_complete_roguelike_tutorial/ Code: https://github.com/nilamo/roguelike/tree/section-02 Notes:
Section 3, Map Generation Tutorial: http://rogueliketutorials.com/tutorials/tcod/part-3/ Discussion: https://www.reddit.com/r/roguelikedev/comments/c52ik4/roguelikedev_does_the_complete_roguelike_tutorial/ Code: https://github.com/nilamo/roguelike/tree/section-03 Section 4, Field of Vision Tutorial: http://rogueliketutorials.com/tutorials/tcod/part-4/ Discussion: https://www.reddit.com/r/roguelikedev/comments/c84ryz/roguelikedev_does_the_complete_roguelike_tutorial/ Code: https://github.com/nilamo/roguelike/tree/section-04 Notes:
...this section to be expanded upon over time... RE: [In Progress] - Rogue-Like Game Tutorial - metulburr - Jun-20-2019 You may want to think about branches for each section. So then you dont have to look at the commits and apply the changes, you also have the option of looking directly at the code of each section. I think it makes it easier for new users to identify. And you can link each branch along the way, so they dont get confused by branches if they do not know about it. RE: [In Progress] - Rogue-Like Game Tutorial - nilamo - Jun-21-2019 Good suggestion, thanks. I'll try to get that switched over tonight, and fix the links to point to the branches. That'll give me the chance to add a Readme to each branch, to list all the differences from the main tutorial, and why those changes were made. Edit: Alright, it's using branches now. RE: [In Progress] - Rogue-Like Game Tutorial - nilamo - Jun-26-2019 Just added section 2. I didn't realize the reddit group was doing two sections per week, so I'll get section 3 done in the next day or two, and probably work on getting a few done ahead of time to avoid falling behind if I get busy. In other news, I've also started taking the idea behind the project and re-implementing it in Unreal using freely available assets (like the ones that ship with the engine, lol). The idea behind doing this, is that I don't want someone to see the tutorial series and think something like "I'm not interested in terminal games" and just walk on past. I want to show that the concepts it introduces you to are key to pretty much all roguelikes, regardless of whether they're text-based, 2d, 3d, web-based, or pen and paper (like a custom game of Dungeons and Dragons). That's actually part of the reason I'm doing this in the first place: the game I want to work on is partly a Roguelike, so following through the series gives me an extra level of motivation to actually work on it lol. RE: [In Progress] - Rogue-Like Game Tutorial - nilamo - Jun-30-2019 Section 3 is up. All of the rendering code is unchanged, and there's nothing different from what's in the tutorial. RE: [In Progress] - Rogue-Like Game Tutorial - nilamo - Jul-06-2019 Between the holiday (4th of July), and a wacky issue I ran into, I'll likely be delayed for a bit. A surprisingly large amount of section 4 is handled almost entirely by libtcod's c library, which obviously we don't have access to since we're not using a terminal. So I ran into a bit of a speedbump re-implementing Field of Vision, and need to debug it. Well, I ran into several issues. The first, is that it straight up doesn't work right currently (all walls in the level are visible, but none of the floor is), which likely means I made a silly mistake late at night lol. The second issue is that it's abysmally slow (every time you take a step, there's a full second or two delay before the screen updates). I wasn't trying to do any tricks to make it fast, and was basically brute-force checking each tile to see if it's visible, so the speed thing can probably be improved. The good news is that section 5 looks rather simple, so once I get fov working right, we'll be caught up for the week. The bad news is that section 6 (next week) contains A* path navigation for enemy ai movement, which again uses libtcod internals. Section 7 looks like it should be fairly easy though, so I guess we'll see. *edit* Boom, got it working, and at "you won't notice it" speeds, so that means it's time to move on. |