Saturday, September 3, 2011

The mini project results

well it works
Some success and some failure. Mostly stupid failures and mind destroying anoying failures but I'll get into that.

So in yesterdays post I talked about a minor break in Combat project to try and do some roguelike programing as fast as I can under pygame along with a friend who was trying to make something to get him out of a slump. So we worked on it yesterday for a few hours.

Things went well for me at first, basic class creation  and ideas for the "board" along with some methods to do movement and collision and it was all looking good. Then I started to try and draw to the screen and all the trouble started. Movement code was working wonderful until I realized moving above the test wall would cause it to vanish. From then followed a lot of debugging that didn't do much.

Cut to four hours later with lots of cursing and "knowing" what the problem was without actually knowing how to fix it and I had my friend look at the code. He knew "draw square" functions in java worked off an odd scheme of top left corner coordinates with a height and width variable to fill the rest out. Getting lost in how python works for it I assumed it was top left and bottom right corner to fill out the square so I was ending up with an increasingly bigger error. Fixed it and everything worked fine, the underlying system worked fine it was my misuse of graphics that messed it up.

After this I made a basic room and decided to send it to a friend. After a lot of trouble we failed to get it work which is why I don't like modules. This really put me off but I did add a bit more so I could prove the concept of me being able to set up roguelike things.

For those intersted you need to get

python 2.7.2
pygame 1.9.2a0 for python 2.7
and the demo itself as I won't call it a game

You just install python first then pygame after. From there you should be able to just execute the demo but I'm not entirely sure due to all the problems I have had with trying to get other people to use it.

As it stands you just move around with arrow keys and can kill defenseless goblins. After you're bored you can just exit out.

Either way it's something to keep around as it is a base for me to make roguelikes with.

6 comments:

  1. Cool! Things are slowly but surely taking shape.

    ReplyDelete
  2. One of the most frustrating things in the world is an error that can be solved quite simply but isn't. It's one of the reasons I don't envy programmers.

    ReplyDelete
  3. Tried, but I couldn't get it to run :(

    ReplyDelete
  4. @shaw
    I really need to figure out how this works. For most python things you should be able to run it anywhere but I don't know how add on module code screws everything up. The only idea is to have it placed in your python27 folder and run it from there but that's just bad design from modules and python in general if that's the only solution.

    ReplyDelete
  5. That doesn't seem to work either. The window opens for a second and then closes itself. Don't bother yourself with it if it's too much trouble.

    ReplyDelete
  6. @Shaw
    The problem is that it may not be loading something. That's the one problem with me developing this in IDLE is that I'm not quite sure how things run outside of it.

    ReplyDelete