About this blog
for the third week of awsome
Entries in this blog
In addition to fixing a few bugs Eck mentioned, I thought I might need to re-balance the game for death to be more "Useful" However, I didn't want to make death usefull enough that you would try to die as much as possible. In the end, I decided to make 2 difficulty levels: Easy has a death penalty of only 50, the astroids are slower, and less enemies are generated in the over world, and I have "Hard" which is the original balancing. I made it so each has it's own hiscore file. I also record score collected while dead separately now, so you can quickly see if your death has been useful or not.
The compiled version still is here, Nothing is likely to change before I submit it.
Sound effects! Coins bleep, spaceships explode, transitions sis. Most of the effects are kinda lame, but the coin one is nice. I found this cool program that would generate sound effects called SFXR, and I used that one for the coin and the explosion. You just press "Random sound" until you get one you like.
I also added the turtle enemy. It is very slow and big, and takes 10 hits to kill. Considering you can do rapid-fire, that isn't really hard. They are worth a lot of coins though.
I also py2-exe built the program so people can test it. This usually takes a long time, but in last years contest, I found a tool called pygame2exe that did some of the dirty work if you had configured it properly. The compiled files are here, (just extract and run main.exe) If a few people could try it and comment on the music, the FPS, and anything else it would be nice.
The game was getting kind of boring, so I added 2 types of enemies:
Yellow ring: Faster, rotates
Red shape: Shoots at you. (You have 3 lives)
I also did some stats about how beneficial death actually is to you, and I found you usually earn 30-60 points on death, which means with the death penalty of 100 poins, you usually lose points by dying. This is a good think in my opinion, since you try not to die, but death is still usefull since it's possible to earn a few extra points during death (I got 130 once)
I also made some speed improvements, by not rotating sprites like coins and bullets that where rotationally symmetric anyway. This also saves a lot of memory, since I was caging rotated versions of sprites.
I changed the background music to a different song, that I feel fits the theme better anyways. This one is also loop-able, while the other one wasn't. This one screeeches to, but at least it's to a rithm, with some stuff played on top.
I fixed a bug where the time on the screen would count down while dead, and would snap back to the internal time when coming back alive.
I also found that the best way to get a high score is just to keep holding "Z", forward, and either right or left. This gives you 3000-4000 score depending on your luck, and almost guarantees 0 deaths. I tested this before adding the new enemies though, so hopefully a bit more skill is involved now.
and, just to be random, is a totally random section of code:
[spoiler]for i in range(self.lives):self.screen.blit(self.life_img,(size//2-65+36*i,10))textutil.drawtextcentered(self.screen, (1180,10), self.font, "0:"+str(ltime),alignment=(2,0),color=color)else:self.screen.blit(self.splash,(0,0))if self.trans:self.screen.blit(self.transsurface,(-self.transamount,0),(0,0,size//2,size))self.screen.blit(self.transsurface,(size//2+self.transamount,0),(size//2,0,size//2,size))self.transamount+=15if self.transamount>size//2:self.trans=Falsepygame.display.flip()def update(self):if not self.trans:if self.state=="splash" and time.time()>self.endtime:self.startmenu()del self.splashif self.state=="game" and self.player_immune:self.player_immune-=1for i in self.objects:if (self.state!="dead" or i not in self.enemies):i.update();if self.state!="dead":for en, bul in pygame.sprite.groupcollide(self.enemies, self.bullets, False, False, pygame.sprite.collide_circle).iteritems():[/spoiler]
I have a highscore system. It filled up the space in the main menu nicely with 13 scores, with names. They are saved in a CSV file, and can be loaded again.
I also fixed a lot of random bugs. Earlier, coins in the death stage couldn't be collected, now they are worth 10 poins, and considering how many of them there are, you will beat your death penalty with no real difficulty. I also increased the number of astroids and there speed to make it harder.
Score is now displayed when you are dead, and time also, but greyed out.
Enemies now move in a random angle, instead of a random multiple of 45.
I also added a soundtrack, and while it really matches the style, I think my speakers can't really handle it since it sometimes turns into ugly schreeching. I heard somewhere that that indicated a bitrate problem, but I don't know, I am no expert on music. If anyone knows how to fix this, a hint would be nice.
I also made some speed improvements, and I changed the death world background to a diamond shape to differentiate it. (This screenshot is just half a second to early, before the screen gets really crowded) I also teleport the player to the center of the screen on death, which gives you a bit of time from when astroids start at the edge.
I implemented the death stage, and it turned out really badly, its way to easy if you survive the first few seconds, and thats before the time I have realized I am in a special stage. The crazy number of asteroids make the game run very slow, and some objects aren't properly disabled, so you can not see normal enemies or collide with them, but I haven't disabled the collision between the enemies and the bullets during the death stage yet, making coins sometimes randomly appear when you try to shoot in the death stage. (On my to-do list) At first, you usually died right away again when becoming alive again, because you often re-spawned on top of a enemy, but now you are immune and your ship flickers for a couple of seconds when you become alive again.
In order to allow you a bit of time to orient yourself in the death world, and to highlight that there was a difference and not just a pallet swap, I made a simple transition when you die. The screen splits in 2, and the sides uncover the next stage. It looks like this:
I liked this transition so much, however, that I put it in the beginning of the menus also, and at the beginning of my end-game score chart. O, I forgot to tell you about that. Now, when the time ends, you get a screen like this:
Next thing I will do is add this to a high score list, which will be displayed on the main window. I am still thinking where to put the controls. I think I might display them at the bottom when you start the game.
I also made a change to the way coins work. Earlier, you had to collect the coins from enemies to get score, but they where kind of difficult to get, quickly flooding the level with coins, making collecting more important then shooting and making the game run slow. Now, you get half the score upon killing the enemy, and half upon collecting the coins. The coins disappear if you don't collect them in 4 seconds. This way, you can just focus on shooting stuff, and the coins provide a incentive to move around a little but, but you still need to keep shooting.
I also recorded a gameplay video:
I had a lot of homework today, so I had a bit less time to work on the game then I wanted.
The first thing youle notice is the better graphics. I am aiming for a "Radar" look, and I found the gimp "Neon" effect gives the perfect impression.
In the top right, you can see the timer. The timer counts down, and when it reaches 0, the game returns to the menu. I intend to put a highscore screen in between at a later stage.
A start has been made on the "Death" minigame. Now, when you die, the background changes to red, and if you die again it changes back. I want to make it so the normal enemies are hidden while dead, and very fast "asteroids" will fly at you from all directions, as well as a whole heap of coins.
I spend a bit of time also on making the invisible walls more visible. I am doing this by not allowing the view to scroll past the wall, making the player crash into the edge of the screen.
I also made a github: https://github.com/mousetail/WOAIII-mousetail
This morning, during my lunch break, I quickly opened my computer to check the theme. I expected the theme would be something like the last 2 years: Only really having a influence in the graphics department, any game mechanic could be translated to fit the theme. So when I found the theme of the front page, and found it was "Death is useful" I was totally surprised to find a theme that related to gameplay. It would still be possible to have a story based on this, but I feel like this theme is best explored as a gameplay feature. I was thinking about how death of your game character could be useful. First, I thought of a game where the goal is to die, but I didn't like that idea. I wanted a way where death is normally negative, but in special situations can actually have a positive impact. Then I had a idea: When the player dies, he/she loses a significant amount of score. This is sometimes good because there is a relatively very difficult mini-game where you can try to regain some of this score, and even more then you lost of you are skilled and lucky enough.
After some more thinking, I decided to make something similar to a game on yoyogames called something like geowars, which was loosely based on asteroids. In that game, you need to kill as much stuff as possible before you die. I decided to vary this a bit so death isn't bad, in my game, you need to kill as much stuff as possible withing a time limit. If you die, you lose a lot of score, and are teleported to another world with very narrow passages to fly threw, and more enemies. If you die there, you come back. Usually you will only spend a couple of seconds in the other place, considering how difficult it is, and if you spend maybe 30, you match the score you lost by dying.
I feel like it's really important to get the core gameplay in place as fast as possible. Right now, you can move around, shoot, kill enemies, and collect score. Tomorrow I will implement the time limit, and the special stage. It all depends on how much homework I get.