Back to General discussions forum
When I was just writing my first clumsy programs, there was no internet around - just Turbo Pascal and few books borrowed from various people.
One of these books was unusual - author was giving ideas of small games which reader can program - but didn't give out any sources. Such games varied from simple dice games, Nim, Matches Picking - to step-by-step console games like "zombies" or crossing the road - the book was written in 1985, in French. It seems to have translation to Russian (my native) but not to English.
Author was interesting person, with somewhat sarcastic style. Recently I've learnt a bit more about him from internet - and regretfully, that he passed away in 2014 (please switch to English version on the page, direct link won't work).
I wonder, do people who learn programming in 2020 are interested in programming all such small games - usually they are more funny to program than to play, right? Nevertheless I believe such exercises usually contain more algorithmic and implementation challenges, compared to general "business-oriented" tasks or developing beautiful website front-ends.
Do you know other similar books, by the way?
Now I'm thinking about starting some lazy and simple open-source project - like collection of descriptions of such small games (in the manner similar to this book), which are useful for novice (and not only) programmers - to which participants can by and by create and link web-based implementations. I suppose this will mainly use JavaScript (so that such games work in browser), though it is possible also to use some other interpreters (like brython) with some efforts.
Feel free to share your thoughts and suggestions!
I think this is a nice idea. I don't know any of any such books unfortunately, but perhaps the following might be relevant.
Also, I want to remark that actually there is another option for making non-Javascript code work on a browser, and that is using WebAssembly. Of course I'm not suggesting that people should now write Assembly-like code instead of Javascript, but rather there are compilers which can take languages you know and compile them to WebAssembly. I am not an expert whatsoever on WebAssembly, but I have heard a bit about it and think it's pretty interesting, though it is still a fairly new thing.
Thanks for links, I'll go and see what it is about!
non-Javascript code work on a browser, and that is using WebAssembly.
I'm not sure - do you mean compiling via LLVM and then using something like asm.js
? I vaguely remember I used
such approach... probably in form of Emscripten - to create web-emulator for my
BASIC-on-Arduino project Miskatino...
As I understand, with some efforts almost everything could be compiled to JS, however these efforts - and efforts on integration to web-page elements - they make one feel as if learning JS could be easier at least for small programs :)
and then using something like asm.js?
Haven't heard of it before, but on brief inspection it seems asm.js
is a subset of JS. Well, I guess this should make sense since
it does have the .js file extension.
with some efforts almost everything could be compiled to JS
To be clear, WebAssembly is not the same as JS. Modern browsers now support both WebAssembly AND Javascript natively, (er, well, at least from what I can tell it is supported by FireFox, Chrome, Edge, and Safari). Browsers can run both WebAssembly along with Javascript code without the need to use any external scripts.