links to uxn tutorial day 6
This commit is contained in:
parent
9215140d60
commit
0d7b415224
12
src/atom.xml
12
src/atom.xml
|
@ -5,10 +5,20 @@
|
|||
<title>compudanzas: updates</title>
|
||||
<author><name>sejo</name></author>
|
||||
<generator>a mano</generator>
|
||||
<updated>2021-08-25T12:00:00Z</updated>
|
||||
<updated>2021-09-14T12:00:00Z</updated>
|
||||
<link href='https://compudanzas.net/atom.xml' rel='self'/>
|
||||
<link href='https://compudanzas.net/log.html' rel='alternate'/>
|
||||
|
||||
<entry>
|
||||
<id>https://compudanzas.net/log.html#12021-09-14</id>
|
||||
<title>12021-09-14 uxn tutorial day 6, towards pong</title>
|
||||
<updated>2021-09-14T12:00:00Z</updated>
|
||||
<link href='https://compudanzas.net/log.html#12021-09-14' rel='alternate'/>
|
||||
<summary>
|
||||
published {uxn tutorial day 6}, towards pong!
|
||||
</summary>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>https://compudanzas.net/log.html#12021-08-24</id>
|
||||
<title>12021-08-24 uxn tutorial day 5</title>
|
||||
|
|
|
@ -5,6 +5,10 @@ what's happening with compudanzas
|
|||
=> ./atom.xml [atom feed]
|
||||
=> ./tw.txt [twtxt]
|
||||
|
||||
## 12021-09-14
|
||||
|
||||
published {uxn tutorial day 6}, towards pong!
|
||||
|
||||
## 12021-08-24
|
||||
|
||||
published {uxn tutorial day 5}, the mouse and uxntal goodies!
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# url = https://compudanzas.net/tw.txt
|
||||
# url = gemini://compudanzas.net/tw.txt
|
||||
#
|
||||
2021-09-14T20:00:00-05:00 published {uxn tutorial day 6}, towards pong!
|
||||
2021-08-24T20:00:00-05:00 published {uxn tutorial day 5}, the mouse and uxntal goodies!
|
||||
2021-08-18T15:00:00-05:00 updated the {uxn tutorial} with changes in the instructions and opcodes: NIP, INC, and LIT
|
||||
2021-08-11T20:00:00-05:00 published {uxn tutorial day 4}, variables and animation loop!
|
||||
|
|
|
@ -58,6 +58,19 @@ we also discuss possible structures to create loops and more complex programs us
|
|||
|
||||
# day 6
|
||||
|
||||
here we talk about how we can integrate everything that we have covered in order to create even more complex subroutines and programs for the varvara computer.
|
||||
|
||||
we base our discussion in a recreation of the classic pong game!
|
||||
|
||||
besides using previous strategies and snippets of code, we cover strategies for drawing and controlling multi-tile sprites, and for checking collisions.
|
||||
|
||||
=> ./uxn_tutorial_day_6.gmi {uxn tutorial day 6}
|
||||
|
||||
=> ./img/screenshot_uxn-pong-paddles-and-ball.png screenshot showing the stage of the pong game: a couple of paddles at the sides, and a ball at the center
|
||||
|
||||
|
||||
# day 7
|
||||
|
||||
coming soon!
|
||||
|
||||
# external resources
|
||||
|
|
|
@ -717,13 +717,17 @@ these are the uxntal instructions that we discussed today! with these, we have c
|
|||
* JSR: unconditionally jump to the address in the working stack, pushing down into the return stack the address of the next instruction in memory
|
||||
* STH: take a value from the working stack and push it down into the return stack. in return mode, do the opposite.
|
||||
|
||||
# coming soon: day 6
|
||||
# day 6
|
||||
|
||||
the following days of the {uxn tutorial} will consist in discussing all the remaining devices in the varvara computer.
|
||||
in {uxn tutorial day 6} we talk about how we can integrate everything that we have covered in order to create even more complex subroutines and programs for the varvara computer.
|
||||
|
||||
meanwhile, i invite you to keep exploring, to share your findings, and to also take a break!
|
||||
we base our discussion in a recreation of the classic pong game!
|
||||
|
||||
stay tuned!
|
||||
besides using previous strategies and snippets of code, we cover strategies for drawing and controlling multi-tile sprites, and for checking collisions.
|
||||
|
||||
first, i invite you to take a break!
|
||||
|
||||
then, keep exploring, and share your findings!
|
||||
|
||||
# support
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# uxn tutorial: day 6, towards pong
|
||||
|
||||
(work in progress)
|
||||
|
||||
this is the sixth section of the <(uxn tutorial)>! here we talk about how we can integrate everything that we have covered in order to create more complex subroutines and programs for the varvara computer.
|
||||
this is the sixth section of the {uxn tutorial}! here we talk about how we can integrate everything that we have covered in order to create more complex subroutines and programs for the varvara computer.
|
||||
|
||||
we base our discussion in a recreation of the classic pong game.
|
||||
|
||||
|
@ -955,11 +953,11 @@ where CLEAR-COLOR in this case would be:
|
|||
%CLEAR-COLOR { #40 } ( clear sprite from the foreground )
|
||||
```
|
||||
|
||||
this is a good reminder to review the tables for the sprite bytes in <(uxn tutorial day 2)>!
|
||||
this is a good reminder to review the tables for the sprite bytes in {uxn tutorial day 2}!
|
||||
|
||||
### update position
|
||||
|
||||
to update the position of our paddles, we can resort to the hello-moving-sprite.tal example from <(uxn tutorial day 4)>.
|
||||
to update the position of our paddles, we can resort to the hello-moving-sprite.tal example from {uxn tutorial day 4}.
|
||||
|
||||
we can use up and down arrows to change the position of the left paddle, and ctrl and alt (A and B) buttons to change the position of the right paddle.
|
||||
|
||||
|
@ -1033,7 +1031,7 @@ BRK
|
|||
|
||||
note that we are able to move the paddles beyond the limits of the screen.
|
||||
|
||||
i invite you to modify the update-paddles subroutine so that there's a limit in the paddles movement. in <(uxn tutorial day 4)> we discussed some possible strategies for achieving it :)
|
||||
i invite you to modify the update-paddles subroutine so that there's a limit in the paddles movement. in {uxn tutorial day 4} we discussed some possible strategies for achieving it :)
|
||||
|
||||
# the ball
|
||||
|
||||
|
@ -1339,7 +1337,7 @@ in other languages it is probably easier to write the first one, but here we'll
|
|||
|
||||
in any case, it can be a good exercise for you to try to figure out how to "invert" the speed with a single arithmetic or logic operation!
|
||||
|
||||
hint: look again at the bitwise masks discussed on <(uxn tutorial day 3)> :)
|
||||
hint: look again at the bitwise masks discussed on {uxn tutorial day 3} :)
|
||||
|
||||
### top wall
|
||||
|
||||
|
@ -2043,7 +2041,7 @@ share what you create based on all this! :)
|
|||
|
||||
that's it for now!
|
||||
|
||||
the following day of the <(uxn tutorial)> will consist in discussing all the remaining devices in the varvara computer.
|
||||
the following day of the {uxn tutorial} will consist in discussing all the remaining devices in the varvara computer.
|
||||
|
||||
meanwhile, i invite you to keep exploring, to share your findings, and to also take a break!
|
||||
|
||||
|
@ -2051,4 +2049,4 @@ stay tuned!
|
|||
|
||||
# support
|
||||
|
||||
if you found this tutorial to be helpful, consider sharing it and giving it your <(support)> :)
|
||||
if you found this tutorial to be helpful, consider sharing it and giving it your {support} :)
|
||||
|
|
Loading…
Reference in New Issue