Showing posts with label pygame. Show all posts
Showing posts with label pygame. Show all posts

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.

Friday, September 2, 2011

Continuation on AI and mini project

More progress is being made with AI. I have successfully gotten it to choose it's pools under basic conditions, one problem is I have no error checking so all stats must be properly entered. Anything that is less than the total pool or possibly more than will cause an infinite loop. I could add error checking but it will seemingly bloat an overcomplicated and possibly fragile system I have set. So that is being put in the done column.

Now is working on a complex spaghetti code of checking about 12 different variables to determinate the next action. It's going along but I'm doing bad things in not testing it every step of the way but it's coming along. With that said I think I'm going to try something else at the moment.

Currently at a friends house as I type this up and his long running programing project has been wearing him down like mine has been. So we decided to make a short game, something we'll try and get done in the next few hours and possibly tomorrow. I have no clue what bizarre creation he's going to create but I'm going to try and throw together a simple rogue like for pygame practice. May not be more than a floor but you'll move an @ symbol around and possibly kill g symbols so it'll be something. I'll throw it up on here to finally put out some finished code.

So wish me luck and hopefully we'll have something more than me complaining about debug code and overly long posts tomorrow.