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.

Tuesday, December 20, 2011

Revenge of the math

Some things just come back and bite you. The past few days I've felt the sting of things I've forgoten or ignored.

I'm horrid at math. Supposedly this is rare in computer science things but I just am. Through school I've generally programmed a calculator, which surprisingly I was allowed to get away with as somehow I knew the things by being able to program them, and just avoided those classes. College I jumped to a related degree that just plain had less math.

Last few days we needed some more graphical things set up. That required lines drawn between nearly the shortest points of some lines and some points, in other words everything I've been avoiding. The crash course has went alright, as this is not completely needed to be automated some corner cutting is needed but it is sad I've spent a lot of the past two days failing at math instead of being stuck on a programing problem. But I suppose that's life.

Wednesday, December 14, 2011

Still kicking post trip

Oh boy I haven't put anything up here in a while. I do have half an excuse though. Last week I was a timezone and a few states away from training and this week I have had work to deal with. The trip was interesting and we arrived in a below zero blizzard. Warmed up later though, other than that nothing to say beyond being somewhere else will ruin your ability to game as much as missing a flight home. That was an interesting 16 hours. For now though I still need to recover some more and get used to being in my native time zone and native work load.

Saturday, November 26, 2011

Neural network and work

The past week and leading up to thanksgiving has been a odd at work. They have decided to send me down to Colorado for some training as the software and my workload was sorta put on hold with preparing for this, they don't want me to start a project I can't finish before I leave, and some coworkers taking time off causing the things I could do to be a little less even though I'm at the tail end of most of the project I have. So this left me with a lot of time to think as I document and cleaned up the code and I decided to on break take up setting up some neural networks on my thumb drive.

I won't go too far into neural networks explanation as there are wikis for this. I have a bit of story on my interest in neural networks and other such research based programing though. In college I sat in on a Genetic Algorithm class for fun. I had an interest in it as I actually did some of my own exploration of it in middle or highschool after reading something in some magazine. I was using game maker way back then and doing some messing around in that that actually had some minor results, most of them being the agents evolving to find holes in my test area or simulation. Either way back at the class I was sitting in I learned a lot about them and learned the basic feed forward neural network. I had taken to making one and trying some things that hadn't been done before to my knowledge and have the neural networks learn to play tic tac toe by "learning" off each other.

This wasn't typical neural network training as I was just using the neural network to preform the work and because the concept of them seemed neat. The workhorse was a genetic algorithm picking and mutating wining agents every generation. This didn't quite work, there was something akin to subspecies in the code that more or less played rock paper scissors with each other. lets say there was 3 groups (that's what I sorta came to believe watching the games) group A would try and win diagonally, group B would try and win horizontally, and group C would try and wind vertically. The game was more or less decided on the first piece as each group had a very entrenched first move after an A agent would place it's move a B agent was basically give up and just fill in the board in a pattern that let A win, a group C would continue as normal and end up blocking the A agent while winning. similar relationship between group C and B. This let each group get enough representation in the genetic algorithms choice of fittest agents to have them represented in the next generation, which just leads to the same not really solving the problem and keeping the agents in equilibrium.

I haven't touched this problem in years but I was thinking about it on work, and decided to get some neural networks programed on break. Took a week with a lot of messing around but I got the agents to solve XOR and inverting the input which is my standard for a working neural network as I don't know too much about standards for these. I also made a "produce key" feature which allows a string to be made based on the weights and thresholds of the agent. This is actually very important to what I'm going for. While not completely versed in the genetic algorithm or neural network programing I've seen that it's kind of been leaning far to a naturalistic side of survival of the fittest. The fittest agent is taken and it has offspring that may be exactly the same or slightly different than it which does work but seems to be inefficient and leads to cycles of not solving anything as I've seen before with the tic tac toe test. So with this key I'm able to keep a "gene pool" and see if the offspring is  worthwhile of being put in the next generation in regards to solving the problem. I may be wrong on this but my learning years ago didn't go on about pruning the genepool and making sure every agent is unique. So right now I have a working neural network and a will to try and revisit an old experiment and possibly produce something of worthwhile research which is some fun I haven't had in programing in a while.

Thursday, November 17, 2011

Legacy and Lisp

I'm terrible at updating this but still feel I should, saddly it's a life one.

Works been going a bit slow so I've been asking the other guys on some project to do as "training/downtime" things. I almost regret it, I've herad about it being the back bone for some of the systems but I don't really want to learn it. It being Lisp.

I don't hate lisp, but I just don't like working with it. Python took quite a few things from it but one thing they didn't take was it's general syntax. I was annoyed with python indentation at the start but Lisp acts like the illegitimate offspring of C and assembly. Mostly for it's polish (not even reverse polish) approach to operate syntax. A quick example to show would be a while loop and it's set up.

(setq a 0)
(while (< a 20) (setq a (+ a 1))
  ;worthwhile stuff goes here!
  (print a)
)

That's a lot of parenthesis for something that counts from 0 to 19. I get it and easily see it becoming maddening balancing them. Thankfully I can farm out a lot of it by setting variables to be functions and going from there. At least it got me learning.

Wednesday, November 9, 2011

Boring daily life

Haven't updated as much due to lots of "fun" things going on that weren't fun at all. Though I figure  I'll post a brief amusing thing for today.

We just got hit by snow. From this morning to now we've gotten a good 3 inches possibly more and it's still coming down. Horribly wet sticky stuff that prevented me from hitting my daily place for food for lunch. Beyond that it managed to somehow kill the power on the grid at least 3 times. Lot of interesting things said when those power outages hit in a place that's suppose to have an uninterrupted power supply and everyone on a computer.

I may start gearing up for something soon, just been an odd past few weeks. I would like to get the python tutorials to "make your own fighter" stage which shouldn't be hard if I sit down for a few hours one of these days but it's been last on my list. You guys have probably been there before.

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.

Sunday, October 23, 2011

pretending to be a game bloger

It's been a while but today I have some things to talk about. A little indie game I've come to like called the Binding of Isaac.

Do you really want me to die?
Bad MSPaint fanart aside it's a game made by some of the people involved in super meat boy. What this can tell you it carries some pedigree for difficulty and odd humor. For one it's a very gross game by a lot of peoples standards. but we'll get into that in a second first an over view.

You play as Isaac, a little boy who's trapped under his house escaping his mother who hears voices from god telling him to kill her son. For those who don't care about the fluff it's a Zelda like game with a a smashing of roguelike qualities. Controls are simple and I'm told it's reminiscent of smash tv or from my understanding berserk. You move around with one set of controls in carnal direction sand fire independently with other set. You have your main weapon which starts out as tears and upgrades to other things. Your secondary item is something you can pick up through the dungeon and has differnt effects, when used it has to "recharge" which is done by clearing rooms. After that you have bombs and "pick up" items. Pick up items are tarot cards which have unique effects you can learn via name and pills which are unknown at the start but you can find out what they do through experimentation. One last thing I haven't gotten yet is unlockable characters, which as far as I know are just stat and sprite changes for Isaac. You get them through doing some requirements in the game such as getting X amount of hearts or pennies.

So that over with onto why this is roguelike. First all maps are randomly generated. You can't just run through rooms though, you enter a room and you fight to the death with the monsters inside. The pills are the equivalent of other games scrolls, they are random at teh start but you learn what they do through the game through experimentation. Beyond that is one of the neat features in the games, the "items". Items you pick up in a few ways, by defeating a boss,by finding an item room, or sometimes through luck a drop off a special enemy. Items come in two flavors passive upgrades and secondary items which you can only have one of. The passive upgrades modify the look of Isaac while giving bonuses. For instance if you find the mushroom Isaac gets bigger as well as gains more speed and damage. Find the pentagram Isaac gets horns and does more damage, find that with growth hormones and Isaac gets a bit bigger and a lot uglier with even more damage. It gets some very strange combinations. Some are not just statistical, the "bloody Maggie" (I believe name may be wrong) is an option that follows you around while attacking at the same time you do with all your modifiers. No item is preset in this game so the combinations you get may make the game easier, harder, or just plain against your playstyle as you go.

With these items you kill demons, and this is where the game gets a bit gross. The fact that you attack with tears is one thing. Enemies (and maybe even Isaac later items willing) attack with crap, pee, blood, and other such things. You find breakable piles of crap littering the game that may drop items such as keys, bombs, or money. While somewhat Juvenal it gives the game a bit of a weird quirk and that is almost biblical if you read some of the obscure references about demons which fits into the games ideas. Beyond standard enemies you have upgraded palette swaps which drop some items, special enemies, mini boss versions of boss enemies, and of course bosses. All of them are once again randomly generated at the start of the game from a list of them. You won't be fighting Gemmini every time on the first boss room nor will you be fighting loki on the 6th. This adds a lot to replability as sometimes you don't have optimum gear for the boss you're fighting. Though I do believe you can beat the game with tears only if you're insane.

Though while I like this game I have some complaints about it. It took a twist on the zelda idea of attackign in cardinal direction and added movement physics to it. You move up and shoot right, your shot hooks up. So to shoot straight you have to be standing still, moving towards or away from your target. There are a lot of room layouts that do not like you doing anything but shooting staight. On top of that I feel the hit box for Isaacs projectiles are a bit off. I've seen the tears clip through targets on some sides but not other, this gets more confusing when you get things such as "laser tears" which go in a line eminating form a differnt spot on Isaac. Not sure if this is feature or bug but I find it very annoying to not know exactly how my shot is going to leave my charcter and how it's going to hit the target. Overal for 5 bucks it's a fun game. I've dropped a good 5 to 8 hours into it over the past few weeks in half hour binges but still haven't beaten the first time thought. Which brings me to my last thign to say about it.

This is a "roguelike" with multiple endings. The first time through gives you a default ending and after that there is I believe 3 more. This is amusing to me as I've never quite seen this done. I know through some friend beating it once that the floors of the dungeon are increased on more throughways so it may have something to deal with that. Either way I look forward to figuring out how to get them all.

With that I point you up to my bad MSPaint drawings caption. It's the question that the game asks you every time you want to quit. Twisted little feature don't you think?

Wednesday, October 12, 2011

Pythonic and work

Work has been intersting. First the whole new environment and people to interact with. Second is the work itself which is a lot of python. So I'll rant on a little bit about it while I try to get the urge to figure out something more entertaining hopefully for this weekend.

I was left with a lot of code to "roll back" to an earlier version of a program that runs python script. Some clients get sick of updating you see and getting one of these clients caused the entire library of the person I was replacing to break. It seems he was sent to actually get trained from people who made the program we patch and make our own scripts for behind the scenes instead of fumbling through documentation.

Using some old cold snippets and newer code that works with a lot of guessing has lead to some finally functioning programs. Somewhat slow large and cumbersome programs but workings ones none the less. All this somewhat ugly and done as fast as I could work got me looking into efficiency and good writing style for python and I come across something called "pythonic".

Pythonic is deemed "what experienced python programers expect to see" which sounds snobish, but it seems under that surface is some good things. Though first lets show off a "pythonic" philosophy that's so used in development most programs in Idle will show it jsut by executing the line "import this". The little bit is as follows.

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

A lot of pythons implementation and development follows a lot of this if you look through it. The entire idea of white space indenting is defiantly for readability and some other things can easily be seen in there. Other things such as list comprehension and other advanced programing techniques you don't really discover till you look for them and those were the sort of things that were hitting me over the head. For the past two weeks I've learned a lot about programing in python and got more than a few tricks to use. Mostly called Idioms. While I feel it's bad style to link out of the website if you got a grasp of python heading over to here will show a good amount of them.

It also seems a lot of their techniques are a bit faster than my C/java learnings tend to get me to create. Hopefuly I'll put more of the idioms to use in teh future though for right now I'd settle for being able to import my own modules under the program I work with. You don't miss functions until you have to cut and paste while updating the same functions over and over again.

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.

Wednesday, September 28, 2011

Functionaly mad : Playing with snakes 5 slither harder

Been a while since I've touched on this so here we go playing with snakes. For this one I'll be trying my best to explain what is seemingly a confusing subject, functions and scope. I would just do functions but scopes and functions go hand in hand. There is one thing they are very useful for but that's more advanced and saved for later.

Functions are very useful for programing in python. First they cut down code. For instance you could write.

print (1*1)+(2*2)
print (2*2)+(2*2)
print (4*4)+(2*2)

Yes I know there is inbuilt things for powers but might as well go whole hog here

 So the age old A squared + B squared to get a number that would be the last part of a right triangle. Lots of finicky stuff you do over and over while being easy to screw up but there is a simpler way and it's called a function and you can write one in the shell. Write the following

def right_triangle(a,b):
Now with annoying color
 return (a*a)+(b*b)

Hit enter twice and you'll be back to "ground level" in the shell. Now we're going to have some problems here due to blog not doing tabs right. Python for functions and scopes require indentation with whitespace, for blog code I'll use spaces, for real coding my preference is tabs. Either way I'll include what I did to the right so I can explain it a bit with graphical aids.

First you have to use def, underlined in red I'll explain why it's important latter, to create the method. After that is your methods name, it can be any thing as long as it is "one" continuous block of characters and avoids some special characters. Dashes are fine though otherwise not so much and I haven't tempted fate enough to learn the results. A space after that is your parameters or arguments underlined in green. In it's simplest form you can use as many as you want or as little as you want, even none you just put (), but you have to give them a name like any other variable and separate them with a comma. Trailing this is the colon which is the first indication of a change in scope. What this means I'll get back to later.

The right_triangle method we created is rather simple. It only has one line of code after it with a return statement followed by things I underlined in yellow. I'll get to that in a second but first lets use the method. Please type the following.

with the power of cropping you'll not see the mistake!
print right_triangle(1,2)
print right_triangle(2,2)
print right_triangle(4,2)



Admittedly this would be more impressive if the text to invoke right_triangle was less than the straight up code with the numbers that it produces. Methods allow you to reuse code and return results. Before there was the underlined piece of code with the variables a and b in it. The a and the b were the arguments passed when right_triangle was invoked in the code. The reason you have to use all the variables is that the code expects them. In the scope after it a will effectivly be whatever is passed first while b is whatever passed second. Now they don't have to be named a,b,c or any sort of sequence. Like the functions name you can name them whatever you wish as long as you separate with commas and enclose with parenthesis.

Now this doesn't have to be one line long. It can be multiple lines as long as the indentation is correct. For example.

The red line is what I called "ground level" for the code. This is where we've been typing everything out. Variables can be used and changed after we type them but now the rules are changed. Inside the function is a different scope as seen by the blue line. It is indented one more than where the def is, hence why I pointed it out before. The arguments passed through the parameter will only exsist as the variables in there and any new variables made inside will only exist until the scope ends. Scope ends by the indentation returning to normal or return statemtn is used, regardless if it returns something ro not. This functionality of return will be important later but for now it's just a neat trick.

Now this wasn't a very useful function. As I said before you could type out what it was doing in less typing than it took to make it, but once it starts getting lines long or used for other things that involve later ideas it'll start looking like a good choice. Till then hopefully I didn't butcher this idea too badly.

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.

Friday, September 23, 2011

Thoughts about older RPGs

Combat project has sorta been on hiatus with all the job junk but I've been thinking about turn based games. Asking a question akin to "how would you make turn based RPGs competitive" to some people got a few answers. Some not so worthwhile to me as they were subjective such "awesome graphics" and "Epic plot" but a few managed to get my attention.

Pre-battle Tactics
This one got my attention, though not much of an explanation, as I may have never seen this explored. In most traditional RPGs the most you did before a battle was buy then equip the best items, maybe use some monster repel to keep random encounters down, and recover. That's it, quite little you do that does have an impact in battle but not much of a choice until you're low on supplies. While I didn't get a proper explanation there was a few thoughts on this. The most overwhelming thought was of "buff" spells.

In most old games, I say most as I haven't seen them all, enhancement spells only last until the end of battle. After that the only thing that sticks with you is a number of negative status effects like poison. While this could have been due to memory issues it may have been a hold over from earlier games. The thought upon hearing Pre-battle tactics was a very simple idea of "everyone gets to cast a free enhancement spell". Using some menu you could set up your battle strategy and get all your buff spells or possibly abilities cast. Personally in every RPG I never used buff spells besides bosses for the simple reason that the turn you spent casting them could used defeating the enemies, it only served to make the battle one turn longer for the random encounters to me. How true this is I'm not sure but given a system of setting up some insurance on battles would tempt me into using them, a good strategy for making MP more valuable as it could be expended a lot more.

Beyond that I'm not sure. I'm not the most creative thinker in this sort of thing but for a more traditional Turn based RPG this seems like very unexplored territory so it's gotten me interested in it. Maybe something to look more into for later musings.


Menu System Reduction
I had mixed feelings on this but it's true. There are a lot of menus in RPGs. Often you'll go through a few sunscreens to do something other than the basic attack, even then you'll have to select the enemy which might as well count as a menu. It's a hard thing to solve for me though there may be a few ways to go about it.

While I have not played Mass effect I have seen it in action. The ability to pull up your non standard attack actions with one button then use a mouse/direction to select which one and target at the same time hides a lot of the menu systems without taking away from the number of it. Excuse me if I'm misremember a bit here though, it's been a bit over a year since a viewing of a Mass Effect game in action was seen here. While it may just be hiding the steps it's a lot better to look at.

This is sorta something that I was beginning to realize in combat project, 4 to 5 options every attack was seeming to be a lot. May be ways to reduce this as skipping some of them but at minimum you need to do 2 selections unless some sort of macro system was in place to automate a few decisions. More work needed on that thought though if that gets done soon you guys may not benefit from it.


Either way some lite thinking going on. I will try to get back to putting something up here but it may be hectic till I get an understanding of the situation. Though with how it goes I tend to do more little things like my own projects or drawing the more work I need to do. Either way if you have seen games which do some of these things I'd like to hear about them to look into it.

Wednesday, September 21, 2011

Still alive and looking at things

Haven't been posting for the past few days with mandatory drug tests, pre job paper work, and getting transportation set up. Between that just been trying to keep it cool as I'm going to probalby have a tough first few weeks.

To prepair for that I've looked into some "advanced python programing" on a whim not sure what It'd spit out. And got this video on youtube. "Advanced Python or Understanding Python"is presentation hosted by google for "advanced" topics on python. The quotes are there as I'm not sure where advanced starts and guts of the system begins. It's one of those things that even with the amount of time I've spent with python haven't really gotten into. I can get the gist of most of it especially the objects, some of which I've used such as generators, but some of it went over my head. Some things blow my mind such as the ability and execution of functions inside functions and the possible ability to contain more functions within.

Though there is a positive note to this. While I know that I am not the best python programer out there if this is labeled "advanced" and seemingly things that may never be used by me I might do alright. Beyond that a friend of mine is tentivly looking to try and make a game and I've been trying force him into python using tkinter to help him out with it. Playing with snakes post I made are me trying to refine what the points I was trying to get to him when I tried to "teach" him for giggles at one point.

Other than that been sleeping in as much as possible because the days I can do that are soon to come to an end. Though I'll finally have a job programing which is what I've been after for a long time. But for tonight it's Wings night, wonderful yet horrible for you buffalo wings from Pizza hut. Their "WingStreet" wings have a deal every Wednesday which means I can grab a box of them for nearly 4 bucks. For that price I'm up for getting take out.

All rights for this image owned by pizza hut, please don't sue me.
 While not the best wings I've gotten there isn't much choice around here. Not that many restaurants in the area though there are quite a few bars but doubt they are known for their chicken wings. I've had a quite a few failed attempts at cooking good chicken. Either way it's a nice spicy thing that I do enjoy even it's bad for my health. So with this a question for you guys. Anything you get regularly that's horrible for you but eat/drink it anyways?

Saturday, September 17, 2011

Busy past few days.

Well it looks like Combat project is being delayed but this time not of my own laziness entirely this time. I had gone in for an interview about a week ago and was calling in to see if I was passed up and told to come in and talk, figured it was a very formal and nice "well this is what we didn't like" thing. Long story short is that I manged to squeek into the place and will possibly be working in about a weeks time.

I'm posting this here because I do not know what I will be doing with this blog. I was having this as something to work on regularly while unemployed and now that I'm getting employed I do not know if I'll have time for it. I may end up cutting back on posts do to work but we'll see. I'll try to finish up Combat test and maybe a few other musings though but we'll see. For now I have to get prepared for some of the job things, buy a few more articles of clothing as the dress code is a little higher than I thought it would be. Either way it's an exciting time right now, I may actually get to program in a professional degree and python was actually the thing that got me in the door.

Thursday, September 15, 2011

Planing ahead

Got framework for ai punisher use for combat project done. I may or may not get it out monday but I'm close. I just need to refine a bit more but am happy how close I am. I will have to do a grammar check or something cause as it stands it has some intentional and unintentional phrasing that looks like it came out of a bad translation.

Other than that I have been making some plans for more M&M. Last time we tested a very odd character design against something that was plainly created from my experience with group fights. So something that may not be soloable at all being fought by something that abused a bit of the energy system we were using. So to make a more fair test I'm making something that isn't quite as gimmicky for both sides.

While I have some tricks for the "boss" it isn't quite as bad as the other one. Last one had some healing mechanics, position ones (knocking PC down and away so they'd take a full turn to get back), and just a lot of toughness to get through. A lot was learned but it wasn't quite a typical case. This one is more "standard" some defense tricks with psuedo summons but nothing quite as bad as the other. Throw on some standard and slightly non standard attacks and it should work alright. For the test PC I have something that is called a "blaster" in M&M's ideas. Ranged attack and nothing too fancy.

It'll be interesting to see what the energy expenditure is. For the real game the idea was you defeat monster to get energy from them, run out bad things happen. Defeating these monsters is the only way to get such energy so DM would need a good estimate on what a regular character uses in a fight. I think he vastly underestimated it with original ideas but by how much I'm not sure. It'll be an interesting experiment if we could set aside the few hours for it.I might come back here with results, I like working on M&M but have few people to talk to about it with them being DMs or players of mine.

Other than that I have one game finishing up and another that could use a bit more work on. A sandbox horror game with lots of "surprises" for my players to find. Far too many NPCs for me to keep track of and I really need to define all their quirks and relation with other NPCs. They were generated from tarot draws a while ago and have some simple back story on each one but with around two dozen even a bunch of simple back stories takes  while to flesh out.

So that's my long term entertainment. What are you guys looking forward to working on?

Wednesday, September 14, 2011

progress and doodling

I think I have my variables double checked now. Even noticed a glitch with the attack tags which I fixed. Now I need to do a few more tests and finish up implementation of AI punisher move use. After that some difficulty check and I'll just have this test be "pick a guy and beat him up". Not too involved but should be a good test to see if this idea was worth it.

Other than that I've been trying to do some more drawing and revisiting some of the things I used to do. There is a little exercise that we had in class doing "gesture drawing". The basic idea is we get a model or have a picture shown via projector for 30 to a minute and we try and get down as much as possible. Mostly an exercise for few but accurate and descriptive lines as we can't rely on a model or a scene staying the same for any extended amount of time. I did decently well with this sort of thing, in fact before formal classes I used to do something I called ten minute drawing with some guy I knew online.

Basic idea was we'd throw the other an idea and see what we could get done with it in ten minutes. Results were usually laughable and over ambitious but I always found it good practice. Tried doing some last night with friends and while the results were laughable it was good to get back into the habit so I'll see what I can get done later in it and with some gesture drawings nightly.

A tool I have abused is this site. Posemaniacs is from what I know an English translation of a Japanese site. it has a lot of 3d render models of mostly a muscle layer in various poses for both genders. The thing I used the most was the gesture drawing tool of "30 second drawing". This was practicalyl made for testing your gesture drawing skills as it will go for 30 seconds than instantly change to another random picture from it's library. I've seen a few around that do this but I like this sites. You can even shorten or lengthen the amount of time up to 90 seconds if you are just getting started at the whole thing and don't have a teacher to yell "stop" and force you to draw quicker.

That's about it, any of you doodle in your free time? Or if you're particularly brave/bored apt to throwing a link to something that you throw down in the 30 second drawing flash ap.

Tuesday, September 13, 2011

debuging and things that could use some debug

I think I found the first of my problems in combat test. Good old variable mess up. For example block has a block_wait and a block_change and parry, and dodge have similar. The X_change is how many turns at max it can wait to change and block_wait is the actual counter for it. Easy change but showing that you should always make variable names you'll get exactly what they mean on viewing. So going to work on fully testing that out and getting the AI using punisher things itself.

Other than that my Friend finally got me to get the minecraft pre release files as we could try out a server. That didn't work too well. For whatever reason I would log in, load for a while, move around ineffectively then get timedout. Seems to be a reported occurrence with no real work around so we're left with rolling back to stable version until a real update comes out. It's annoying but it's something I can expect.

Though I did make a single player world. Which happened to be an island. With one tree. No farm animals spawned but there was some tall grass. So after carefully harvesting the tree in hopes of saplings I made a farm. From there I hit tall grass for seeds to receive one. This did not seem good with the newly implemented food system. So I left the island a bit to find a few other small islands with tall grass and nothing on them and returned to plant it and do some tree management. Before the wheat was fully grown I found out that you can starve to death in game, now I made the mistake of jumping into the ocean to see if I could get in the seemingly glowing holes at the bottom before I died which I didn't make it too. This messes up my evaluation of "Starving" because I swore it left me at .5 a heart before suffication under water took that away, but I could be wrong.

After that I made another world with more trees and the hunger problem came again. I had plenty of sheep around and got lost getting other meats through hunting. Raw meat I found out does next to nothing for hunger which proved anoying when I started wolfing food down on the last food indicater. Though I have a little wheat farm growing in the middle of a lake and want to get some pumpkins or watermelons to see how they work in game.

While buggy as hell I'm actually very interested to see how food will now play in the game. I also want notch to leave the option of "classic" play style where food doesn't matter but I doubt that'll happen. It'd be a shame though, as he did say there would be ways to ignore food and Creative omnipotent mode isn't quite the way to do that.

Monday, September 12, 2011

Strange day

Currently putting in debug code in combat project in hopes of figuring out why my AI is jumping the gun on switching defenses. My guess is this is going to take a lot of debug code and watching and will be something laughably simple as that's how these soft bugs go. The second guess I have is that a less than sign should be a greater than sign. This debuging would have started this sooner but today was an odd day.

So as I have nothing else to say, the strange day. Monday is trash day here. I'm never up before my father who takes it out to the curve on the way to work but I'm always up by the time the trash men roll around in early afternoon. I figure instead of being a bump on a log I'll be the one to bring it in out of the fact I get my online job hunting done in roughly a fruitless online hour and pounding the pavement I save for a monthly basis if I don't get tips on who's looking. Beyond that I decided I had enough laundry to do a load of laundry and planed for the rest of the day. So after getting this done and figuring I have enough food to eat for the day and such I decide to take the trash can into the shed and get back to the door. To find it locked.


There has been a general rule at the house as we both come and go at laughably different hours to assume the door is always locked. It saves the other from having to check if the other is home, asleep, or taking a walk and may be back any minute if they're going out or to bed. This works well for us it however has given me the habbit of lockign the door the instant I open it up to head out.

With the fact I was planing on not going anywhere that day I didn't have my phone or wallet attached to my person. So after scouting every window on the house to find that it would take me ripping open some screen and probably a rock to a window I gave up on breaking into my own house. With the searching I guessed the time was getting a bit past when he would usually return home so I figured waiting it out wouldn't be long. I realized quite quickly that it was very humid out and I was quite wrong.

For a while I stayed around the front door before going off to the "club house" the little area has that we get our mail at. Finding a chair that faced the road my father would come down I sat there for roughly 40 minutes. Sitting there I had view of the local soda machine that spits out a can for 60 cents, not the worst deal for a nice cold can on a hot day when you don't really have access to water. When waiting I seem to get very thirsty very quickly and that machine was not helping. I even had the bright idea of seeing if people threw away 6 cans so I could take a 10 minute walk to the grocery store to return them and come back to my seat with a freshly gotten can of soda. Sadly not a single can was waiting to be return for deposit and the passive waiting was getting to me and I took off for my friends house who was an hour and a half walk away.

A good 20 minutes into that I realize how stupid it was as my father would probably be home by the time I got there so all I was accomplishing was getting to a friends house to call him up for a ride from half way across town and turned around. Getting back didn't change the situation at all so I hunkered down and just started waiting till I saw a neighbor watering the plants. Figured I might as well ask if I could use the a phone. He gave me his cell and a bit of directions and I tried to think up some numbers. It only took a few seconds but I realized I flat out didn't know any numbers, years of having to just use quick select on my phone had erased all but one number so I called that, to find out I remembered it wrong. So the nice guy invited me inside to use his phone book, after a good few minutes of paging through it I hear the tell tale noise of his truck coming in and thank the man for his help to be let in.

It seemed to be a few hours since I took in the trash can. After changing some laundry around I decide to finish off one task and gather 60 cents. I went back to the club house and got a soda to at least feel like I accomplished something in this comedy of errors. With horrible Mountain Dew in hand I came back and lounge on my bed with a fan on where I remained for longer than I probably should have.

Still not quite as bad as when they changed the lock on the front door of the house without telling me when I came back from college in the winter, granted I was used to hiking through snow for long periods of time.

Friday, September 9, 2011

Random musings

Yesterday went well thought this week is seemingly wash for Combat project so I'll extend the projected date a week and take it easy this weekend. So just a bit of random musings.

Though I have found out a few things about python. I managed to get multithreading working though it seems the python language is not the most thread friendly language. I managed to use that with a bit of socket work for a simple echo server test. It was interesting to do something that had some non game programing.

I have done work in other languages in a higher end capacity but python has mostly been my personal amusement code. Simple little programs or games of no real value to anyone else. It's easy to transport, quick to set up, and isn't too much of a pain to work in beyond self and whitespace issues so it works well for that. On the professional end I have no code in it, and that was what the people were looking for the other day.


It was a little rough but at least it was something to show the people who were interviewing me along with some older code. It could use a lot more polish and I did cope out with some timeout functions instaed of perfectly avoiding deadlock which would only appearing in 4+ thread cases where something would get stuck on listening for a reply. I considered it a win though getting it all done in one night.


While on that subject, have you guys done anything quicker and more proficiently than you expected when you needed it?

Wednesday, September 7, 2011

further delay on anything interesting

It seems I won't have anything interesting today to offer either. After some poking around I got a quick interview to show up to. While this all well and good I have little current programing examples. To remedy this all day I have been producing some newer examples of my competence in coding.

Namely some multithreading and server client code. Then combining the two. It's going along decently well as this is territory I have covered quite a bit in my schooling days but I have never done it in python so there is a few language hurdles to overcoming though hopefully it'll help out in the end. I may attempt to get some SQL examples done but I don't think that will happen if I want sleep.

Tuesday, September 6, 2011

ai brain problems

Took yesterday off to play some games and check some job things. Though today I have been hitting the code hard for the past few hours. In those few hours I've set up all the variables and have been starting to test the ai defense switching in response to getting hit with attacks that punish it for the defense it's in.

variables variables everywhere and I'm this close to needing to watch all of them
The above image is all the default values, I'll be making a monster creator method to tune them to values needed. As it stands it's both due to me trying to do too much at once and not planning correctly. There are probably quite a few things I could reduce or find a more elegant solution to implement but it's eluding me. Though I will say that I did discover a bug in my previous tests as I was only using the default randumb AI pool on accident and that was sorted out.

I'm unsure what it is at the moment due to my AI being a mess of variables. Sorta stumped and more than a bit frustrated though I'm slowly worming my way through it. Not much else to say beyond tomorrow I'll try to think up things more interesting to say. The situation at hand is taxing me a bit and I have some mundane things I was going to work on as well as this that are leaving me a bit brain dead for writing an interesting post.  So nothing interesting till tommorow.

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.

Thursday, September 1, 2011

Mutants and Masterminds foe and friend design.

A little late for me but it seems Wednesday is the weekly bug friends day. Project combat test is in debug and low level code work right now. With that said there isn't much that may be interesting so I think I'll talk about something else. As I've mentioned before I play and run Mutants and Masterminds second edition. So today I'll talk a bit about making characters from the DM side of the table.

There are three things to consider when making NPCs in Mutants and Master minds 2nd (and 3rd) edition. What it can do, how does it stay alive with pesky players attacking it, and what makes it interesting. The first two are relatively easy as there mechanic based so I'll start there.


What can your being of pure evil do?
The question we ask ourselves in the morning, it's less about what it does and more about what it can do to your Players. This is is more or less the characters "Attack". This does not necessarily mean it's brute force abilities to cause players pain but more often does. In some games it could be the NPC social connection or even it's ability to enable others to be the big problem with them staying the background. Those social ones can be covered in a few skills and feats or if you get fancy emotion control and some sort of boost system if you don't just hand wave it for the sanity I seem to lack. After that we have the "main" power that work wonderful for refluffing what it can do.


The offensive powers in question are Damage, Fatigue, Nauseate, Paralyze, Snare, and Stun. While this isn't all the attack flagged powers it's the ones I see most useful as apposed to trip and dazzle which have a more limited use. First thing I would like to say which is odd is that third edition had a real good idea which I will explain in a second. first every attack in mutants and masterminds is resisted by a "save" on the targets side, how much you fail by chooses the effect. In Second edition the effects listed above had two or three stages of failure of varying degrees of severity but were set based on the type chosen. In 3rd edition they combined everything but damage and let you choose the effects beyond the powers name. This allows for a lot more customization and more fitting effects. Though either way it should be aimed at some how taking someone out of combat. Which isn't too hard for damage, the non damage abilities have a harder time of sticking though they have the benefit of "stacking" and increasing the severity of their effects if a player has failed a save earlier. Either way these should be kept near the "Power level cap" or how much the game allows you have them at though this is to taste for a Game master and their musings.

While this list isn't impressive it is all based on your execution and proper extra use. For example Paralyze is slated in game as some sort of debilitating attack on a persons ability to react be it having to work through the confusion of some sort of poison or some monsters attack that saps the strength away from them. I have taken it's frame work and used it for an ice based attack from a foe that tries to encase in a layer of ice. I could have also used snare for the effect or even stun for this idea but paralyze was an interesting choice as it could slow players down. The only change was making it a "fortitude" save. I could get into a lot more on this but the bread and butter of any person making something in mutants and masterminds is using the same thing in different manner or even just a different weakness.


What can't your being of pure evil do?
The flip side of what we just discussed. It being inconvenienced, its defense and possibly an Achilles heel in the design. There are less things to consider here but they are very important. The first is do you want this to be a boss or a group of enemy encounter.

There is a big difference, the mutant and masterminds system runs on saves against everything, and a low roll means you fail and possibly takes you out of the fight. For players this is mitigated by hero points which can reroll the save around a "safe" zone or even higher for most attacks they would take. If you make a solo NPC to take the players on it is going to be thrashed by each one of them. Taking the group route hopefully means a division of attention as his buddies will be taking up the slack even if he goes down. Before I can go into the intricate parts I have to talk about saves in Mutants and Masterminds, if you played 3rd or later D&D they should look familar.

Saves in Mutants and Masterminds are Toughness, Fortitude, Reflex, and Will. From a mechanical standpoint they have more to do with the offensive powers above than what they mean in game but I'll go through the general explanation of each one. Toughness is effectively your HP in Mutants and masterminds, it allows you to shrug off attacks like nothing and take a lot of hits. For the most part only straight up damage. This one should always be near "Power level cap" for a villain because damage saves are rigged to have a higher chance to fail and plainly mess up a character than anything else. Other saves have roughly a 55% chance of succeeding if you are matched with it, damage saves have a 30% chance of passing so it is key that these are up to limits or the character in mind will go down far more easily than would be imagined. For this reason I tend to call everything that isn't Toughness a secondary save as they aren't the primary means of ending combat in a mechanical sense. Fortitude is the "strength of body" save, things like poison or shocks to the system go here. Reflex is actually one of the more import of the secondary saves, some powers may target it directly but it covers area of effect avoiding. Willpower is the flip side of Fortitude as it is the "strength of the mind" save that generally allows overcoming illusions and pain among other generic slated things.

Unlike Toughness these secondary saves are probably not the best thing to cap. In mutants and masterminds second edition there was an odd design decision to allow these to go up to PL+5 which when completely maxed out allows for a 70% chance of passing the save in question, I believe this is more from 3.X D&D than anything and actually makes things a bit difficult in designing solo encounters or boss battles where the villains are a higher PL. There is also the fact that it is kind of cheap to just cap these, as unlike toughness there are only a few powers that can take a character out of combat like toughness and last like an unconscious condition. So in general I follow the Mastermind Manuals "level based progression" of the D&D good and bad saves. One of the secondary saves is chosen to be "good" which means it's roughly double the bad saves values. There is a formula to this equation of good and bad save but it would probably be too long and pointless so I'll post up a small mock up chart here which is effectively what I use anyways. A thing to be mentioned is M&M is assumed to be played around Power level 10, it can be played higher or lower but it's assumed to stick around 10. The result is a character that isn't a brick wall for non damaging powers to get through. These aren't quite up to cap and will have a little variance when attributes are figured out due to save calculation. It also adds a bit of flavor when the big huge monster has a higher fortitude save, the small nibble melee fighter has a higher reflex, and the psionic powerhouse has a higher will save though it may not always be the case.

Why is your being of pure evil interesting?
Hardest question to answer. At the end of the day you will have a pile of numbers to throw at the players but why about this one over the last one is always a challenge. I commonly refer to this as the gimmick portion of the character and it can either be in the power set or its flaws. This one I can't really answer but it should be a theme to the character and how it's powers work, it doesn't even have to be blatant just something to tie the numbers together. I have made bosses that have abilities that drain down and on depletion give them a nasty complication (players never saw this happen) and ones that had reactive effects to show their prowess in ability. Though I will admit over the year or so in this game I've gotten a lot better and faster at this. Early bosses and such were a horrible situation that were often far too easy which was fine in learning a system. There is a lot of mechanical potential just in the books for interesting situations with a bit of thought into what the NPCs.

Well this was far too long and possibly convoluted for people that don't know much about D&D. So as a question for those that have stayed through all of this have you played any table top games?

Tuesday, August 30, 2011

Building a better brain

Not much to say but making this quick.

I've come up with the basic functions of the AI. For the most part It's driven by what type it is which sets some of the initial variables. Easiest thing to set up is percentage of each pool goes into pool. Each pool has two numbers per AI type. The first indicates how many it takes, second indicates the face of the die it takes. I didn't want to make it complicated so face is determined by lowest, heights, and random which just takes anywhere form the sorted dice list. Hopefully this gives the monsters a somewhat knowable action without you being able to always predict it.

It's defensive set up may change from round to round just like the players. It may have a favored defensive set up that when it hit with a punisher move for it It'll shift to a regular dodge periodically if you try to repeatedly use it. The only problem I see here is that punisher moves do a lot of damage, so much it may be a bug and I may have to bring out the debug code just to double check.

After that is it's own use of punisher abilities which I have explained before. Though I will give a brief explanation here. The AI will roll some dice when it sees  a defense used it is allowed to exploit, if it sees that again after the rolled turns it will set up the edge ability in one or two turns. This may have a few holes in it but I don't want teh ability to just chage defense every turn to negate the enemy ability to use edge abilities, IE it sees you used block so it prepares armor breaker next turn which you use dodge where it does nothing and then you go back to block repeating the cycle and just making it use edge for no reason.

Other than that it's coming along decently. Going to try and get down the rest of the basics in the AI class tonight and see what tomorrow gets me to do.

Monday, August 29, 2011

To AI and beyond

Well finally figured out what my problem was. After getting tired of looking for the print statements manually I just used find function to scroll through them out. It seems I had made a debug method inside the charcter class to display all the pools and this is where the debug spam was coming from, for some reason I could not see the debug in character_debug_pool_list() unless it was commented out.

So that is taken care of for now. Now I am working on a more inteligent AI system. Currently in a text file is some mental sorting going on about what variables I should have and what basic procedures I should go through. This may develop into it's own class but I'm not sure yet.

The basic idea is to let it "see" that someone is blocking then possibly use armor breaker later to maximize damage on the player. The same is true for the other punisher moves. This leaves dice pool manipulation up in the air, but I'm not sure if I'll even be having that for most monsters. So far it's getting organized and looks alright but I'll have to start testing it.

Beyond that is actual demo. I can simply set up "choose from this list of monsters to fight" and have that sort of demo. It'll work but it seems a little cheap. I should at least try to turn it into a simple game of sorts, maybe even have some leveling up as it is a RPG but that is for later. Though thoughts on it is ever X levels gain another dice to roll and maybe just standard +1 hp per level. Maybe even throw a weapon or two in there for increased damage.

Saturday, August 27, 2011

breaking into pygame

Today I stoped tearing hair out over where I put all my debug code and took out pygame tutorials. Only to start pulling out hair again.

I'm not all that patient with tutorials. I like to be bombarded with short phrases and execution of code and their results with explanations as to why they work. More often than not allegories are used (and I'm probably guilty of this) that really don't help me understand, it in action works a lot better for me. For the most part I was looking for one quick thing in these tutorials, how to get text printed out and it took me scavanging through a few tutorials.

It's less their fault and more my fault for wanting something simple that usually comes later in explanations. Skipping to those parts in some often involved missing vital initialization code that they mention in the their python primer. Beyond that I've found system incompatibilities for some odd reason. Either way I have managed to get some of it working.

tada
I'm familiar with the concepts, mostly of bliting text/images to the screen and only rendering the portions you are using at the time. It's how python does it that is the problem, and I had a heck of a time trying to pry out the simple code to do that without causing annoying crashes in IDLE. Though now that's over with, I can expand on this and will probably have "My text" moving around via keypresses in an hour or so.

The other thing that may prove to be a problem is the need for pygame instillation. I had a bit of a problem with it myself but after some trial and error I got it to work. This is not a thing I like at all considering my preferred ideas with python being self contained. Though I may be able to keep the source code in with the game archive to allow use of the game without need for instillation, I am not fully sure though.

This is more or less prep work for a traditional roguelike I'm going to try and get up running soon, but that's going to be after a probably anticlimatic Project Combat Test release. I'm still going to finish that sometime soon and hopefully life won't get in the way of my two week pseudo deadline.

Friday, August 26, 2011

pretending to be a food bloger 2

large wiki gotten image ahoy.

As programing has been boring debug code removal I think I'll switch to something with a little meat on it.

As of late I've been switching up to some home made food that is relatively cheap. My standard problem when I did this before was I'd try and make sandwiches with really cheap processed meat or uncooked meats I'd cook poorly in one way and get sick of in a day. But I have seemed to have found a solution.

It seems that I love pita bread and just in luck my somewhat local grocery store has it. Slightly more expensive than cheap loafs of bread but considering it's about 10 pieces of large flat bread I don't quite mind. After that I went about getting fillings from the deli. While it looks expensive in the 7 to 10 dollars range that's per pound. Asking for a third or half a pound did wonders to reduce the price for my budget. A little bit of hummus on the side for turning the pita bread into snacks and I'm doing quite well with this. Almost done with my first batch of deli meats and cheese and I have a second stack of pita bread waiting for fillings and I'm considering this a success in diet and budget. What I do for dinner is always the problem though I've been working on it.

So what staples have you guys tried over the years for food? Or have tried and found them to have utterly failed?

Thursday, August 25, 2011

game night

Today's post was mostly delayed by watching some friends stream games and run my own. I run a silly fantasy Mutants and Masterminds game that has been going on for a very long time now. It's a fun little game that is getting towards the end of ti's lifespan.

For a change of plot driven pace I decided to have a little dungeon crawl through a very splatter house themed session. This was roughly 3 sessions ago that this started. I filled a house with undead things and mid bosses who've been easily dispatched. While fun I expected this to be at most 2 sessions, even after many sessions in the game and realizing how slow combat can be online this caught me by suprise.

The general hope was to finish it up this month take a month off to finish up some lose ends in my next game and then start that. That deadline is being delayed. Not that this is a bad things, at the moment I'm trying out a few ideas in system for what I'm calling mid boss enemies that I've described before, and variations on it. They go down fast or get weakened more easily then the usually created monsters in the game. Some work in game, some are just hand wave for interesting sake but either way it's a learning experience. Just wish it was a little faster but we're having fun with it.

Wednesday, August 24, 2011

AI concerns and clean up.

Entering in the punisher move for bonus against parry and thinking about AI while generally cleaning it up. Not much to say about it so I'll dive into what I can discuss.

The current thought is how is the AI going to have and use edge abilities. For the most part they are specialized and require some "thought" behind them in use. One thought is that it can "cheat" and just have a timer to see if you stayed in a defensive position for x turns. It's simple and effective but unsatisfying. I don't want to make this too complex so I decided having some random dice maxes based on what type it is. Give it a chance to suprise a player while having a tendancy to lean towards one type.

Beyond that I think I'll have the AIs picking pools be very simple, possibly stupidly so. At the moment I have little idea on what is the best strategy for going about an turn though some ideas have been thought of. It's a start at least.

Tuesday, August 23, 2011

Lazy day

Some family happenings and other things have left me quite mentaly fatigued today. So no progress on Combat Test beyond getting a few methods named but that was some progress.

So thinking back to roguelikes I've planed I remembered Desktop Dungeons. While the site right now is gearing up for some paid version of the game the free original one is still there. Desktop Dungeons was a very interesting game for me. It combined puzzle games and Roguelike elements into a nice little package. The main idea was that only the player moved around, combat could be easily predicted (except for some cases), and the only thing randomized was the layout. The layout was very important, beyond health potions, mana potions, and some class abilities uncovering unexplored area was the only way to regain any health or mana. The game starts out quite easy with only 4 class selections and no game changing monsters but adds them to the dungeon every time you beat the floor with a class. After that a new class may be unlocked along with themed floors, new items, and other such goodies. The goal of the game was to unlock everything so you could do ranked dungeons.

It executes this quite well. One of the running themes in good roguelikes is that they are "fair". While you may not get the optimal gear or the best layouts if you know what you are doing you can beat the game. This is not always the case but it's a good rule to follow. My first few attempts at Desktop dungeons were horrible failures where I didn't even level up a few times. In later runs on new computers I easily beat the starting portion of the game so learning what to do is a big part of the game. Each class plays differently and beyond the rogue or other classes that have chance abilities you know how most things will play out and can weigh your options to win. With enough planing you can take down the dungeon boss at relatively low levels due to killing other monster to gain level up mid "fight" with it. Generally entertaining though it encourages you to pull out paper or notepad to best mop up a floor.

Not sure what he's doing now. From the looks he's turning the idea into a full fledged game and having the minecraft inspired "pay for a beta and I produce it scheme". I played it a while ago and almost unlocked everything before moving onto other thing but it was a fun time. If you got a good 10 minutes to waste it's something to check out.

Monday, August 22, 2011

link to other site day


Not much to say here. More fixing up methods and other things. Though recently I found the Rogue Basin wiki and figured I should link it.

One of the attractions is that it has a very long list of roguelikes. Both "complete" versions and ones in various states of development. It even has a decent desertion of each one. On top of that there is a running list of recent updates to roguelikes it follows which is nifty. I haven't caught up on my general ones like dungeon crawl: stone soup but I even got to see that had a recent update.

The thing I enjoyed looking at though was various discussion on roguelikes in the making state. A How to write a roguelike in 15 steps is possibly something I should consider following. There is even some discussion on what makes a rogue like a rogue like buried on the site. Interesting things to me that almost make me want to drop combat project and work on a simple graphical thing. Won't be happening but is getting me to take down some simple ideas and possibly line up a "15 step" approach to doing something graphical.

Saturday, August 20, 2011

Quick update

Due to family things and the game later tonight I'll just be putting up this quick update.

Currently have been coding in Combat Test Project to get the counter effect in the parry defense. After some viewing of how the "make attack" method has bloated I decided I need to trim it down and separate it into useful components.  Got the bare parts seperated to allow counter attack to work.

For counter attack I've been stuck on for a while. It's a passive effect that comes along with using the parry defense type. For a while I've been struggling with how to implement it, the basic idea of this engine was to allow you a lot of control of how you defend and attack. The first blush idea was to allow a new smaller pool to be rolled from the successes on the attack but that seemed random. Going off the defense pool seemed silly and going off the attack pool seemed a little too much of a guarantee of a second hit if you're on the offensive.

I've decided to just take the solution of using the attack pool with some penalties to it. It's not the most intersting solution but it'll work for now. As it keeps turtling strategies to a minimum by dividing up potential defense pool dice.

As for next steps I need to get this attack method cleaned up. This means separating all the bonus and penalty searching into multiple methods which is a chore. Though for my piece of mind when working on this it needs to be done.

Friday, August 19, 2011

Being playtester is suffering

Some things have been coming up recently but I have finally gotten some things started with a friend that we have had planed for a while. He'll be running a 2nd edition Mutants and Masterminds game soon themed around Puella Magi Madoka Magica anime that had come out recently. To do this he's been messing with some systems in it to better fit the thematic ideas.

Basic idea is a constant need for energy to power the attacks, defenses, healing and all that so we looked into the energy system from the mastermind manual splat book. It gives a pool based on constitution of energy points to use and everything that isn't straight up hitting someone with your fist has some power points invested in it to come up with a number of these energy points to fuel it. The one twist was to not allow energy points to regenerate naturally To not ruin his plans I made up a character and a boss to see where the chips fall and it was very interesting.

First off friend was willing to do this to see how it is from the GM side of the Mutants and masterminds screen. He's been in three games so far from the players side one of which I run, so seeing how it works from behind the all concealing and powerful DM screen was a new experience. The second part was to see how much this energy system will work for game along with some other homebrew ideas to work around low energy points.

So for this I made the Maiden of despair via a quicker tarot card method I shown earlier. The fluffy results was this.

Hunched over a form that roughly looks like a long black haired women who is crying. Her form is made of monochrome pictures, diary, and letters about a man she loved yet kept a distance from. The man eventually moved onto a women whom he found attractive and actually shown interest in being his lover. This rough exterior is easily torn away by talking about the situation. Doing so reveals a shriveled child like figure inside who desperately tells itself everything is fine as it tries to patch up the holes others leave when trying to reveal her faults. She is at her worst when she conflicts with her self seeing herself at fault and tries to tear away her own memories and throw them at those around her to make sense of while she pastes up up extras to fix the holes.

Twisted and fitting for the game ideals. Made a character ins a similar method only with less ideas behind it, more focused on a power set which went very weird. From the looks of it the way she worked was going to be very energy efficient. All her powers were ones that boosted up her ability to deal damage and take damage with a few rule bendy ways to add an extra effect to them. The Not witch made was meant to take on groups so it would be an intersting fight.

Cut to it and we found out even with her energy point approach she blew through the energy point restoring the witches provided without actually wounding the thing. between a combination of missing and damage saves the character was solely on the losing end. The abilities I set up as part of her fluff were very effective against a melee combatant due to throwing her out of melee range on a failure again the trip effect. I originally was making a blaster magic user before realizing the monster didn't have a single way to deal with range so I switched to melee, and did that back fire.

So the first play test ended with retreat, 4 wounds, and 30 energy points of 120 expended. So the thought expenditure of energy was vastly underestimated especially if this would be a character who was running very energy light. The drops were estimated to only recover 20 energy points per boss defeated. He said he learned a lot .I feel I made a mismatch that may not be the best to learn from but we'll see. I'll probably try again later with some learned in character strategy but I plan on making a few more scenarios for him to work with. Either way he gets experience and possibly more foes/allies for in game use.

Wednesday, August 17, 2011

Conditional Fun: playing with snakes 4

After a day of being locked outside of a car and watching a friend get infuriated by from dust I think I shall continue the Playing with snakes series here. Last time I talked about lists mostly in preparation for loops but before that we need to work with a lot more pieces of coding. The keep it a bit short due to seeing how easy this bloats I'll stick to logic operation today.

Computers are very good at repetitive logic comparing. It is a fundamental process of how they work. Different languages have different ways of performing logic operators, for basic python it isn't too hard. The only one that provides problems is equivalency which is just '=='. I say it has problems as you can easily put the equal sign which is for assigning information to a variable. The other common ones you may remember from math class are less than '<', greater than '>', greater than or equal to '<=', and less than or equal to '>='. When python encounters these it checks whatever is before and after it and compares to the best of it's abilities and will return True or False. This will be useful in the future but for now some useless testing of theory. Please type the following or otherwise look at the image attached.

print 1==1
print 1==2
print 1>1
print 1>2
print 2>1
print 1<1
print 1<2
print 2<1



Very basic things. I could make a longer list using all of the basic 5 comparison statements but that would be overkill. Things to note this also works with characters based on ASCII designation and to a degree strings, though that is another can of worms. instead of something trivial you can use variables within the conditionals to use them for their intended purposes. The intended purpose to be used in conditional statements.

For a quick demonstration of variables in use type the follwoing

a = 4
print a<3
print a<4
print a<5
print a==5
print a==6
print a==4

Logical operators can even use two variables to compare to produce their result of Truth or false. At the moment this is pretty trivial but I believe next Playing with snakes I'll get into the if statements and scopes. After that some loops and a bit of object work and we'll have 'fighter' remade.