Commit Graph

71 Commits (3122eb76b3d572dfa5ca50fcc0a6acb5561629d8)

Author SHA1 Message Date
James Hogan 3122eb76b3
Add cube 64
Add a cube arrangement of 64, based on a brief image in Numberblocks
episode "Square on the Moon".

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 09:43:23 +00:00
James Hogan aede80135d
Tidy cube 9
Sort cube 9 slightly better so that top slice is first in code.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 09:43:23 +00:00
James Hogan eaf65d7445
Add irregular 80 arrangements
Add several irregular arrangements of 80:
 - Roboctoblock (both standing and squatting) from Numberblocks episode
   "Sixty's High Score".
 - Spidoctoblock from Numberblocks episode "Heroes With Zeroes".
 - Dinoctoblock from Numberblocks episode "Sixty's High Score".

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan f2d5aead3b
Add irregular calendar 31 arrangement
Add an irregular arrangement of 31 in the shape of a calendar, based on
Numberblocks episode "Figure It Out".

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan 871da0d07a
Add irregular monster 19 arrangement
Add an irregular arrangement of 19, in the shape of a monster from
Numberblocks episode "Nineteen".

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan 98607b381a
Add 144 square arrangement
Add an original square arrangement for 144, with 4 in the middle, 4 tens
layed out around it like so:

  A    B
 AAAABBBB
  AAABBB
  AA  BB
  CC  DD
  CCCDDD
 CCCCDDDD
  C    D

And the remaining 100 filling out the rest of the square.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan 19bb559ce6
Add triangle & irregular rocket 55 arrangements
From Numberblocks episode "One Giant Step Squad", add triangle and
rocket arrangements of 55.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan bdf39dc5cd
Add triangle 45 arrangement
Based on the character from Numberblocks episode "Sky High Fives" add a
triangle 45 arrangement.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan 56a76f17ae
Add irregular 13 and 17 arrangements
Based on Numberblock characters, add 13 and 17 irregular arrangements.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:41:29 +00:00
James Hogan 171724bb45
Support irregular shapes
Add support for explicit layouts of irregular non-rectangular shapes.
Note the floating number placement algorithm is unchanged, which may
result in wrong placement.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:40:57 +00:00
James Hogan 1c0b65401c
Add triangle 36 arrangement
From Numberblocks episode "Four on the Floor", add triangle arrangement
of Numberblock 36.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-18 08:07:14 +00:00
James Hogan e037b5c4f0
Add rectangle 32=4x8 upright arrangement
Based on the Numberblocks episode "Figure it out", add an arrangement
for 32 (4 across, 8 high), with 2 2x5 10s at the bottom, and 2 in the
middle at the top.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-16 18:46:35 +00:00
James Hogan 91809d6e66
Update square 81 arrangement
Update the square 81 arrangement to match Numberblock 81, as seen in the
Numberblocks episode "Square on the Moon".

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-16 18:08:18 +00:00
James Hogan 275a036697
Add square 121 arrangement
Add a custom arrangement for 11x11 square, with 1 in the middle, 10
around it in the following pattern:

 XX XX
 XXXXX
  X X
 XXXXX
 XX XX

And 100 filling out the rest of the square.

Signed-off-by: James Hogan <james@albanarts.com>
2021-11-16 18:08:18 +00:00
James Hogan cffbf565d9
Bump version to 0.3
Changes since 0.2:
 * Fix for F-Droid Minetest (with Lua < 5.2)
 * Add square arrangements 25-81
 * Darken sides of 40, 50, 90, and all the hundreds blocks
 * Basic support for numbers 1000-10000

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-13 14:01:44 +01:00
James Hogan 22620eb187
Support numbers 1000 to 10000
Add support for numbers 1000 to 10000. Numbers 1000-9000 look like the
numbers 1-9 but are defined separately as they group together. Number
10000 is a special case for now, which looks like 10 but grouped into
1000s.

This is only of practical value when combined with worldedit! It
probably isn't worth going beyond 10000 without some optimisation to
make sure it doesn't cause excessive lag on slow machines.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-13 13:54:53 +01:00
James Hogan da8f147771
Darken sides of 90 and 900 blocks
Emphasise the sides of the 3 shades of 90s blocks (which weren't darker
than the front) and the 3 shades of 900s blocks (which were only a bit
darker than the front).

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-13 13:14:10 +01:00
James Hogan f191c2db3b
Darken sides of 40, 50 & hundreds blocks
It looks far better to have darkened sides of all 10s (40 and 50 were
missed) and hundreds blocks, as it makes the borders around the
groupings stand out from an angle.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-13 09:32:54 +01:00
James Hogan 54ae50967c
Add square 81 arrangement
Add an arrangement for square 9x9=81, based on our own design. It has
the 1 in the center, with 8 triangles of 10 in a rotationally
symmetrical pattern a bit like a pinwheel.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-12 11:07:23 +01:00
James Hogan 590c5119b7
Add square arrangements 25-64
Based on the Numberblocks episode More to Explore, add arrangements for
the squares 25 to 64.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-12 08:32:35 +01:00
James Hogan 411e05f45b
Avoid using Lua 5.2 specific goto statements
The use of Lua 5.2 features such as goto don't work on older builds such
as the rather out of date Minetest 5.2.0.26 in F-Droid (added
15/06/2020), presumably due to the use of Lua 5.1.

In this case it was completely unnecessary as Lua 5.1 supports a break
statement, so use that instead.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-12 08:32:35 +01:00
James Hogan ab4a4322da
README.md: Add links
Add links to ContentDB (including shields), forum topic, and format with
existing links in a list.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-11 19:53:10 +01:00
James Hogan ae68a99e71
Release 0.2
Changes since 0.1:
 * Basic support for numbers 100-999
 * Stop overlap of 10 blocks
 * Several internal code cleanups

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-11 06:59:15 +01:00
James Hogan 76912abc3d
Reimplement numeracy_ordered_pairs()
I can't find a clear license for the sample code on the lua-users.org
wiki, so reimplement numeracy_ordered_pairs() from scratch.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-10 15:07:21 +01:00
James Hogan c3abf9ff68
Cleanup ten/hundred blocks
Currently ten and hundred blocks extend slightly beyond the block in
order to achieve the bordered effect. Unfortunately this doesn't work
well when neighbouring blocks are different colours as they flicker due
to depth buffering.

Therefore reduce the dimentions to fit within the block, and add fixed
and connected node boxes so that the insides aren't visible (and also
this should allow versions prior to 5.0.0 to show something for these
blocks).

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-06 16:57:16 +01:00
James Hogan 44c87548eb
Add CHANGELOG.md
Add a CHANGELOG.md for recording what has changed in a user-friendly
format.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-06 16:29:07 +01:00
James Hogan c6901c494c
Clean up function names and make more local
Clean up public function names with numeracy_ prefix, and make more
variables / functions local.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-06 16:29:07 +01:00
James Hogan f6ba2f83fe
Support numbers 100 to 999
Add support for groups of blocks up to 999. New nodes are defined for
groups of 100 blocks, similar to 10s but with colours encoded in param2
using 3 separate palettes (4 groups per palette, since each group of 100
is checkered with light and dark).

Also add multipart number nodes support, including improved finding of
number nodes and determination of which set of blocks each belongs to
(using 2 upper bits of param2 to encode the direction the number is
extended from the central block).

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-06 16:24:45 +01:00
James Hogan 2d901c9fed
README: Note no dependencies
Actually maybe its best to mention explicitly that there aren't any
dependencies at the moment.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 16:25:10 +01:00
James Hogan 00ddf64cef
Drop default dependency
We don't actually depend on default, so drop it from the dependency
list.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 16:20:17 +01:00
James Hogan 236defa328
Rearrange cubic 27 slightly
Put the mid level rear edges in different groups of 10 to maintain the
"2 edges on face in different groups" pattern.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 15:56:02 +01:00
James Hogan e1b2c0c712
Don't allow numbers to replace other nodes
Don't allow the numbers above blocks to replace other nodes, and ignore
blocks with nodes above them when calculating the best place to put the
number.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 15:54:15 +01:00
James Hogan a6c0d3b67c
Make numbers unpointable and unwalkable
Make numbers unpointable so their node box can't be seen, and unwalkable
so they can't be collided with (which eliminates the need for an empty
collision box).

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 15:52:45 +01:00
James Hogan 3d645336ec
Make numeracy:block red in inventory
Give numeracy:block a red colour in the inventory, since it is
effectively a single block.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 15:50:20 +01:00
James Hogan 8d9bde5594
Whitespace cleanup
Cleanup whitespace of update.lua.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 09:32:04 +01:00
James Hogan b4eff4b793
Rotate cube special cases
Rotate cube special case arrangements to face the player and match the
the number.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 09:32:04 +01:00
James Hogan fa8ad2a24e
Fix horizontal 1D rotation
I forgot to regenerate facedir from the adjusted doer direction for 1
dimentional horizontal block arrangements.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 09:32:04 +01:00
James Hogan 5d86bbd2a5
Allow nodes to point in different directions
Switch relevant nodes to facedir and turn to face player.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 00:13:48 +01:00
James Hogan fb21bb5718
blocks: Switch to alternate tens shape
Use slightly different 10s shape that exceeds block size but improves
borders slightly.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-04 00:13:48 +01:00
James Hogan df01976bc4
numbers: Add missing use_texture_alpha=clip
Fix warnings about missing use_texture_alpha on number nodes:

  WARNING[Main]: Texture "numeracy_blank.png" of numeracy:number_centre_1 has transparency, assuming use_texture_alpha = "clip".
  ...

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 21:56:19 +01:00
James Hogan 088bbbffab
Add missing sum_pos declaration
Fix warning due to missing sum_pos declaration (it got lost during a
confused fixup after a mispelling):

  WARNING[Server]: Assignment to undeclared global "sum_pos" inside a function at update.lua:559.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 21:45:29 +01:00
James Hogan cff283f1f2
README: Drop renaming of folder
We have a mod.conf now so there's no need to suggest renaming the
folder.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 21:44:32 +01:00
James Hogan a49f697a7f
Add reduced JPEG screenshot for README
Add a reduced file size JPEG version of screenshot.png for use by the
README, since PNG files tend to be significantly larger.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 21:32:49 +01:00
James Hogan 47eeb77119
README.md: Add newline to separate version from license
Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 18:42:05 +01:00
James Hogan 7aef8a727d
Update screenshot.png
Update screenshot with numbers 1 to 16.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 18:40:41 +01:00
James Hogan 1b66f47323
Add screenshot to README.md
Add the existing screenshot to the README.md

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 18:24:58 +01:00
James Hogan 0a67b8548d
Switch README to markdown
So it gets nicely formatted on github.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 18:22:57 +01:00
James Hogan b4641d4c40
LICENSE.txt: Tweak attribution
This is more correct.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 18:15:51 +01:00
James Hogan 935979a978
Replace depends.txt/description.txt with mod.conf
Apparently the former are deprecated. Tweak description a little too to
keep first sentence under 100 characters.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 18:14:36 +01:00
James Hogan d9a0d589ec
Add README.txt and description.txt
Add a README.txt file to describe the mod, and description.txt so we
could publish it.

Signed-off-by: James Hogan <james@albanarts.com>
2021-04-03 00:01:44 +01:00