<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vim-space-vlaze/autoload/space_vlaze/enemy.vim, branch v0.0.2</title>
<subtitle>A space shooter game that runs in Vim</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/'/>
<entry>
<title>Play audio when player hits an enemy</title>
<updated>2015-10-08T07:59:12+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-08T07:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=e3efae83fc051284dacb5fd0ec71ef7f93a5925e'/>
<id>e3efae83fc051284dacb5fd0ec71ef7f93a5925e</id>
<content type='text'>
Generated with Cfxr.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generated with Cfxr.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add "enemy defeated" sound</title>
<updated>2015-10-08T07:47:44+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-08T07:46:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=f2ccd902a5f9534e2a8e83c65ec3875a81fefc26'/>
<id>f2ccd902a5f9534e2a8e83c65ec3875a81fefc26</id>
<content type='text'>
Generated with Cfxr. Play a sound when an enemy is destroyed.

Sounds are located in the "Resources" directory. Audio is played using
`mplayer` if available.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generated with Cfxr. Play a sound when an enemy is destroyed.

Sounds are located in the "Resources" directory. Audio is played using
`mplayer` if available.
</pre>
</div>
</content>
</entry>
<entry>
<title>Decrement player lives on collision with an enemy</title>
<updated>2015-10-07T08:48:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-07T08:48:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=3f8fc7ff1758fc9276d163026212d1cbb08d9bbf'/>
<id>3f8fc7ff1758fc9276d163026212d1cbb08d9bbf</id>
<content type='text'>
Additionally extract `IsEnemyAtCell` function that determines whether an
enemy is located at a given cell.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Additionally extract `IsEnemyAtCell` function that determines whether an
enemy is located at a given cell.
</pre>
</div>
</content>
</entry>
<entry>
<title>Increment score when enemies are destroyed</title>
<updated>2015-10-07T07:55:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-07T07:55:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=1a2cdf4bb9b233323d8d7ada63eeffffce6ebd1a'/>
<id>1a2cdf4bb9b233323d8d7ada63eeffffce6ebd1a</id>
<content type='text'>
* Create score.vim to keep track of score and group scoring-related
  functions
* Increment player score when an enemy is defeated. The point count is
  based on a base value and a multiplier. Currently set to 1 for each
  such that each enemy is always worth 1 point. The multiplier is there
  so that as time increases we can increase the multiplier and increase
  the value of an enemy the longer the player plays.
* Render score to the screen so that it's visible to players.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Create score.vim to keep track of score and group scoring-related
  functions
* Increment player score when an enemy is defeated. The point count is
  based on a base value and a multiplier. Currently set to 1 for each
  such that each enemy is always worth 1 point. The multiplier is there
  so that as time increases we can increase the multiplier and increase
  the value of an enemy the longer the player plays.
* Render score to the screen so that it's visible to players.
</pre>
</div>
</content>
</entry>
<entry>
<title>Hitting enemies with missiles makes enemies disappear</title>
<updated>2015-10-07T06:47:50+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-07T06:45:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=dd70d247ec64d68188ba28a2a25ee02de82f8d8c'/>
<id>dd70d247ec64d68188ba28a2a25ee02de82f8d8c</id>
<content type='text'>
When a missile hits an enemy, the enemy now disappears.

TODO:
* Add scoring
* Currently missiles don't stop when they hit an enemy so they'll just
  keep on killing enemies until they get to the edge of the board.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a missile hits an enemy, the enemy now disappears.

TODO:
* Add scoring
* Currently missiles don't stop when they hit an enemy so they'll just
  keep on killing enemies until they get to the edge of the board.
</pre>
</div>
</content>
</entry>
<entry>
<title>enemy.vim: Add descriptive comment to DropEnemyAtRandomCoordinates</title>
<updated>2015-10-07T06:35:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-07T06:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=8c808568f9d1087e1146d281bb3a63b543b43108'/>
<id>8c808568f9d1087e1146d281bb3a63b543b43108</id>
<content type='text'>
Explain the while loop and condition here better than the code explains
it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Explain the while loop and condition here better than the code explains
it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add enemies to board</title>
<updated>2015-10-06T03:14:42+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-10-06T03:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/vim-space-vlaze/commit/?id=d0d55b5cba2950bafe42703735c705e56f6d25b4'/>
<id>d0d55b5cba2950bafe42703735c705e56f6d25b4</id>
<content type='text'>
Add a bunch of enemies to the board. The count will depend on how long
you've been playing the game.

This currently kind of works in that it adds enemies to the board at
random coordinates and adds more as time goes on (too many actually,
I'll need to reduce the count or slow down the spawn rate).

The trouble is that it looks like it's blocking on the `system` call to
`python`. This is a problem because it freezes the board and prevents
any player movement while the Python random command is working. Let's
try using Vim's built in `:python` to do this to see if that makes any
difference.

game.vim:
  Add a `ticks` script variable that tracks clock ticks and increments
  each time our game loop executes. This will allow us to keep track of
  time in a consistent way and make it easier for us to pause time when
  we pause the game. Also, I envision it being easier to deal with
  smaller numbers starting from 0 instead of a whole Unix timestamp. Got
  the idea for ticks from Tetris.vim
  (http://www.vim.org/scripts/script.php?script_id=172)

enemy.vim:
  * Set player character to a spade (like in playing cards) because when
    it's small it could kind of look like a popcorn kernel
  * Set a min and max amount of enemies that can be on the board at any
    given time because we don't want a sparse board and we also don't
    want to overwhelm the player when they've been playing for a long
    time and the spawn count increases to an insane amount.
  * Create a function that will drop an enemy at random coordinates on
    the board not on the player's coordinates.

      TODO: we should extend this function to ensure enemies can't spawn
      within a certain radius of the player so that we don't get random
      instances of being a dick.

      TODO: also ensure that we don't place an enemy on top of another
      enemy or on top of a missile.
  * Every 5 seconds update the enemies on the board and regenerate them
    such that the enemy count is withing the min and max enemy counts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a bunch of enemies to the board. The count will depend on how long
you've been playing the game.

This currently kind of works in that it adds enemies to the board at
random coordinates and adds more as time goes on (too many actually,
I'll need to reduce the count or slow down the spawn rate).

The trouble is that it looks like it's blocking on the `system` call to
`python`. This is a problem because it freezes the board and prevents
any player movement while the Python random command is working. Let's
try using Vim's built in `:python` to do this to see if that makes any
difference.

game.vim:
  Add a `ticks` script variable that tracks clock ticks and increments
  each time our game loop executes. This will allow us to keep track of
  time in a consistent way and make it easier for us to pause time when
  we pause the game. Also, I envision it being easier to deal with
  smaller numbers starting from 0 instead of a whole Unix timestamp. Got
  the idea for ticks from Tetris.vim
  (http://www.vim.org/scripts/script.php?script_id=172)

enemy.vim:
  * Set player character to a spade (like in playing cards) because when
    it's small it could kind of look like a popcorn kernel
  * Set a min and max amount of enemies that can be on the board at any
    given time because we don't want a sparse board and we also don't
    want to overwhelm the player when they've been playing for a long
    time and the spawn count increases to an insane amount.
  * Create a function that will drop an enemy at random coordinates on
    the board not on the player's coordinates.

      TODO: we should extend this function to ensure enemies can't spawn
      within a certain radius of the player so that we don't get random
      instances of being a dick.

      TODO: also ensure that we don't place an enemy on top of another
      enemy or on top of a missile.
  * Every 5 seconds update the enemies on the board and regenerate them
    such that the enemy count is withing the min and max enemy counts.
</pre>
</div>
</content>
</entry>
</feed>
