]>
git.gir.st - VIper.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
girst [Sat, 2 Feb 2019 16:49:43 +0000 (17:49 +0100)]
rename to 'viper', new makefile
girst [Sat, 26 Jan 2019 18:45:45 +0000 (19:45 +0100)]
implement SIGTSTP handling
girst [Sat, 5 Jan 2019 18:12:39 +0000 (19:12 +0100)]
fix raw mode bug
doesn't apply to this application, but was fixed in minesviiper
girst [Mon, 5 Nov 2018 14:36:12 +0000 (15:36 +0100)]
use correct longjmp buffer
so clang on freebsd doesn't emit a warning
girst [Mon, 5 Nov 2018 14:35:08 +0000 (15:35 +0100)]
minor cleanup
from the 4th of september, never committed
girst [Mon, 3 Sep 2018 17:09:32 +0000 (19:09 +0200)]
increase freeze steps, remove debug/test code
girst [Mon, 3 Sep 2018 17:02:15 +0000 (19:02 +0200)]
time freeze bonus
girst [Mon, 3 Sep 2018 13:39:14 +0000 (15:39 +0200)]
more food items
girst [Mon, 3 Sep 2018 13:26:49 +0000 (15:26 +0200)]
remove vt220 support, II
girst [Mon, 3 Sep 2018 13:24:58 +0000 (15:24 +0200)]
remove vt220 support
too much hassle, not enough bandwidth
girst [Mon, 3 Sep 2018 13:01:36 +0000 (15:01 +0200)]
readme: formatting
girst [Mon, 3 Sep 2018 13:00:08 +0000 (15:00 +0200)]
readme: new todo
girst [Mon, 3 Sep 2018 12:57:11 +0000 (14:57 +0200)]
cleanup wrapmode, fix bonus interval
when consuming an item, set the time of next bonus then (instead of just
when spawning). at spawn time we also factor in the time a bonus might
be alive (can be shortened by eating it).
bonus actions (i.e. wraparound) is now a bitmap. thus, more than 1
action might be active at the same time.
girst [Mon, 3 Sep 2018 08:37:32 +0000 (10:37 +0200)]
longhelp: add -l
girst [Mon, 3 Sep 2018 07:53:04 +0000 (09:53 +0200)]
wrap-around-mode (needs cleanup)
girst [Fri, 31 Aug 2018 21:42:21 +0000 (23:42 +0200)]
refactor pause screen; todos, readme updated
girst [Fri, 31 Aug 2018 20:57:33 +0000 (22:57 +0200)]
fix: snake speed bug
originally, I noticed the snake speeding up when eating a BONUS_SLOW,
suspecting a bug there. as i found out a after way too long, i forgot to
restart the timer after routinely incrementing the velocity every 100
points. m(
however, a nice routine for debugging this was the following at the end
of the draw_sprites():
#include<sys/timeb.h>
struct timeb __now_time__;
ftime(&__now_time__);
long __time__ = __now_time__.time*1000+__now_time__.millitm;
static long __last_time__ = 0;
if(__last_time__) printf ("->%f (%ld)<-", g.v, __time__-__last_time__);
__last_time__ = __time__;
girst [Fri, 13 Jul 2018 17:55:14 +0000 (19:55 +0200)]
escape bonus items in ASCII mode
girst [Fri, 6 Jul 2018 13:56:30 +0000 (15:56 +0200)]
new todo (vt220 softcharset), strike through done
girst [Fri, 6 Jul 2018 13:39:57 +0000 (15:39 +0200)]
note about dejavu mono braille chars
girst [Fri, 6 Jul 2018 13:32:06 +0000 (15:32 +0200)]
readme: small blurb about dependencies, todo item->done
girst [Fri, 6 Jul 2018 13:25:57 +0000 (15:25 +0200)]
bonus timeouts (incl. warning)
girst [Thu, 24 May 2018 22:37:23 +0000 (00:37 +0200)]
`-pedantic' fixes
girst [Thu, 24 May 2018 21:18:44 +0000 (23:18 +0200)]
fix memory leak
girst [Thu, 24 May 2018 20:41:31 +0000 (22:41 +0200)]
Bonus items: shorten/elongate snake, speed up/down
girst [Thu, 24 May 2018 14:57:58 +0000 (16:57 +0200)]
BONUS item: snip (Proof of Concept stage)
girst [Thu, 24 May 2018 14:25:49 +0000 (16:25 +0200)]
clear keyboard buffer on game over
to test: start with -l50, then stairstep into yourself. on restart,
snake must not continue stairstepping.
girst [Thu, 24 May 2018 10:26:05 +0000 (12:26 +0200)]
speed up every 100 points
girst [Thu, 24 May 2018 10:13:34 +0000 (12:13 +0200)]
append_snake(-1,-1) redraw fix
girst [Thu, 24 May 2018 09:59:12 +0000 (11:59 +0200)]
`-l`: set initial snake length; better init_snake meandering
girst [Thu, 24 May 2018 08:58:50 +0000 (10:58 +0200)]
end game when no more free spaces to go
also: end screen message configurable
girst [Tue, 22 May 2018 13:19:09 +0000 (15:19 +0200)]
s/op.scheme/op.sch/g
girst [Tue, 22 May 2018 13:08:40 +0000 (15:08 +0200)]
nice end screen
girst [Tue, 22 May 2018 12:46:28 +0000 (14:46 +0200)]
^Z bug: proper fix
the shell unsets raw_mode, so we need to set it again and also redraw
the field.
girst [Tue, 22 May 2018 12:41:09 +0000 (14:41 +0200)]
game loop (restartable), fix memory leak
if we set respawn, we need to break out of the loop, otherwise `i' gets
->next'ed until i == NULL. then, spawn_item() will malloc() a new item,
and `i' was not freed(), but just NULL'd.
girst [Tue, 22 May 2018 09:38:24 +0000 (11:38 +0200)]
README: konsole setup
girst [Sun, 20 May 2018 20:13:58 +0000 (22:13 +0200)]
fix -d maxwidth
girst [Sun, 20 May 2018 18:07:53 +0000 (20:07 +0200)]
fix food-appears-in-heads-old-location bug
girst [Sun, 20 May 2018 17:00:39 +0000 (19:00 +0200)]
proof of concept for ^Z bug
girst [Sun, 20 May 2018 17:00:28 +0000 (19:00 +0200)]
README: update TODOs
girst [Sun, 20 May 2018 08:09:33 +0000 (10:09 +0200)]
fix width-off-by-one-column bug
girst [Sun, 20 May 2018 07:57:32 +0000 (09:57 +0200)]
simplify direction buffer access
girst [Sun, 20 May 2018 07:31:50 +0000 (09:31 +0200)]
use ring buffer for movement, minor cleanup
(saves on malloc() for every keypress)
girst [Sun, 20 May 2018 06:23:55 +0000 (08:23 +0200)]
don't truncate snake on small fields, fix unpause graphics glitch
girst [Sat, 19 May 2018 23:53:10 +0000 (01:53 +0200)]
WIP: only redraw changed bits
girst [Sat, 19 May 2018 23:35:39 +0000 (01:35 +0200)]
reuse memory when consuming and re-spawning item
girst [Sat, 19 May 2018 23:18:42 +0000 (01:18 +0200)]
minor in-code cleanup, documentation
i wanted to remove the 'only draw diff'-todo and looked into where i was
calling show_playfield(). i didn't call it anywhere where i expected it,
so i fired up gdb. gdb told me show_playfield() gets called from the
input loop after the switch(getchar()). i was puzzled about that,
because it fired even when no keys were pressed. then i noticed that
everytime the signal handler fires, a STX (ASCII 0x02) gets pushed onto
stdin. WHO FIGURES?! i was unable to find anything in the
documentation of sigaction or on the internet that indicates this!
girst [Sat, 19 May 2018 21:57:45 +0000 (23:57 +0200)]
simple pause mode
`p' to pause; then `q' to exit, any other key to unpause
girst [Sat, 19 May 2018 07:30:05 +0000 (09:30 +0200)]
dec charset, print cleanup, command line args, ...
girst [Sat, 19 May 2018 06:13:21 +0000 (08:13 +0200)]
fix segfault when eating food
girst [Sat, 19 May 2018 03:10:24 +0000 (05:10 +0200)]
found segfault (yay! :/ )
girst [Sat, 19 May 2018 02:59:06 +0000 (04:59 +0200)]
longjmp proof-of-concept; set name for velocity
(also delete some emojis that are not dispayed in cjk-fullwidth)
girst [Fri, 18 May 2018 23:54:44 +0000 (01:54 +0200)]
even worse coloring hack
girst [Fri, 18 May 2018 23:40:18 +0000 (01:40 +0200)]
update readme TODOs
girst [Fri, 18 May 2018 23:30:37 +0000 (01:30 +0200)]
linked list code cleanup
girst [Fri, 18 May 2018 22:47:39 +0000 (00:47 +0200)]
clean up append_movement to not add same direction twice
girst [Fri, 18 May 2018 21:39:27 +0000 (23:39 +0200)]
emoji list
girst [Fri, 18 May 2018 21:30:32 +0000 (23:30 +0200)]
fix fast 180° turns (queue all directional keystrokes)
girst [Fri, 18 May 2018 00:15:00 +0000 (02:15 +0200)]
green snek (dirty (temporary) hack)
girst [Fri, 18 May 2018 00:07:38 +0000 (02:07 +0200)]
experiment with snake speeds (very ugly)
girst [Thu, 17 May 2018 23:27:56 +0000 (01:27 +0200)]
different food values
girst [Thu, 17 May 2018 23:08:11 +0000 (01:08 +0200)]
move enums, struct defs, etc into header file
girst [Thu, 17 May 2018 22:36:21 +0000 (00:36 +0200)]
schemes into .h
girst [Thu, 17 May 2018 21:41:04 +0000 (23:41 +0200)]
initial (proof-of-concept-y) code