]> fortfriendship.online Git - gnargle.github.io.git/blob - projects/youbeat.html
add youbeat to projects list. clean up warnings.
[gnargle.github.io.git] / projects / youbeat.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="UTF-8" />
5 <title>Athene.Gay</title>
6 <link rel="stylesheet" href="../main.css" />
7 </head>
8 <body class="whole-site">
9 <div>
10 <iframe class="embed-title" src="../shared/title.html"> </iframe>
11 <div class="main-container">
12 <div class="main">
13 <div class="entry">
14 <a href="../index.html">Home</a>
15 <div class="title-block">
16 <a class="blog-title" href="https://github.com/gnargle/YouBeat">
17 <h3>Youbeat</h3>
18 </a>
19 <h3 class="datestamp">2022</h3>
20 </div>
21 <div class="content">
22 <p>
23 A while ago, I wanted to adapt arcade game Jubeat for home play,
24 using a device called a launchpad. So I bought one. It looks
25 like this:
26 </p>
27 <a href="../img/projects/launchpad.png">
28 <img
29 class="blog-img"
30 src="../img/projects/launchpad.png"
31 alt="a
32 product photo of the novation launchpad mini mk3. It's a
33 keyboard-like device made up of a grid of translucent RGB
34 squares."
35 />
36 </a>
37 <p>
38 Jubeat is a rhythm arcade game by Konami in their Bemani line.
39 It looks like this:
40 </p>
41 <a href="../img/projects/jubeat.png">
42 <img
43 class="blog-img"
44 src="../img/projects/jubeat.png"
45 alt="a
46 product photo of the konami's jubeat arcade cabinet. It's a
47 big box with speakers, a small wide screen, and a 4x4 grid of large buttons."
48 />
49 </a>
50 <p>
51 The grid of buttons are each separate note inputs, and the
52 screen above it actually extends below the buttons. The notes
53 for the beatmaps are shown beneath each button you need to
54 press. it looks pretty cool, but naturally it's hard to play at
55 home (ignoring that it's 'illegal' to play at home because
56 piracy, but like, who gives a fuck on that front).
57 </p>
58 <p>
59 Now, with a bit of RGB magic, you can kinda get an approximation
60 of the inputs for Jubeat on a launchpad. So... why not do that?
61 </p>
62 <p>
63 Thing is, it ended up pretty involved. Like projects tend to do.
64 First port of call was talking to the launchpad from my language
65 of choice, C#. The launchpad is controlled over MIDI, with
66 regular input messages used when you hit a button, and output
67 used to tell the launchpad what colours to light up. There's
68 also a few sysex messages for stuff like changing mode, how
69 quickly the LEDs pulse, etc.
70 </p>
71 <p>
72 As I always do, I checked Nuget and found - well, nothing. So
73 <i>then</i> I searched github and found a perfect[ish] package
74 called launchpad-dot-net, from a user called iUltimateLP.
75 Unfortunately, it didn't support my model of launchpad, only
76 earlier ones, so before I could write the game, I had to rewrite
77 the library to support my launchpad. That's right, baby! It's a
78 project within a project!
79 </p>
80 </div>
81 </div>
82 <div class="entry">
83 <div class="title-block">
84 <a
85 class="blog-title"
86 href="https://www.nuget.org/packages/launchpad-dot-net"
87 >
88 <h3>launchpad-dot-net fork</h3>
89 </a>
90 <h3 class="datestamp">2022, 2024</h3>
91 </div>
92 <div class="content">
93 <p>
94 So I bought a midi device called a launchpad - it looks like
95 this.
96 </p>
97 <p class="blog-img">
98 <i>Image removed. That's enough of that - Ed.</i>
99 </p>
100 <p>
101 OK so I've done my funny joke but honestly there wasn't much to
102 this other than adding branches in the code for the new model of
103 launchpad. The previously supported models also didn't do full
104 RGB so I added the commands to fully control the LEDs
105 specifically for the mini mk3.
106 </p>
107 <p>
108 Forking this actually turned out to be really useful for my
109 future work on <a href="dalamudplugins.html">LPHotbars</a> so
110 I'm glad I did it, and I even did my due diligence of PRing my
111 changes to the original repo. Still pending, that one. After a
112 week-ish of no response from the original dev, I packaged it up
113 to Nuget and shipped it for future use. Since the original dev
114 never stuck the library on nuget, I felt that was... ok? I did
115 worry about it at the time, but the original library is
116 abandoned, so probably fair game.
117 </p>
118 <p>
119 Then, later, as mentioned, I picked this up again for LPHotbars.
120 In the meantime, a very kind person called pstaszko had ported
121 the library to dotnet standard 2. Which was pretty damn
122 convenient, because over the course of 2024, Dalamud - the
123 modding framework for Final Fantasy XIV - started targeting
124 dotnet standard instead of some old version of dotnet framework.
125 </p>
126 <p>
127 Since I was in the code, I also added a testbed app, which
128 allowed me to discover a bug - the CC keys (all the labelled
129 keys in the image above, the ones around the edge) and the SYSEX
130 calls stopped working, so I had to fix those up.
131 </p>
132 <p>
133 I also experimented with replacing the midi library, in an
134 attempt to support linux. It wasn't successful, honestly -
135 doesn't seem like any underlying midi libraries for c# actually
136 properly support device comms on linux.
137 </p>
138 <p>
139 Going one deeper and forking an actual midi library to add this
140 support was out of scope for what I was working on and would
141 have ballooned the project, so instead I just abandoned the
142 cause. Maybe one for the future, it would be nice to offer linux
143 support for LPHotbars considering how nice XIV works on
144 Linux/Steam Deck.
145 </p>
146 <p>OK, back to the main project.</p>
147 </div>
148 </div>
149 <div class="entry">
150 <div class="title-block">
151 <a class="blog-title" href="https://github.com/gnargle/YouBeat">
152 <h3>Youbeat, again</h3>
153 </a>
154 <h3 class="datestamp">2022</h3>
155 </div>
156 <div class="content">
157 <a
158 href="https://raw.githubusercontent.com/gnargle/YouBeat/refs/heads/master/Images/youbeat_game2.jpg"
159 >
160 <img
161 class="blog-img"
162 src="https://raw.githubusercontent.com/gnargle/YouBeat/refs/heads/master/Images/youbeat_game2.jpg"
163 alt="an in-game photo of youbeat, showing the game screen and the launchpad in action.
164 buttons on the launchpad are lit with different colours to demonstrate how close a note is."
165 />
166 </a>
167 <p>
168 So once I'd rewritten the launchpad library I could actually
169 make the game. I have never really got on with game engines -
170 I'm largely a pure programmer, and my experiments with unity in
171 the past have massively frustrated me. (Unity is a fucking
172 nightmare. Has anyone else said this? JK I know they have)
173 </p>
174 <p>
175 So instead I looked for a minimal library that would do the
176 video-gamey-relevant stuff (directx instance, drawing, etc) and
177 then just get out of my way.
178 </p>
179 <p>
180 To that end, I found
181 <a href="https://github.com/kylepulver/Otter">Otter2D,</a> now
182 sadly discontinued. It was written by kyle pulver, who has
183 worked on a bunch of things you may have heard of including
184 super meat boy forever. Otter2D is exaclty what I wanted and so
185 naturally it crashed and burned to the ground like Icarus, a
186 library to perfect to exist.
187 </p>
188 <p>
189 But <i>before</i> that happened, I used it for Youbeat. And it
190 was really, really nice! Drawing stuff to the screen was a
191 one-line affair, transitions and tweens were simple to add and
192 there was reasonable variety to them, and the library itself was
193 flexible enough that I could build a game that primarily
194 functioned on an external device without it complaining.
195 </p>
196 <p>
197 This has always traditionally been my problem with game dev.
198 With otter, I could just write code, like I always do. I'm
199 pretty good at writing code, and I'm pretty rapid too. My
200 experience with engines has largely been them slowing me down
201 and getting me away from the stuff that makes most sense to me.
202 They're like wading through a bog.
203 </p>
204 <p>
205 As a result, this is the first time I've ever really
206 <i>completed</i> a game. This was admittedly helped by me not
207 really doing any level design or such, and while I did make some
208 art assets for the menus there was no extensive art necessary,
209 something I have always got stuck on. I know that's what
210 programmer art is for but my ambitions for games tend to extend
211 past prototypes and so it presents something of a psyche
212 barrier.
213 </p>
214 <p>
215 I also built a very barebones mapper! Partly so I could make my
216 own beatmaps to test the game with, but also because I firmly
217 believe that a good rhythm game always provides a mapper. The
218 rhythm games community is pretty tight-knit and thrives on the
219 free exchange of ideas and code, and so you will find that all
220 the best rhythm games either ship with a mapper or release one
221 shortly after they come out. It's extra work but it's good for
222 the health of the game!
223 </p>
224 <p>
225 I will admit that the mapper does kind of suck, though. It's a
226 horrible archaic winforms app, but it does the job. I think if I
227 wanted to dedicate more time to the project this is where I'd
228 start. Ultimately though I am a firm believer in Zack Freedman's
229 <a href="https://www.youtube.com/watch?v=L1j93RnIxEo"
230 ><i>Finish More Projects</i></a
231 >
232 mantra. When it comes to stuff you're doing for yourself, done
233 is <i>always</i> better than perfect.
234 </p>
235 <p>
236 Anyway. While it may look a bit ramshackle now to my more senior
237 eye, this project taught me a lot about designing for weird
238 hardware, a lot about how games work when you don't have an
239 engine choking you, and a few nice tidbits about nuget and such.
240 Worthwhile! And hey, if you have a launchpad, you should check
241 this and LPHotbars out. I'm really proud of both.
242 </p>
243 </div>
244 </div>
245 </div>
246 </div>
247 <iframe class="embed-links" src="../shared/links.html"> </iframe>
248 <iframe class="embed-footer" src="../shared/footer.html"> </iframe>
249 </div>
250 </body>
251 </html>