I wanted to make a roguelike but did not want to use ASCII characters as the visual on my GUI so I went to using the same module that I used for my mastermind game. I used pygame to help display my tiles that I made myself (that did not look the greatest). I started by making a random map generator, and when I say random map generator I mean that there would be a 5% chance for a rock to spawn on a tile. Extremely basic, just so that I could get everything else to work. I was also able to save and load my map to a text file. When I first got my whole map to print onto my GUI I was incredibly happy. It made me feel like I could accomplish something instead of just reading piles of PDF tutorials I found online. I got my character to move and collide with rocks and terrain so that he could not move through them. I had several major problems though, printing of the map at the edges of the generated map (for example coordinates 10, 7 of a 400-400 map) was extremely glitchy, I could not figure out how to make creeps that could move around that map and go any further with my current design. Getting my anything done on my first attempt took forever because I had to learn how to use Classes and things of the sort, because I only have one year of computer science at school to teach me I don't even know basic things about python, mostly because a lot of what I learned was in Java. So every time I went to make a method or part of a class I usually spent about half an hour online looking up how to make my class. I got angry with my design and decided that pygame was not the way to go for me. I thought simple might not be bad so I looked at a lot of the other roguelike programs and a lot of them were programmed in curses module for various languages. I looked it up, learned about it and its origins from the time of early computers. Tried to use it, and... It can only be used on Linux. Me having all windows computers did not feel like running Ubuntu on my computer, which I have but don't use often. I looked for something else to run my program in. And eventually found pygame-curses. It was a godsend, because I already knew a fair amount about pygame and they made a simple modification to come up with the curses module with windows compatibility. Another big reason that I restarted was that I lacked cohesion in my program and knew that I would not be able to program anything complicated later if the starting blocks of my program is crudely put together and I was loosing what some of my methods did and only knew what they outputted some of the time. I felt it was time for a hard restart due to the poor quality of my design.
![]() |
| User in my world made with pygame |

No comments:
Post a Comment