Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> macro-style code (where the code is ever-evolving and is practically a media file)

I'm afraid I don't follow; what do you mean by this bit here?



Oh sorry, basically treating code as any other media file. "Game Scripting Mastery" by Varanese and LaMothe goes into a lot of detail about creating your own language and compiling it to I-code and then running the scripts in the game, the same way you would load images or sounds. My partner writes very expressive code with creative macros (he independently discovered iterators by defining a macro like SPRITE to mean sprite[count]). That might seem a little strange to a computer scientist, but look at what he did. He didn't have to explain how references or lists or anything else worked. If you understand arrays and #defines, then you can use iterators too. And he does things like that to me all of the time, writing one liners to replace my pages of "proper" code. The only problem is that he does it in c++ instead of javascript/python/lua so our games are in this constantly evolving state, so my top priority is adding a scripting library to our engine. Then again, that introduces the need to bind all of these functions and data. It will probably be a win though because we tend to work on large games.


Wow that's really interesting, thanks!




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: