blob: 5efe495cd10d248e7f36c22b94ebb5620c5f7ca6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# 2023 Lisp Game Jam Entry
## "Game"
Yeah I don't have a good name yet. I'm just playing around and trying to get characters on the screen right now.
## Dependencies
- chicken scheme (`csi`) with eggs:
- matchable
- r7rs
- srfi-18
- stty
- my ansi library, [yolk][]
[yolk]: https://git.acdw.net/yolk
## Running
Run `./game.scm` in this directory.
## License
This software is licensed under the Look At This Cool Rock I Found Public License, version 1.0. See [COPYING][] for details.
Here is a picture of the cool rock I found:
![cool rock](https://junk.acdw.net/coolrock.jpg)
[COPYING]: https://git.acdw.net/game/tree/COPYING
## Development log
### 2023-05-30
- Changed license to LATCRIFPL
- Added beginning of snake and came up with basic idea for game
I'm going to have to add threads >_< Curse you non-turn-based games!
The snake is interesting ... it's its own structure with a head thing and a list of tail things trailing behind. Each time it moves it just cuts off its tail at the length it needs to be, giving the illusion of movement. I had some complicated stuff with each segment storing its own age ... but that was a bad idea lol.
### 2023-05-29
- I've changed the basic logic from just throwing characters on the screen wherever to a vector-based approach. I thought there was a multiple-dimensional vector egg or something, but I apparently was mistaken. So I'm doing the ol' multiply-by-one-thing-and-add-another approach.
- Implementing collision detection was slightly easier than I thought it might
be.
- Figuring out the vector bounds math was tricky... lots of "off-by-one" errors. I suppose I've hit both of the main errors of computer science with this game, then.
- I encapsulated things in their own records (so far, `world`, `thing`, and `me` ... and `world` and `me` are parameterized) to keep stuff together. I think this'll work... I hope!
### .. before
I started out by writing [yolk][], which has a bunch of procedures returning strings for terminal escapes. NIH and all :)
Originally I had a big loop to just draw all the border stuff at once, then the character where I wanted it. The character would erase itself and redraw as it moved, which worked fine ... for one object.
I was walking around when I realized I'd need to redo things.
|