Language for a 2-D graphical roguelike.
Saturday, June 6, 2020 - 18:31
This is a more specific version of a question I asked a while ago.
php creates a html page. This means that, if you want to display an environment like this one:
You just do it as a table, with each cell displaying the image that corresponds to a location in an array.
Is there a programming language that takes a similarly simple approach to graphics?
Maybe BaCon with the HUG extension, but it's only for BSD/Linux/Mac: http://basic-converter.org/
Or else Python with the Tkinter extension (manual at https://tkdocs.com/). It's more complex, but also much more powerful; I used it for two roguelikes now and it worked great both times.
By the way: using a table in HTML makes the browser waste a lot of RAM if you want a field of view any bigger than in your screenshot. And using PHP for a single-player game is a waste of server resources. Just learn to draw on a graphical canvas, in whatever language you like; if anything it's even simpler.
Mini Micro was designed for exactly this sort of thing. You would use a TileDisplay, which allows you to simply set the tile index (i.e. which picture to show, from a tile sheet) for any cell (position on screen) of the display.
Tile displays support scaling and scrolling very easily. They also support transparency and can be layered, so more likely you would use *two* tile displays, one for the environment and another for the player and monsters (and possibly a third, in between, for items lying on the ground).
Mini Micro has a small but active and very supportive community. If you decide to go this route, you can count on lots of support from me and other Mini Micro users. Mini Micro runs on Mac, Windows, Linux, and the web, and you can package your game for all those (there are already over a dozen Mini Micro games on itch.io, for example). Also, it is free. Give it a try!
https://joestrout.itch.io/mini-micro