aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/space_vlaze/mappings.vim
AgeCommit message (Collapse)Author
2015-10-08mappings#Initialize: Change mappings to `<nop>`Teddy Wing
Since we're handling game actions in `mappings#Listen()` now, don't call our functions from these normal mappings. The reason for not doing so is because otherwise after you get a Game Over you could still move the player around and fire missiles (although doing so wouldn't affect your score). Set these keys to `<nop>` so that they don't do their normal Vim functions so we can maximise the feeling of being in the game world versus being in a text editor. Otherwise you can move your cursor around, record macros with `q`, and I'm just not sure I want to allow all that in the game.
2015-10-08mappings#Listen: Show "Game Over" screen on `q`Teddy Wing
When pressing `q`, in addition to quitting the game also display the "Game Over" screen. Without this, when you quit the game the board would stay the same as it was just before pressing `q`. It seemed kind of confusing not to have any feedback that you quit the game so I figured I would do this to at least let you know that you successfully quit the game.
2015-10-04mappings.vim: Use ` ` instead of `<space>`Teddy Wing
Because `nr2char` gives us an actual space character instead of `<space>` as I had thought given the examples I had seen of it.
2015-10-04Add player movement (WIP)Teddy Wing
Kind of add player movement. TODO: Update player coordinates when moving * Add a main game loop to `space_vlaze#game#Init` * Fill in player directional movement functions * game.vim: Add functions to access and set `s:` variables so these can be accessed from player.vim * Add new mappings based on https://github.com/mattn/invader-vim/blob/f04e7f5e8ac42ae87db6050e64449055206c4054/plugin/invader.vim#L44-L60 because it turns out that the mappings we previously defined don't work when out main loop is running.
2015-10-04Connect in-game mappingsTeddy Wing
* Remove `<nowait>` since it isn't available in my version of Vim (7.3 2010 Aug 15, compiled Jun 20 2012 13:16:02) and breaks the mappings if it's included. * Create function stubs for all mappings * Add missing `<cr>`s to end of mappings to make them work * Initialise mappings when starting a game
2015-10-04Initial commit. Initial menu and board stateTeddy Wing
Setup layout and structure of the code. * Add a command and map to start the game * When the game is started, prompt for game start, help, or leaderboard * Create help file template (TODO) * On game start, initialise the board with spaces and a player character * Setup buffer locals on game start * Create various functions that we'll need coming up either as stubs or filled in with what they'll probably be.