diff --git a/TODO b/TODO index ffd042e..625647d 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ * "sound system" (noises in landscape) +* save & load games + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? @@ -48,6 +50,7 @@ -> still an issue? -> haven't seen it in a long time (as of 31/12/2018) -> seemed to be a secondary bug from some other problem that is now fixed + -> negative: appeared again 20/06/19 -> HEISENBUGS diff --git a/TODO b/TODO index ffd042e..625647d 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ * "sound system" (noises in landscape) +* save & load games + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? @@ -48,6 +50,7 @@ -> still an issue? -> haven't seen it in a long time (as of 31/12/2018) -> seemed to be a secondary bug from some other problem that is now fixed + -> negative: appeared again 20/06/19 -> HEISENBUGS diff --git a/client/user-interface.lisp b/client/user-interface.lisp index 00e2e8b..305fd0d 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -146,12 +146,13 @@ :height height) (playerwin :position (list 0 (- width 50)) :input-blocking *framerate* :border t - :width 50 :height (halve height 'down)) + :width 50 :height (round (* 0.6 height))) + ;;:height (halve height 'down)) (placewin :input-blocking *framerate* :border t - :position (list (halve height) + :position (list (round (* 0.6 height)) (- width 50)) - :width 50 :height (halve height 'down)) + :width 50 :height (round (* height 0.4))) (newswin :input-blocking *framerate* :position (list height 0) :width width :height 1)) diff --git a/TODO b/TODO index ffd042e..625647d 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ * "sound system" (noises in landscape) +* save & load games + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? @@ -48,6 +50,7 @@ -> still an issue? -> haven't seen it in a long time (as of 31/12/2018) -> seemed to be a secondary bug from some other problem that is now fixed + -> negative: appeared again 20/06/19 -> HEISENBUGS diff --git a/client/user-interface.lisp b/client/user-interface.lisp index 00e2e8b..305fd0d 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -146,12 +146,13 @@ :height height) (playerwin :position (list 0 (- width 50)) :input-blocking *framerate* :border t - :width 50 :height (halve height 'down)) + :width 50 :height (round (* 0.6 height))) + ;;:height (halve height 'down)) (placewin :input-blocking *framerate* :border t - :position (list (halve height) + :position (list (round (* 0.6 height)) (- width 50)) - :width 50 :height (halve height 'down)) + :width 50 :height (round (* height 0.4))) (newswin :input-blocking *framerate* :position (list height 0) :width width :height 1)) diff --git a/params.lisp b/params.lisp index 3b1f3fa..e0327ad 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21899)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/TODO b/TODO index ffd042e..625647d 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ * "sound system" (noises in landscape) +* save & load games + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? @@ -48,6 +50,7 @@ -> still an issue? -> haven't seen it in a long time (as of 31/12/2018) -> seemed to be a secondary bug from some other problem that is now fixed + -> negative: appeared again 20/06/19 -> HEISENBUGS diff --git a/client/user-interface.lisp b/client/user-interface.lisp index 00e2e8b..305fd0d 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -146,12 +146,13 @@ :height height) (playerwin :position (list 0 (- width 50)) :input-blocking *framerate* :border t - :width 50 :height (halve height 'down)) + :width 50 :height (round (* 0.6 height))) + ;;:height (halve height 'down)) (placewin :input-blocking *framerate* :border t - :position (list (halve height) + :position (list (round (* 0.6 height)) (- width 50)) - :width 50 :height (halve height 'down)) + :width 50 :height (round (* height 0.4))) (newswin :input-blocking *framerate* :position (list height 0) :width width :height 1)) diff --git a/params.lisp b/params.lisp index 3b1f3fa..e0327ad 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21899)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/server/server.lisp b/server/server.lisp index 9bf2b07..ac7ff87 100644 --- a/server/server.lisp +++ b/server/server.lisp @@ -292,12 +292,15 @@ (.xp p) (.level p)) (format NIL "~%~%Strength: ~S Dexterity: ~S~%Intelligence: ~S" (.strength p) (.dex p) (.int p)) - (format NIL "~%~%Hunger: ~S~%Carried items: ~S~%Holding: ~A" + (format NIL "~%~%Hunger: ~S~%~%INVENTORY~%~%Holding: ~A~%" (.hunger p) - (length (remove-if #'(lambda (x) (or (null (first x)) - (zerop (second x)))) - (.inventory p))) ;;XXX Show all slots? - (if (.tool p) (.name (.tool p)) ""))))) + (if (.tool p) (.name (.tool p)) "")) + (string-from-list + (loop for i in (.inventory p) + count i into n + collect (format NIL "~%~S) ~A (~S)" + n (if (first i) (.name (first i)) " - ") + (second i))))))) (defun move-player (dir) "Move a player in the given direction" diff --git a/TODO b/TODO index ffd042e..625647d 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ * "sound system" (noises in landscape) +* save & load games + * generate secondary seeds to smoothen landscape * split `naledi-ya-africa` package into `naledi-server` and `naledi-client`? @@ -48,6 +50,7 @@ -> still an issue? -> haven't seen it in a long time (as of 31/12/2018) -> seemed to be a secondary bug from some other problem that is now fixed + -> negative: appeared again 20/06/19 -> HEISENBUGS diff --git a/client/user-interface.lisp b/client/user-interface.lisp index 00e2e8b..305fd0d 100644 --- a/client/user-interface.lisp +++ b/client/user-interface.lisp @@ -146,12 +146,13 @@ :height height) (playerwin :position (list 0 (- width 50)) :input-blocking *framerate* :border t - :width 50 :height (halve height 'down)) + :width 50 :height (round (* 0.6 height))) + ;;:height (halve height 'down)) (placewin :input-blocking *framerate* :border t - :position (list (halve height) + :position (list (round (* 0.6 height)) (- width 50)) - :width 50 :height (halve height 'down)) + :width 50 :height (round (* height 0.4))) (newswin :input-blocking *framerate* :position (list height 0) :width width :height 1)) diff --git a/params.lisp b/params.lisp index 3b1f3fa..e0327ad 100644 --- a/params.lisp +++ b/params.lisp @@ -28,7 +28,7 @@ (defparameter *framerate* 1000) ;;Localhost defaults -(defparameter *defaulthost* '("127.0.0.1" 21895)) ;default port: 21895 +(defparameter *defaulthost* '("127.0.0.1" 21899)) ;default port: 21895 ;;Host server address to connect to - XXX global variable! (defparameter *host* (first *defaulthost*)) diff --git a/server/server.lisp b/server/server.lisp index 9bf2b07..ac7ff87 100644 --- a/server/server.lisp +++ b/server/server.lisp @@ -292,12 +292,15 @@ (.xp p) (.level p)) (format NIL "~%~%Strength: ~S Dexterity: ~S~%Intelligence: ~S" (.strength p) (.dex p) (.int p)) - (format NIL "~%~%Hunger: ~S~%Carried items: ~S~%Holding: ~A" + (format NIL "~%~%Hunger: ~S~%~%INVENTORY~%~%Holding: ~A~%" (.hunger p) - (length (remove-if #'(lambda (x) (or (null (first x)) - (zerop (second x)))) - (.inventory p))) ;;XXX Show all slots? - (if (.tool p) (.name (.tool p)) ""))))) + (if (.tool p) (.name (.tool p)) "")) + (string-from-list + (loop for i in (.inventory p) + count i into n + collect (format NIL "~%~S) ~A (~S)" + n (if (first i) (.name (first i)) " - ") + (second i))))))) (defun move-player (dir) "Move a player in the given direction" diff --git a/server/world.lisp b/server/world.lisp index 786c040..dd3cfe7 100644 --- a/server/world.lisp +++ b/server/world.lisp @@ -143,6 +143,7 @@ (let* ((wsize (world-size)) (seeds NIL) (nseeds (round (/ wsize size-factor))) (biomes (remove-first-if + ;;FIXME very occasionally creates lakes? #'(lambda (e) (eq e 'stream)) (available-biomes)))) ;;Initialize a set of biome 'seed' coordinates