Color Tower Defense 2.23 has been released. Source files and a windows executable are available. Python and Pygame are required to run the source. If you are running the source then run "Color Tower Defense.py"
As for changes, I made some new tilesets for the backgrounds of each level. Hopefully they are nicer to look at and still give the feel that I was going for. A few other visual bugs have been fixed.
Downloads
Wednesday, January 25, 2012
Mac Ogre Templates in Xcode Not Displaying Correctly -FIX-
If you cannot see the Ogre templates when you go to Xcode > File > New Project... these steps should fix the issue. I will not explain how to install the SDK, the dependencies, or the templates. I also will not describe how to fix path issues which occur when you first try to run the Ogre templates. A quick google search should show many results for both of those subjects.
First off, make sure that you Installed the OgreSDK, the Ogre Dependencies, and the Ogre Templates for Xcode. Go to Xcode, and click File > New Project... If you see this screen (notice there are no "Ogre" template options on the left) then your templates are not being displayed correctly.
Close Xcode and navigate a finder window to /Library/Application Support/Developer. You should see a window like this.
Right click on Shared and click Get Info. You will then come to this screen.
Notice how it says "You have no access". We will need to fix this before you can see the Ogre templates. Click on the lock at the bottom right corner and enter the required administrator password. Then click on the Privilege that says "No Access". and change the value to "Read & Write". It should now look like this.
Now click the lock to prevent further changes, and close the "Get Info" window. The Shared folder should no longer have a little red circle at the bottom right (like in screenshot 2).
If you open up the Shared folder you should find the folders for the Ogre templates.
If you do not see these folders, then you may need to reinstall the Ogre Templates. Now when you go to create a new Xcode project, Your Ogre templates will be displayed correctly.
First off, make sure that you Installed the OgreSDK, the Ogre Dependencies, and the Ogre Templates for Xcode. Go to Xcode, and click File > New Project... If you see this screen (notice there are no "Ogre" template options on the left) then your templates are not being displayed correctly.
Close Xcode and navigate a finder window to /Library/Application Support/Developer. You should see a window like this.
Right click on Shared and click Get Info. You will then come to this screen.
Notice how it says "You have no access". We will need to fix this before you can see the Ogre templates. Click on the lock at the bottom right corner and enter the required administrator password. Then click on the Privilege that says "No Access". and change the value to "Read & Write". It should now look like this.
Now click the lock to prevent further changes, and close the "Get Info" window. The Shared folder should no longer have a little red circle at the bottom right (like in screenshot 2).
If you open up the Shared folder you should find the folders for the Ogre templates.
If you do not see these folders, then you may need to reinstall the Ogre Templates. Now when you go to create a new Xcode project, Your Ogre templates will be displayed correctly.
Sunday, October 23, 2011
People are Jerks
From a python forum:
-----
person 2 (jerk): Is it your belief that anyone who uses your computer has full control? If so, what does having admin privileges mean? After considering those questions, once again think about the statement: your program is not you.
about what. i am trying to start learning python and i am already failing at the code i have posted. -----
person 1: okay i don't want to get into philosophical questions regarding who has control
Often times you can find many programmers telling others what good questions are and bad questions.
For instance, I have heard countless responses on online forums such as:
"Why would you ask what the best method is? We can never know what is best. There are pros and cons to every option in programming. You will just have to try every method for your situation and then you will know which route to take in your problem."
What kind of attitude is this? It's terrible! Imagine if you were on a road trip and you stop at a gas station in a city. You then ask some stranger:
"Where can I find the best Mexican food restaurant around here?"
to which they reply:
"As is the nature of newcomers like you, your question is ambiguous. How do you expect me to know what the best Mexican food restaurant is for your situation? We can never even know what is best for ourselves, why would you ask me to know what is best for you?"
That (I hope) would never happen, but why does it happen all the time on the internet?
Wednesday, September 28, 2011
Rewriting (nearly) my whole game.
I ran into so many issues with my previous method of handling networking that I decided to rewrite my entire networking code to use twisted.protocols.amp (instead of pb). I only have like 3 months left till I have to submit my game to some competitions though so this is gonna be crazy. Im going to try to just get the basic gameplay mechanics working and try to polish that. Then I can work on other things such as RPG elements like weapons, more dynamic enemies, random map generation(which is super fun), and other cool things that would take too much time to do in the next three months. But hey, on the bright side I almost finished the song for the game :)
Short, Self Contained, Correct (Compilable), Example
http://sscce.org/
Those are some really good guidelines for creating a small example to show someone an issue you are having with some code. It helps the person helping you so that they don't have to go digging through a bunch of lame and stupid code that has nothing to do with anyone, ever.
Those are some really good guidelines for creating a small example to show someone an issue you are having with some code. It helps the person helping you so that they don't have to go digging through a bunch of lame and stupid code that has nothing to do with anyone, ever.
Friday, August 5, 2011
Did I Mention I Got Hired As a Tester?
Here is the game i've been working on, It involves a bunch of mini games so the testing experience is... interesting.
http://www.ea.com/family-game-night-4
http://www.ea.com/family-game-night-4
Cellular Automaton Simulation
I made a little cellular automaton demo. Its pretty cool and I plan on using it to generate the textures for terrains, like the black tiles could be a dirt tile, and the white tiles could be a grass tile. I think It will create a really cool random terrain effect. It runs pretty slowly, but i think thats a python problem with looping through 1000000 tiles every iteration :). But in the demo i limited it to 3 FPS and its rendering it every frame but it can go quite a bit faster than that, I just set it to those values because i think its cool to watch.
I included a windows exe file (no pygame/python required!)
Cellular Automaton Simulation
I included a windows exe file (no pygame/python required!)
Cellular Automaton Simulation
How to get hired by an indie game developer.
How to get hired by an indie game developer
I love articles like this, especially how the are written by the people doing the hiring ;)
Its worth the read.
I love articles like this, especially how the are written by the people doing the hiring ;)
Its worth the read.
Wednesday, July 20, 2011
Tuesday, June 28, 2011
Possibly the most depressing photo ever.
Then again, maybe hes watching the greatest movie ever made with those goggles!
Just kidding... that image kind of makes me cringe.
This drawing was done by Eran Cantrell He has done some awesome stuff.
Friday, June 24, 2011
Setting up SCPlugin for Mac: Server certificate verification failed:
Ive been through trying to set up SCPlugin a few times now and its about time I post the fix that actually works. Hopefully people can find this easily and not have to go through what I went through.
The actual fix
The actual fix
Tuesday, June 21, 2011
Its Been Awhile.
So, School got out for summer, I went on a trip, and I got fed up with my multiplayer game. But today was the first time I have programmed something in like a month. Here's a super basic, really effective and dynamic item generator (for like an RPG or something). Its obviously not very fleshed out or anything (It took 20 minutes, what do you expect) but it is cool none the less. Check it out! Random Item Generator
Sunday, May 1, 2011
PyCon 2011: Getting the job: the do's and don'ts of landing a Python job
This is one of my favorite talks I have seen from PyCon 2011
It's really applicable to my life, and helps with a lot of the uneasiness of job interviews. I would recommend it to anyone and everyone. It really doesn't go into python specifically and it is in fact very broad in the sense that It would help with any kind of job interview.
Wednesday, April 27, 2011
Making Music
One of my favorite parts about developing video games is that I get to make art, music, and programming all by myself. I love all of those things, so video game is a perfect way to combine all of them.
But I've had some serious issues with making music lately.
The song I want to write is not the one that I end up making.
Summary of the last song I made:
Goal: 10+ minute ambient, electronic song. That can be looped and played as background music.
End Product: 6 minute progressive electronic song (good start) with a hardcore dubstep style drop at the end.
I mean, imo it sounds really good, its just not what im looking for.
I ,must be doing something wrong.
But I've had some serious issues with making music lately.
The song I want to write is not the one that I end up making.
Summary of the last song I made:
Goal: 10+ minute ambient, electronic song. That can be looped and played as background music.
End Product: 6 minute progressive electronic song (good start) with a hardcore dubstep style drop at the end.
I mean, imo it sounds really good, its just not what im looking for.
I ,must be doing something wrong.
Thursday, April 21, 2011
Has anyone seen these errors before?
These errors keep popping up when ever I try to load images.
libpng warning: Incomplete compressed datastream in iCCP chunk
libpng warning: Profile size field missing from iCCP chunk
It looks like other people have had this error come up. But I cant find hardly anything relating to pygame or python.
libpng warning: Incomplete compressed datastream in iCCP chunk
libpng warning: Profile size field missing from iCCP chunk
It looks like other people have had this error come up. But I cant find hardly anything relating to pygame or python.
Wednesday, April 20, 2011
Update on the Multiplayer game
Im going to try to post smaller posts more often instead of posting alot of content, really fast (and then getting burnt out, and not posting for a week or two) (which is what ive been doing, heh..)
Ive had alot of progress lately. The game no longer has (as bad of) lag issues.
This is because I am sending the objects velocity, instead of the position. It really helps a lot because instead of sending, for example, 200 object's positions, every frame (40 x a second). I only need to send the velocity of the object once, and the client will take care of the future physics updates.
I also made it so that each client uses a delta time value in the physics updates. I get delta time by subtracting the previous frame's time from the current time. Something like:
Happens every frame:
import time # except this
previous_time = current_time # sets the previous time before we get the new current time
current_time = time.time() # get the current time
delta_time = current_time -= previous_time # get delta time
update_physics(delta_time)
I then use the delta_time in calculating current position of objects.
This means that, even if one client has a wooden computer, from 1980, that requires a refueling of coal every 30 minutes. It will still have (in most cases) the same display as the kid down the street using his dads new super duper, high tech, state of the art, mega 2000X computer.
The point is, no matter the frame rate, the computers will have the same basic visual output.
Ive had alot of progress lately. The game no longer has (as bad of) lag issues.
This is because I am sending the objects velocity, instead of the position. It really helps a lot because instead of sending, for example, 200 object's positions, every frame (40 x a second). I only need to send the velocity of the object once, and the client will take care of the future physics updates.
I also made it so that each client uses a delta time value in the physics updates. I get delta time by subtracting the previous frame's time from the current time. Something like:
Happens every frame:
import time # except this
previous_time = current_time # sets the previous time before we get the new current time
current_time = time.time() # get the current time
delta_time = current_time -= previous_time # get delta time
update_physics(delta_time)
I then use the delta_time in calculating current position of objects.
This means that, even if one client has a wooden computer, from 1980, that requires a refueling of coal every 30 minutes. It will still have (in most cases) the same display as the kid down the street using his dads new super duper, high tech, state of the art, mega 2000X computer.
The point is, no matter the frame rate, the computers will have the same basic visual output.
Monday, April 4, 2011
AHHHHHH ITS WORKING@#$%@#%$^@%^!@&*&^%$#
When I realized it was working, This is how i felt
What was it that makes me feel like a kid who just got blastoise?
Funny you should ask..
I've spent all day working on my game, and at this point I can start up the server on my PC, start a client on my PC, which connects to the server. I can then move my character around and get everything displayed to the client HUD.
BUT THATS NOT ALL.
I can also start up a client on my Mac, which i then connect to my PC server,
And the best part is?
Both the PC and the MAC client each have their own character which they can move around, and each client can see the other client's characters moving around also!!!
Note: there may be a number of subliminal key things which i mentioned here, that you may have missed.
In the interest of getting the reader (you) to a point of more understanding and awe inspired gratefulness, I will list the things you may have missed, and what they mean.
1) The server is running on a PC, and I was able to connect with a Mac client.
This is great because it means my multiplayer software is cross platform. And there will be no issues with running the game from, well, pc to mac, or mac to pc. (a big plus) (thanks for this goes to twisted)
2) Each client can see the other clients characters
This took a lot lot lot of thinking on how to do. But it ended up working. Basically, the game state is sent to all of the clients, so they all see the same game. Sounds easy, but, well, whatever...
3) The Mac client connected after the PC client
This took forever to figure out how to do. Because when a new client joins, there are already tons of objects on the screen which the new client has no clue about
so when the server says: hey client! update these (insert potentially big number here) objects, move them to this position! The client says: uh, I have no clue what those are! I wasn't around when those were made!)
So I fixed this by having the server send out the entire game state when a new client connects (which I had to organize, and package into useful stuff, then unpack on the client side, and use the info to get up to the same level as the server). Again, it sounds like a matter of: Oh, just do this... But. theres a lot more to it than it sounds.
Wrap up
Yeah thats pretty much it, I guess ill note that at this point the code is 1000+ lines, which is already one seventh of the code in Color Tower Defense. And all it does is moves a character around. Wait, thats just the mentality that I was saying don't have. Cause as I mentioned, It does a lot more than just move characters around. But anyways. Without the Network code and multiplayer, this would have taken < 100 lines of code to do. Big difference.
The Future is in the FUTURE
some good news is that I have a knowledge of how to send info back and forth between the clients and server. So at this point I can focus on adding features, as in more gameplay stuff. My next goal is to make it so each character can shoot projectiles, and the other characters have to dodge them, while shooting back! It could actually be fun.
Stay tuned...
What was it that makes me feel like a kid who just got blastoise?
Funny you should ask..
I've spent all day working on my game, and at this point I can start up the server on my PC, start a client on my PC, which connects to the server. I can then move my character around and get everything displayed to the client HUD.
BUT THATS NOT ALL.
I can also start up a client on my Mac, which i then connect to my PC server,
And the best part is?
Both the PC and the MAC client each have their own character which they can move around, and each client can see the other client's characters moving around also!!!
Note: there may be a number of subliminal key things which i mentioned here, that you may have missed.
In the interest of getting the reader (you) to a point of more understanding and awe inspired gratefulness, I will list the things you may have missed, and what they mean.
1) The server is running on a PC, and I was able to connect with a Mac client.
This is great because it means my multiplayer software is cross platform. And there will be no issues with running the game from, well, pc to mac, or mac to pc. (a big plus) (thanks for this goes to twisted)
2) Each client can see the other clients characters
This took a lot lot lot of thinking on how to do. But it ended up working. Basically, the game state is sent to all of the clients, so they all see the same game. Sounds easy, but, well, whatever...
3) The Mac client connected after the PC client
This took forever to figure out how to do. Because when a new client joins, there are already tons of objects on the screen which the new client has no clue about
so when the server says: hey client! update these (insert potentially big number here) objects, move them to this position! The client says: uh, I have no clue what those are! I wasn't around when those were made!)
So I fixed this by having the server send out the entire game state when a new client connects (which I had to organize, and package into useful stuff, then unpack on the client side, and use the info to get up to the same level as the server). Again, it sounds like a matter of: Oh, just do this... But. theres a lot more to it than it sounds.
Wrap up
Yeah thats pretty much it, I guess ill note that at this point the code is 1000+ lines, which is already one seventh of the code in Color Tower Defense. And all it does is moves a character around. Wait, thats just the mentality that I was saying don't have. Cause as I mentioned, It does a lot more than just move characters around. But anyways. Without the Network code and multiplayer, this would have taken < 100 lines of code to do. Big difference.
The Future is in the FUTURE
some good news is that I have a knowledge of how to send info back and forth between the clients and server. So at this point I can focus on adding features, as in more gameplay stuff. My next goal is to make it so each character can shoot projectiles, and the other characters have to dodge them, while shooting back! It could actually be fun.
Stay tuned...
Sunday, April 3, 2011
Twisted Tutorials and Helpful Stuff..
I've been trying to get a multiplayer game working for awhile now, and during that time i have searched far and wide to find some half decent tutorials and other helpful stuff. I have talked with a lot of different people in hopes of getting some good help, and, while I have not found anything I would call really, really helpful, I have stumbled upon a few sites that have pointed me in the right direction.
Pygame Twisted Tutorial
http://ezide.com/games/writing-games.html
This guide does a great job of explaining how to use a MVC model to make games. Its really good and all, except on the part where it tries using twisted to make the game. In this aspect, its very close to garbage.
Regardless, this is the tutorial that i have been using mostly. I went through all of SJBrown's source code (the person who wrote the tutorial) desperately trying to make sense of what I was seeing. (Because he doesn't explain it very well in the tutorial) My goal was to look at his example until I knew how it worked well enough to implement it in my game. The source was nearly impossible to follow because he has the code split up into unorganized modules and other reasons (especially the parts where he is sending objects back and forth between the server and client, thats confusing). And it didn't help that he has a stupid map object that is integrated with the character's movement, or that his example game doesn't even work with multiple clients connected to the server (WHAT the HECK is that about? whats the point of using twisted if its only going to be a single player game?!?!?!) I ended up going through the source code line by line, copying it down using my own variables and values.
Its been a long process but it has finally been working. There were alot of things i had to change
(And i got mocked a few times on IRC because people would say stuff like: What? why do you need to know what that means? That code is terrible. If your doing it that way then your doing it wrong, do it this much more simple way...
To which I would reply: Oh sorry, Im just trying to follow this tutorial and thats how he's doing it. I didn't write that code.)
if SJBrown ever reads this post:
Dont get me wrong, I'm thankful for what helpful info your tutorial has taught me.
Anyways...
Game physics in a network game
http://gafferongames.com/game-physics/fix-your-timestep/
I have not got to a point in development where i will need to use this. But it is very helpful. And well written. Not specific to twisted
Crazy Russian Twisted Example
http://bytemuehle.de/Twisted%20Einführung/#grobe-struktur-eines-einfachen-twistedprogramms
This is a helpful example, very well structured and easy to see whats going on
note: it may not be russian, thats just a guess. I used google.translate to read the intro.
General Networking Development
http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
This is professionally written, and really helpful, I would recommend it to EVERYONE. Its not really talking about twisted though.
Twisted Actual Game Example
http://bazaar.launchpad.net/~game-hackers/game/trunk/files/head:/
This is a real game that is in development, It is open source. I've looked through it for a little bit, but the networking code appears tightly integrated into the rest of the game. So at this point I have not taken the time to look through it and try to understand how it works. But I have talked with one owner of this game and he was a twisted pro, he knew what he was doing.
This list Is the ones that are actually helpful. I've gone through a lot more tutorials than these. I have not really seen any ones that sort of "explain it all". But I have been able to figure out a lot using these.
Update On My Game
At this point in my game, it is possible to connect multiple clients to the server. You can then control the character on the screen using the w,a,s,d keys. The next thing i'm working on is making it so multiple characters can be controlled by different people (so every person will have their own character, and each person playing can see everyone else's characters).
I also need to think of a name for the game.
At this point its project defender. But that was sort of because I couldn't think of anything better.
Have a nice day.
Pygame Twisted Tutorial
http://ezide.com/games/writing-games.html
This guide does a great job of explaining how to use a MVC model to make games. Its really good and all, except on the part where it tries using twisted to make the game. In this aspect, its very close to garbage.
Regardless, this is the tutorial that i have been using mostly. I went through all of SJBrown's source code (the person who wrote the tutorial) desperately trying to make sense of what I was seeing. (Because he doesn't explain it very well in the tutorial) My goal was to look at his example until I knew how it worked well enough to implement it in my game. The source was nearly impossible to follow because he has the code split up into unorganized modules and other reasons (especially the parts where he is sending objects back and forth between the server and client, thats confusing). And it didn't help that he has a stupid map object that is integrated with the character's movement, or that his example game doesn't even work with multiple clients connected to the server (WHAT the HECK is that about? whats the point of using twisted if its only going to be a single player game?!?!?!) I ended up going through the source code line by line, copying it down using my own variables and values.
Its been a long process but it has finally been working. There were alot of things i had to change
(And i got mocked a few times on IRC because people would say stuff like: What? why do you need to know what that means? That code is terrible. If your doing it that way then your doing it wrong, do it this much more simple way...
To which I would reply: Oh sorry, Im just trying to follow this tutorial and thats how he's doing it. I didn't write that code.)
if SJBrown ever reads this post:
Dont get me wrong, I'm thankful for what helpful info your tutorial has taught me.
Anyways...
Game physics in a network game
http://gafferongames.com/game-physics/fix-your-timestep/
I have not got to a point in development where i will need to use this. But it is very helpful. And well written. Not specific to twisted
Crazy Russian Twisted Example
http://bytemuehle.de/Twisted%20Einführung/#grobe-struktur-eines-einfachen-twistedprogramms
This is a helpful example, very well structured and easy to see whats going on
note: it may not be russian, thats just a guess. I used google.translate to read the intro.
General Networking Development
http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
This is professionally written, and really helpful, I would recommend it to EVERYONE. Its not really talking about twisted though.
Twisted Actual Game Example
http://bazaar.launchpad.net/~game-hackers/game/trunk/files/head:/
This is a real game that is in development, It is open source. I've looked through it for a little bit, but the networking code appears tightly integrated into the rest of the game. So at this point I have not taken the time to look through it and try to understand how it works. But I have talked with one owner of this game and he was a twisted pro, he knew what he was doing.
This list Is the ones that are actually helpful. I've gone through a lot more tutorials than these. I have not really seen any ones that sort of "explain it all". But I have been able to figure out a lot using these.
Update On My Game
At this point in my game, it is possible to connect multiple clients to the server. You can then control the character on the screen using the w,a,s,d keys. The next thing i'm working on is making it so multiple characters can be controlled by different people (so every person will have their own character, and each person playing can see everyone else's characters).
I also need to think of a name for the game.
At this point its project defender. But that was sort of because I couldn't think of anything better.
Have a nice day.
Saturday, April 2, 2011
Feeding the Blog
Sorry about the not posting in awhile...
Regional Science Fair
Lets just say the Regional science fair was, uh, fun?
yeah, it was fun. It was also a lot of other things.
I would call it surprising, unexpected, and tiring.
But, yeah I won 6 awards total.
I created a new google project page for my new multiplayer game
Regional Science Fair
Lets just say the Regional science fair was, uh, fun?
yeah, it was fun. It was also a lot of other things.
I would call it surprising, unexpected, and tiring.
But, yeah I won 6 awards total.
§ BYU Central Utah Science and Engineering Fair computer science first place winner
§ 2nd place winner of the BYU CUSEF Symantec Software Scholarshop
§ Winner of the Stevens-Henager College 2011 $10,000 scholarship award
§ Winner of the BYU Dean’s Award
§ Winner of the Westminster College $4,000 scholarship award
§ Winner of the Intel Excellence in Computer Science Award
It was very fun, I got to go up on stage a bunch and do the whole bowing thing.
At one point, I was walking back to my seat (after receiving an award) and my name got called as I was about 5 feet away. So i gave my award to my dad and walked right back up. :)
My Next Game
I created a new google project page for my new multiplayer game
its code.google.com/p/projectdefender
I also set up subversion control (super confusing!) so you can browse the source code. As I have said before, I'm using Twisted for the networking. At this point, I have a decent understanding of how to send info back and forth between the client and server, The issue i'm trying to overcome at this point is just creating pygame sprite objects and controlling them using player input. Its been very frustrating, but It may just end up working.
Subscribe to:
Posts (Atom)





