Showing posts with label Project Simple Roguelike. Show all posts
Showing posts with label Project Simple Roguelike. Show all posts

Thursday, January 12, 2012

Not dead just busy

So I officially close the simple rogue like project I've been doing. It's been a fun ride and I learned a lot. but this is not quiting as I actually have accomplished my goals. Killing letters, leveling up, mobs, moving around, picking things up, item use, and changing rooms are all accomplished. Now why am I "giving up"? Because I'm not.

It's changing into something I believe I have enough tools at the moment to do, an actual roguelike with some unique ideas. I'm retentively calling this project "Legend" for which I'll get to in a minute but first. Some progress in traditinal roguelike things. Random map generation.

Ain't it pretty?
Some minor glitches that I won't go into but that's an 11x11 set up of "screens". not a level, but "screens" or rooms for a level. Legend is from what I'm looking at going to be interesting for a roguelike. As it's going to be based on some ideas of the older 2d Legend of Zelda games. This means "screens", boss fights, tools, and most strangely puzzles.

I haven't seen any roguelikes that really have puzzles in them as far as I know. While I'm not attempting something exactly like being in the Legend of Zelda vein It's going to have the same basic idea. You get a tool in the temple, use tool on parts of the puzzle to proceed further. The very basic isn't hard to imagine, just have to have the tool before the parts that require it but I still expect it to have a lot of bugs in coding.

Now I'm not going for ZeldaRoguelike completely but to say this isn't inspired by it would be a lie. What I will be doing is taking the puzzle elements, "puzzle" bosses (if I can), and some other features. Things like Hyrule, rupies, heart containers, Master sword, Triforce, and Ganon will most likely not be making the transition. I'll be making a goal list later at home for what I want to do with this project but I am very excited about it as I actually think it's feasible for me with what I've made.

Thursday, December 22, 2011

Actually some progress: Or I how I stoped worrying about variable corruption and learned to love the global

Yeah I finally got a fire lit under me. This fire got me to open up this old project and fix some bugs. Was a simple bug but how I got to it was something new.

So python and my monstrous amount of comments wasn't helping me and I needed some variable output. I however did not want to comment out all my debug prints, I've been doing that at work stead and didn't want to continue the practice at home. Realizing that I had an option of making a method to do print  outs and just comment out the print there but would be cumbersome and possibly require some debugging itself and smart passing or something I heavily avoided in the past, global variables. Global variables must have bitten me hard at some point in the past but how I don't' remember the specifics. Effectively Global variables does what the box says, makes a variable global, this means you global i here and you change it there, the i will be the changed version later. This can easily lead to variables causing unexpected bugs as you made a temporary variable that shared the same name without realizing it.

With this in mind debug_print_variable came to mind and I slapped it down in front of every method in my level class. Checkign when things were added and when things were moved, all the fun stuff that leads to bugs. Within the first running I realized the problem. The bug of the player character hitting themselves was caused by them being initiated at the start area and then the reset function move the player to it's starting position which cuases the "attack" event to replace the move. Since the player was at the starting position I never noticed this. So good success for "bad" programing practices.

Next up I'll have to figure out what to do next with it. Maybe add a weapon upgrade to pick up.

Saturday, October 29, 2011

a roguelike update?

So after weeks of doing nothing with it and playing with other Tkinter components I present.

It's an update. Not the best one and actually glitchy. There are quite a few things I don't like about it but following the ideas for making a roguelike I shouldn't be so hard on myself.

First is that it's hard coded, the 5 lines you see there are positioned there, I'd like it to be at the bottom of the viewable screen. This could possibly be easy to do but I was tired when I finally finished this up so it got hard coded to see it. Not something I should beat myself up over but I like dynamic structures, it helps for changing layouts later.

Second Tkinter canvas centers blocks of text. I do not like this at all. I may have to write my own code to properly justify things to the left. Not sure why Tkinter would think this is a good way to do things considering it works on standard top left coordinate scheme but it's the reality, maybe there is an option to do it that way.

Third it doesn't work. It fills out fine until the sixth item is hit, in which it should "push" all the ones before it up once and the topmost one into nothing. Right now it doesn't do that and I didn't get into the guts to find out why.

Fourth odd glitch. Players will hit themselves after moving on their first spawn. I do not know why but only noticed this with output.

Now for the nice things.

I got it done. It's progress. More than that I discovered a nice feature, with the way I have things move and attack each other enemies moving into each other will attack. This lead to some very confused minutes when I noticed this but it works exactly as it should. I would just need to add in some triggers to count allies as walls for movement purposes to avoid friendly fire, for now it's funny.

Friday, October 7, 2011

Worker bee

I really need to update this more. Getting used to a very early morning shift is proving to be difficult and leaving me a bit lazy in the afternoon. On the plus side I've learned quite a few tricks with python.

But enough with that. I have been minorly tinkering with some things. A few more lines in the roguelike mostly for door use and some musing over how to do text messages. Though much hasn't been done with that, though I did however go through to what point in my favorite list is.

Bout at step 5 though I'm trying to add doors as those seem like a challenge in my schema. Saving will be interesting though I've been playing with saving files on the job.  While this may be over your heads and I haven't touched it at all in playing with snakes I'll go on about it. Python actually has an object tokenizer (I belive it's called this) so long story short it can write large chunks of data to a file in some internal format. It's neat, though I may be skiping it with how my code works, maybe for a later project I'll use it whole sale but I don't know how deep or shallow it goes with objects inside objects.

Speaking of playing with snakes it's almost time to get to it's goal of a simple "fighter" system. I think roughly 4 more topics and it could start being put together. Though I'm still unsure how well I'm getting the concepts across. Scope for instance is really hard for me to explain but I understand it decently well through usage, the nomenclature and reasoning it out with others is beyond me though. While not entirely spoilers I have loops, classes, I/O, and actually using a file planed. How well I'll execute it remains to be seen. Either way that's my poor attempt at an update, I'll rest a bit less this weekend and actually try and get some stuff done in my free time. Been getting a little lax with rewarding myself for the job.

Sunday, September 25, 2011

Some things actualy "completed"

Well I stayed up far too much the past two days to try and "reset" my sleep pattern to a better time. Seemingly works as I wasn't tired at all when I woke up early this morning. During those two days I manged to do a bit of programing which surprisingly worked out.

A while ago I had some results of a simple roguelike. It worked out on my end but for whatever reason no one I knew could get it to work for some odd reason. This was annoying and pretty much made me stop working with pygames. Though I had some inspiration working with Tkinter even though I had some bad experiences with it due to a friend and got into some interesting things.

Look ma no pygame.
I looked into the canvas widget which is for drawing polygons and what have you to itself. A bit more reading and I found you could do the same for text. Without too much rigging and reusing some code from the other version I got effectively the same thing down and even went so far as to add some stupid AI to it. May have some bugs but its' done and can be gotten here. Since it's just using Tkinter an inbuilt module of python it shouldn't have errors. Even if it's an earlier or later version I don't think it'll break with how consistent they have kept Tkinter which is very nice.

That said I have looked into Combat Project too with some mixed feelings. For one the code has gotten very long, and very unorganized. I did not plan adding AI well at all. I do have some minor results with it and a lot of time behind it but it's a headache currently trying to add the new features to it. I think I may be putting it on hiatus or taking what I have and working from the ground up around it, because as it stands it's not quite as workable as I like. The system itself may benifit from being moved to something with a GUI as it stands it wouldn't be fun to test. So for now Combat Project is dead until I have a better grasp of how to throw it together. Hopefuly not too long but I stared at it for a half hour just getting my bearings after taking a little break from it and that's a bad sign. Mostly due to my part of not planing ahead. Code can grow like a bad cancer of spaghetti if not thought through and this is a result that I started organizing too late.

To take it's stead I think I will be trying something a bit simplifier. With the current roguelike system in place the "How to Write a Roguelike in 15 Steps" has popped into my head. While I skipped a few things I may start working on a simple roguelike, not that most roguelikes are simple but I'm not going to be trying to reinvent the wheel here. So project 'Simple' Roguelike is go. Though looking at the steps it seems I've skiped a few like saving. Mostly due to just wanting to get something to hit as any roguelike should have but we'll rectify that later.


I could put up a cleaned version of Current Combat project though if anyone wanted though it doesn't have much without the attack AI for the enemy fully functioning.