Commit Graph

761 Commits

Author SHA1 Message Date
Bryan Schumaker
b8ed069456 ocarina: User cancels manual album art
This used to cause the album art to change to the Ocarina icon.  When
the user cancels setting album art, None is returned from the selector
function.  We should check for this before trying to set the image and
return early if path is None.
2011-02-01 20:04:39 -05:00
Bryan Schumaker
7500d0d153 bump bug version 2011-01-22 10:36:38 -05:00
Bryan Schumaker
44d76c3738 web_server: Remove print statements
These have been commented out in case I need them later.
2011-01-21 23:14:34 -05:00
Bryan Schumaker
00cca8dc23 libsaria: Don't save on preference initialization
When a preference is initially created, it should be set to a default
value.  If it is set to a default value, then we don't need to save it
immediately.  Let's wait until it changes before actually doing a
save...
2011-01-21 22:14:47 -05:00
Bryan Schumaker
9c0a1ce0b2 libsaria: Don't immediately enable preference saving
We shouldn't need to save preferences during startup because at this
point only the initial values have been set.  If nothing is changed,
then nothing needs to be saved and we can save some time.  This should
also prevent any problems caused by crashing during a save.
2011-01-21 22:10:37 -05:00
Bryan Schumaker
6fecf8d6ea Merge branch 'master' into Ocarina-4.3 2011-01-21 21:53:54 -05:00
Bryan Schumaker
e030bf2eae Don't filter when there are no terms
If there are no terms to filter on, we should return a set of all items.
This will show all songs when a space has been entered into the filter
bar.
2011-01-21 21:51:44 -05:00
Bryan Schumaker
cd277837c7 Merge branch 'master' of git://lavos.homelinux.com/ocarina 2011-01-03 20:25:33 -05:00
Bryan Schumaker
c523fedb2f Remove accidental merges
For some reason I was pushing changes to my game engine into ocarina.
These changes don't belong here.
2011-01-03 20:21:00 -05:00
Bryan Schumaker
244ce91273 Merge branch 'master' of file:///home/bjschuma/public_html/git/ocarina 2011-01-03 20:17:43 -05:00
Bryan Schumaker
01ecf246e0 Merge branch 'Ocarina-4.3' of file:///home/bjschuma/public_html/git/ocarina into Ocarina-4.3 2011-01-03 20:16:11 -05:00
Bryan Schumaker
7cb13ebb97 engine: Simple font rendering
engine.font.render_text() will return a surface that can be drawn during
each game loop iteration.  Eventually, I think I want to make text a
GameObject so that it can be moved.
2011-01-03 14:45:52 -05:00
Bryan Schumaker
57c28ed07c engine: initialize font
The font init() function needs to be called before we can use a font.
2011-01-03 14:29:58 -05:00
Bryan Schumaker
82e5ecb622 engine: Added fonts
Fonts will be used to write text on the screen.
2011-01-03 14:28:06 -05:00
Bryan Schumaker
1ddb618f7b scripts: Added font information
scripts/font.py will print out information about the fonts available to
pygame.
2011-01-03 14:26:54 -05:00
Bryan Schumaker
4b7fa50eee spaceblaster: Random enemy initial position
Enemies start off at a random position based on their (min, max) (x, y)
positions.
2011-01-03 12:54:59 -05:00
Bryan Schumaker
a72cca1084 spaceblaster: Initial enemy movement
We should call the change_direction() function to randomly set initial
enemy movement, too.
2011-01-02 21:25:13 -05:00
Bryan Schumaker
ce65727273 spaceblaster: Improved enemy movement
Enemies will go in a random direction for a random amount of time
(between 1 and 3 seconds)
2011-01-02 21:22:59 -05:00
Bryan Schumaker
cf1273d0c2 spaceblaster: Moving Trilords
The Trilords will chase each other around the screen
2011-01-01 22:26:54 -05:00
Bryan Schumaker
3ea5b142a8 spaceblaster: Health is a parameter to the ArcadeShip()
By passing initial health as a parameter, I can have enemies with a
different amount of health than the CSE-1670
2011-01-01 22:07:04 -05:00
Bryan Schumaker
cd24e87212 spaceblaster: Halve damage done by beams 2011-01-01 22:06:42 -05:00
Bryan Schumaker
6cbcafa073 spaceblaster: Adjust auto-fire interval
This patch doubles the auto-fire interval so fewer shots are fired.
2011-01-01 22:05:39 -05:00
Bryan Schumaker
461f7b4604 spaceblaster: Add second Trilord
This patch adds a second stationary Trilord to the enemy list.
2011-01-01 22:04:52 -05:00
Bryan Schumaker
20cb2f371e engine: Reposition functions
These functions can set GameObjects on the edges of their boundaries or
in the middle of the boundary region.

Additionally, movement in the x or y direction should be through the
closest integer and not a float (because pygame rects only work for
integers)
2011-01-01 21:16:21 -05:00
Bryan Schumaker
b000093330 engine: Don't need to convert tiled surface
When creating a new surface, it should already be the best format for
displaying on the screen.  We don't need to keep converting it.
2011-01-01 18:57:42 -05:00
Bryan Schumaker
724cf94be5 engine: remove render_tiled
It is better to get a single tiled_image once, rather than rendering an
image tiled for every iteration.
2011-01-01 18:55:58 -05:00
Bryan Schumaker
c0c5316a46 spaceblaster: Stars with alpha layer
Only coloring in a few points should be faster than overwriting a black
background with a black background.
2011-01-01 18:54:08 -05:00
Bryan Schumaker
c16ba7b171 engine: GameObject motion time based
This should have been time based already... I wonder where this got lost
2011-01-01 18:52:50 -05:00
Bryan Schumaker
46255470e8 spaceblaster: Added stars.png 2011-01-01 17:44:16 -05:00
Bryan Schumaker
2e8ca139b2 engine: Added tiled image
The tiled image function will return a surface the size of the screen
with the given image tiled on it.
2011-01-01 17:24:21 -05:00
Bryan Schumaker
d7c8396a1d spaceblaster: Beam collisions in new loop
Checking collisions using a static collide function variable should be faster
than having to look up the collide() function every time.
2011-01-01 16:26:27 -05:00
Bryan Schumaker
d3c86528d9 spaceblaster: Enemy list
Enemies should be tracked in a list to allow for manipulations using a
for loop
2011-01-01 16:16:27 -05:00
Bryan Schumaker
9a71af230f spaceblaster: Configurable beam damage
Beams need to set the amount of damage they do on collision when the
beams are constructed.
2011-01-01 16:13:08 -05:00
Bryan Schumaker
ee9c56b434 spaceblaster: Beam collision damage
When a beam hits an enemy, I subtract 20 health from the enemy's
remaining health.  When the enemy is dead I print "Enemy dead" for
remaining hits.
2011-01-01 16:09:44 -05:00
Bryan Schumaker
ed3dde0278 engine: Remove collision print statement 2011-01-01 16:03:13 -05:00
Bryan Schumaker
27169a7413 spaceblaster: Reposition beams
The GameObject.reposition() function is used to reposition game objects
and change the rectangle correctly.  This allows for proper checks of
collisions between beams and enemies.
2011-01-01 16:01:34 -05:00
Bryan Schumaker
e019ba74d8 engine: GameObject rectangles
Each GameObject instance has a rectangle associated with it.  The
rectangle will move when the object is moved.
2011-01-01 15:49:24 -05:00
Bryan Schumaker
cd162b3200 spaceblaster: Added stationary Trilord
The stationary Trilord will be used to develop collisions, money drops,
and possibly other useful features.
2011-01-01 15:39:20 -05:00
Bryan Schumaker
8396bc0fca spaceblaster: Don't pass initial beam positions
The initial beam positions are set in the fire function based on beam
size and the ship position.  This currently isn't know when beams are
constructed.
2011-01-01 15:04:06 -05:00
Bryan Schumaker
ed52d5b57f spaceblaster: Beam spacing changes
This moves the initial starting point of all the beams to avoid an
overlap with the ship.
2011-01-01 14:57:02 -05:00
Bryan Schumaker
e28c0de821 spaceblaster: Multiple weapon levels
For now, pressing "a" will increase the weapon level and "b" will
decrease the weapon level.  There are 5 levels, with an additional beam
fired for each.
2011-01-01 12:45:51 -05:00
Bryan Schumaker
f48c723ef2 spaceblaster: Fire immediately when space bar is pressed 2010-12-31 12:09:21 -05:00
Bryan Schumaker
0aa9d1e959 spaceblaster: More timing changes 2010-12-31 12:03:35 -05:00
Bryan Schumaker
6b1095d972 spaceblaster: Timing changes
I slowed down the ship, sped up the beams, and made the beams fire less
often.
2010-12-31 11:59:47 -05:00
Bryan Schumaker
51ec26dd03 engine: Don't pass ms for event functions 2010-12-31 11:56:31 -05:00
Bryan Schumaker
b73f73f400 spaceblaster: Use a fire interval rather than key repeating
Checking when keys are pressed or released is better than using the
key_repeat abilities of pygame.  We should use this, and then wait 50 ms
between each beam.
2010-12-31 11:54:36 -05:00
Bryan Schumaker
ee59446eee spaceblaster: added beam class
I should have added this earlier...
2010-12-31 11:41:04 -05:00
Bryan Schumaker
a84cc3c8f0 spaceblaster: Removed "remaining beams" printout
This was added so I can make sure beams were being removed
2010-12-31 11:39:39 -05:00
Bryan Schumaker
4400f5dee5 engine: Custom minimum game object location
This allows me to set a minimum location either on or off screen (so
that beams fly all the way off the screen before being removed)
2010-12-31 11:37:29 -05:00
Bryan Schumaker
35cc5f09d2 spaceblaster: can fire beams
Beams are currently fired from the current location of the CSE-1670.
They are removed from the game when they are out-of-bounds
2010-12-31 11:34:39 -05:00