add snakego
@@ -0,0 +1,26 @@
|
||||
+++
|
||||
title = "Snake in go"
|
||||
date = 2026-09-08
|
||||
|
||||
[taxonomies]
|
||||
tags = ["go", "game", "snake", "discovery"]
|
||||
+++
|
||||
|
||||
Using the [Ebitengine](https://ebitengine.org/), I made a very ugly and simple snake game, mostly to learn a bit more
|
||||
about how game programming works, dip my toes a little bit. You can find [the code here](https://git.bricebernard.dev/Mimu/snake-game).
|
||||
|
||||
<!-- more -->
|
||||
|
||||
<img class="center" src="snake_go.gif" alt="snake go game gif"/>
|
||||
|
||||
I did this purely to see how it feels to write a game loop. That's why there is only one level, randoming a constant
|
||||
amount of points to eat. The gif above is basically the entire game.
|
||||
|
||||
The only addition is pressing the `spacebar` to go at maximum speed.
|
||||
|
||||
I didn't really learn anything in Go but it was interesting to write something completely different than the usual
|
||||
web stuff. I did enjoy it a lot and I'm looking forward to the next one, with bevy while learning rust.
|
||||
It'll be more polished, maybe.
|
||||
|
||||
If I had to point out one aspect I did not enjoy at all, it's **writing text**. It's probably because I'm coming from
|
||||
the web where this is so trivial, but what a nightmare to size and position. It's 100% a skill issue, I hope, but goddamn.
|
||||
|
After Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 521 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 18 KiB |
@@ -173,7 +173,7 @@ textarea {
|
||||
align-items: center;
|
||||
|
||||
.date {
|
||||
margin-right: 24px;
|
||||
width: 110px;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
@@ -412,6 +412,17 @@ textarea {
|
||||
font-size: 1.5rem;
|
||||
margin: 24px 0 12px;
|
||||
}
|
||||
|
||||
img {
|
||||
&.center {
|
||||
display: block;
|
||||
margin: 24px auto;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<section class="latest-writing section">
|
||||
<h1 class="subtitle">Latest writing</h1>
|
||||
{% for page in section.pages %}
|
||||
{% if loop.index <= 3 %}
|
||||
{% if loop.index <= 4 %}
|
||||
<div class="entry">
|
||||
<p class="date">{{ page.date | date(format="%d %b %Y") }}</p>
|
||||
<h3><a href="{{ page.permalink }}">{{ page.title }}</a></h3>
|
||||
|
||||