themozg / awk-raycaster Goto Github PK
View Code? Open in Web Editor NEWPseudo-3D shooter written completely in gawk using raycasting technique
License: MIT License
Pseudo-3D shooter written completely in gawk using raycasting technique
License: MIT License
gawk
is a superset if awk
, so a program using gawk
features nis not longer an awk
program.
Please change the repo title from
Pseudo-3D shooter written completely in awk using raycasting technique
to
Pseudo-3D shooter written completely in gawk using raycasting technique
for exactness.
$ gawk -f awkaster.awk
gawk: awkaster.awk:5:
gawk: awkaster.awk:5: ^ syntax error
gawk: awkaster.awk:6:
gawk: awkaster.awk:6: ^ unexpected newline or end of string
gawk: awkaster.awk:8:
gawk: awkaster.awk:8: ^ invalid char ''' in expression
src/awk-raycaster - [master] » awk -f awkaster.awk
awk: syntax error at source line 23 source file awkaster.awk
context is
>>> sprite[0][ <<< 0]
awk: illegal statement at source line 24 source file awkaster.awk
awk: illegal statement at source line 24 source file awkaster.awk
Or a more arbitrary change to set your own moving characters would be optimal if you have a not-qwerty-layout.
function redraw() {
str = "\033[1;1H"
...
The above sends the cursor to the top-right of the terminal without clearing it.
FWIW, I like the scroll-to-redraw effect - it's kinda reminiscent of a bouncy CRT - but the above change results in much less work for old/dumb terminals like xterm
, making the whole thing a lot faster ( and decreasing dizziness by 100% everywhere :D).
An overview on escape sequences can be found in man console_codes
(Linux manpages-specific); a more in-depth analysis can be found in dtterm(5), an absolutely ancient doc but the most comprehensive I've yet found (test what you read everywhere before trusting it tho).
The escape sequence listed above is practically standard and I would be very gobsmacked if you ever got an incompatibility report on it.
Also - this thing is awesome and I'll definitely be studying it at some point, awk seriously FTW! :D
(And kudos for making this tidbit such an easy fix!)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.