Apprentice wizard (みならいまほうつかい)

B+A is reest all shapes. It is the only way to erasing shapes.

Drawing magical circles is very sensitive work, you can’t undo only one shape. :wink:



You could probably remove the last shape pretty easily (however, I haven’t seen the code so maybe it isn’t)!


This would be so good with particle effects! :fireworks: … maybe even some camera shake for added power (~ Dr. Strange) !

Something like the particle effect in Unicorn Dash - when you get the Star power-up. :star_struck:


It seems be good.
But there are few space in Flash.
I must reduce code size.


Release v1.1


  • update latest libraries
  • change mode name: Practice to Sketch
  • reset cursor mode in the begining of Arcade mode

Thanks for the new release. I’ve been playing around a bit more and sent your some GitHub PR’s to review :wink:
Please could you also consider:

  • Sound - There’s no way to toggle on/off without using an external program. My game was muted due to my EEPROM setting. I think the sound adds a nice element.
  • Why have an Up and Down triangle… AFAIK they are equivalent and adds more code. (Also want to change shapes a little quicker for the time trial!).
  • The flashing menu cursor and in game drawing is quite distracting. The strobing is less if you set an in-game frame rate of 60fps… but I worry that will unnecessarily use more CPU and shorten battery life. Ideally you try different refresh patterns: blank 1 frame, then keep the image 2 or 3 frames?

In terms of game size, I’m impressed you are including two large font sets and using a lot of floating point maths! It may be worth trying the smaller ArudboyBeep library (by @MLXXXp) and there’s also the fixed point math library (by @Pharap) …?

Many thanks!

1 Like

Or maybe make it a slow flash, using everyXFrames() or something similar.

1 Like

Can’t you use the boot sequence :slight_smile:

Audio mute control

Pressing and holding the B button when powering on will enter System Control mode. The RGB LED will light blue (red for an incorrect LED) to indicate that you are in system control mode. You must continue to hold the B button to remain in this mode. The only system control function currently implemented is audio mute control .

Pressing the UP button (while still holding B ) will set a flag in system EEPROM indicating audio enabled . The RGB LED will flash green once (off for an incorrect LED) to indicate this action.

Pressing the DOWN button (while still holding B ) will set the flag to audio disabled (muted). The RGB LED will flash red once (blue for an incorrect LED) to indicate this action.

Releasing the B button will exit system control mode and the sketch will continue.


My thoughs on the PRs…

Rather than putting misaki_font.h et al in a src folder I think it would make more sense to move it into the same folder as the game, or possibly within a font folder in that folder.
E.g. apprentice-wizard/font/misaki_font_f0.h or apprentice-wizard/misaki_font_f0.h

I’m not 100% sure but I think putting it in a src folder might upset Platformio, whereas lumping it with the actual code is likely to work on both systems.

  • Changing char to int8_t makes sense because char's sign is unspecified so it should really never be used for arithmetic.
  • Changing double to float may be useful from a portability standpoint, though it doesn’t really add much here because (as you say) double and float are identical on AVR.
  • Changing int to uint8_t when possible is always good move.

I’m going to leave these here for reference:

Note that I’m referring to the C version for the fixed width types because Arduino uses the C standard library rather than the C++ library despite the actual language being C++.

I agree with @filmote that ‘TIP’, while saving memory, doesn’t make much sense either.

The Japanese version uses 操作方法, which means “user guide”, “how to operate” or “operation procedures”, which does more or less equate to how the term “instructions” are used in English.

In absence of a better suggestion, @filmote’s suggestion of “Lesson” makes sense in the context of the game.
(My favourite Japanese dictionary reports that “Lesson” is “授業” in Japanese. Among the other translations there’s also レッスン, but that feels like cheating. :P)

In regard to practice/freestyle, the Japanese translation uses お絵かき, which means “drawing”, “sketching” or “doodling”, so once again “sketch” does more or less match the original.

“Doodle” would probably have a better nuance if the intent is to stay faithful to what the JP version says,
but “practice” would probably make the most sense.

(If I’m honest, “freestyle” just makes me think of skateboards, grafitti and hip hop.)

Using fixed points might be be a good option,
though the sin and cos tables would need to be precalculated,
and that would probably also mean using brads as the angle unit.

By using brads (the 0 to 255 kind) you can fit angles in a single byte and rely on the implicit modular arithmetic to cause 256 to be reduced to 0.

(Note: signed integer overflow is undefined behaviour, but unsigned integers are mandated by the standard to implement modular arithmetic, so unsigned brads are safe and portable, whereas signed brads aren’t.)

Degrees are also an option, though that means you have to manually reduce 360 to 0 and the values no longer fit in a single byte.

(Radians might be possible, but rather you than me. :P)


@inajob, I’m not sure how to ask this in Japanese…
Would you like me to make some memory saving PRs?

I have already found a very simple way to save 780 bytes of progmem and 26 bytes of RAM.

1 Like

Great little game, very addicting. But im stuck at level 7 on arcade mode, i cant figure out how to make the pentagram at the top of the screen. Any tips?

1 Like

This is not pentagram but hexagram. You already made hexagram at stage 6.


It seems to be equal but… when you move up or down you need both shapes.

1 Like

OOops i just saw what i was doing wrong, i somehow didnt notice there was 2 different triangles to select from lol. I was making the hexagram by flipping the same triangle around lol. I feel a bit foolish now.




I know some other ways to save memory,
but I will wait for the other PRs to be merged.

1 Like

I have another saving that brings the size down to 81%:

Sketch uses 23468 bytes (81%) of program storage space. Maximum is 28672 bytes.
Global variables use 1750 bytes (68%) of dynamic memory, leaving 810 bytes for local variables. Maximum is 2560 bytes.

But I’m going to wait until the other PRs are merged before I make a new one.

1 Like

I wrongly did this based on a distant memory of some discussion with @MLXXXp (Link: Using /src folder)… I’m gonna blame @filmote :stuck_out_tongue_winking_eye:
Will fix the PR.

Yes. More homemade kits are playing with SAMD /ESP32, etc. Doesn’t hurt to be specific.Thanks for reviewing.

Wasn’t done for memory, just language! I also prefer ‘Lesson’ and have changed PR.

Yeah… it was ‘Practice’ and I suggested ‘Sketch’. (The JP was also changed). As I’ve played the game, I think it’s more fun to avoid thinking of it as a simple drawing game and to emphasise something creative/ magical. That’s why I don’t like my original idea of ‘Sketch’. I wanted ‘Free-form’ to suggest something unlimited and expressive but ‘Freestyle’ is more common in gaming… Perhaps ‘Create’? Will leave it for @inajob to decide.

PS - Is it better to discuss these points on the PR’s to keep the forum thread cleaner?

1 Like

The /src folder is a thing! But not for .h files.

1 Like

But anything in a src folder won’t be visible or editable in the Arduino IDE.

Pretty sure we have covered this a few times now. Anyone still using the Arduino IDE should have a good, hard look at themselves :slight_smile:

1 Like