johngrib / vim-game-code-break Goto Github PK
View Code? Open in Web Editor NEWBlock-breaking game in vim 8.0
License: MIT License
Block-breaking game in vim 8.0
License: MIT License
Hi johngrib,
You had a really neat idea, and you built it. Congrats!
Sadly, I'm getting a lot of errors when I open it with neovim 0.17
I'm getting the following errors:
Error detected while processing function VimGameCodeBreak#game#main[2]..VimGameCodeBreak#common#new:
line 4:
E117: Unknown function: funcref
E15: Invalid expression: funcref('<SID>rand')
And a lot more of Invalid expression: funcref('...')
; one for everytime funcref()
is used, I assume. At this time it was not playable. I then replaced funcref()
with function()
(see here) and now the game starts.
I still get these errors on startup:
Error detected while processing function VimGameCodeBreak#game#main[3]..<SNR>128_init[5]..VimGameCodeBreak#init#createBuffer[20]..<SNR>
131_setLocalSetting:
line 16:
E518: Unknown option: signcolumn=no
Error detected while processing function VimGameCodeBreak#game#main[15]..<SNR>128_initKeys:
line 5:
E118: Too many arguments for function: function
E15: Invalid expression: function(s:life.set, [99999])
And these when trying to get a new ball
Error detected while processing function VimGameCodeBreak#game#main[25]..<SNR>128_updateItems:
line 3:
E121: Undefined variable: ids
E116: Invalid arguments for function filter
E121: Undefined variable: ids
E116: Invalid arguments for function filter
E121: Undefined variable: ids
E116: Invalid arguments for function filter
E121: Undefined variable: ids
E116: Invalid arguments for function filter
[...]
Could you look into this? I'm looking forward to goofing off ๐
When i start the game it vertically splits my screen, where the game starts in the left pane and the original remains in the right pane. Any idea how to prevent it from doing this?
Hi!
By running :VimGameCodeBreak second split window opening instead the same bufer
I tried clean vim environment by commenting in .vimrc all except
call plug#begin()
Plug 'johngrib/vim-game-code-break'
call plug#end()
My installed version is:
pacman -Q | grep vim
gvim 8.0.1476-1
vim-runtime 8.0.1476-1
vim-spell-ru 20150901-1
Hi johngrib,
I am getting the following errors when opening vim-game-code-break with Vi IMproved 7.4:
No matching autocommands
Error detected while processing function VimGameCodeBreak#game#main[2]..VimGameCodeBreak#common#new:
line 4:
E117: Unknown function: funcref
E15: Invalid expression: funcref('rand')
line 5:
E117: Unknown function: funcref
E15: Invalid expression: funcref('drawChar')
line 6:
E117: Unknown function: funcref
E15: Invalid expression: funcref('getCharValue')
line 7:
E117: Unknown function: funcref
E15: Invalid expression: funcref('removeWord')
line 8:
E117: Unknown function: funcref
E15: Invalid expression: funcref('sleep')
line 9:
E117: Unknown function: funcref
E15: Invalid expression: funcref('prepareLine')
No matching autocommands
I'd appreciate if you could you provide a solution to this issue.
When the ball goes straight up and down, it falls into endless loop. No matter how you move the bar, it keeps going up and down. maybe add some friction on the bar? ๐
I'm seeing the following error after a while (in
):Error detected while processing function VimGameCodeBreak#game#main[25]..<SNR>204_updateItems[11]..<SNR>204_moveBall[9]..<SNR>213_update[1]..<SNR>213_pongX:
line 18:
E716: Key not present in Dictionary: hitLimitEvent()
E15: Invalid expression: self.hitLimitEvent()
echom string(self)
gives this:
{'time_check': 0, 'active': 1, 'disableGod': function('~@<80>~@^CQ219_disableGod'), 'hitWallEvent': function('~@<80>~@^CQ219_hitWallEvent'), 'create': function('~@<80>~@^CQ219_create'), 'i
temRate': 50, 'icon': 'O', 'futureX': function('~@<80>~@^CQ213_futureX'), 'hitTopEvent': function('~@<80>~@^CQ219_hitTopEvent'), 'hitCharXEvent': function('~@<80>~@^CQ219_hitCharXEvent'), 'futureY': function('~@
<80>~@^CQ213_futureY'), 'isInitialized': function('~@<80>~@^CQ213_isInitialized'), 'hitShipEvent': function('~@<80>~@^CQ219_hitShipEvent'), 'direction': {'x': -1, 'y': -1}, 'hitFloorEvent': function('~@<80>~@^CQ219_hitFloorEvent'), 'tick': function('~@<80>~@^CQ213_tick'), 'enableGod': function('~@<80>~@^CQ219_enableGod'), 'hide': function('~@<80>~@^CQ213_hide'), 'move': {'left-down': {'x': -1, 'y': 1}, 'right': {'x': 1, 'y': -1}, 'right-down': {'x': 1, 'y': 1}, 'left': {'x': -1, 'y': -1}}, 'reverseY': function('~@<80>~@^CQ213_reverseY'), 'kill': function('~@<80>~@^CQ213_kill'), 'isReady': function('~@<80>~@^CQ213_isReady'), 'doNothing': function('~@<80>~@^CQ213_doNothing'), 'interval': 50, 'hitBottomWallEvent': function('~@<80>~@^CQ219_hitBottomWallEvent'), 'reverseX': function('~@<80>~@^CQ213_reverseX'), 'show': function('~@<80>~@^CQ213_show'), 'old_x': 69, 'old_y': 82, 'tock': function('~@<80>~@^CQ213_tock'), 'roll': function('~@<80>~@^CQ213_roll'), 'x': 68, 'y': 81, 'update': function('~@<80>~@^CQ213_update'), 'pongX': function('~@<80>~@^CQ213_pongX'), 'pongY': function('~@<80>~@^CQ213_pongY'), 'hitCharYEvent': function('~@<80>~@^CQ219_hitCharYEvent'), 'common': {'removeWord': function('~@<80>~@^CQ205_removeWord'), 'sleep': function('~@<80>~@^
CQ205_sleep'), 'getCharValue': function('~@<80>~@^CQ205_getCharValue'), 'drawChar': function('~@<80>~@^CQ205_drawChar'), 'rand': function('~@<80>~@^CQ205_rand'), 'prepareLine': function('~@<80>~@^CQ205_prepareLine')}}
hi, I just read the code of this game, and I found you use a while loop to get the input from user. I think it is same as SpaceVim/SpaceVim#705, I also use a while loop to get the input from user. But I can not hide the cursor.
But I found in vim8, when run this game, the cursor is hidden.
It also happend in denite.nvim https://github.com/Shougo/denite.nvim.
wsdjeg
Thanks
I set the statusbar to 0 to don't see the statusbar but after running :VimGameCodeBreak command it makes statusline set to 2, Is there a solution?
Hi,
on regular vim modded with SpaceVim, doesn't seem to do anything.
I installed the plugin with dein#add('johngrib/vim-game-code-break')
, but at the next reboot I don't see the custom command added.
Adding the plugin to init.vim like
let g:spacevim_custom_plugins = [['johngrib/vim-game-code-break']]
and running :SPInstall doesn't do much..
Any clue?
Thanks
thanks for your game first,it is really an interesting idea that play in vim.
I noticed that we could play with two balls at the same time .
it maybe more interesting if we could play with as many as balls we want at the same time .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.