How to start the game engine without a front end


Questions, Explanations, Howtos

Dungeon Dilettante

Posts: 4

Joined: Thursday, 18th February 2021, 05:11

Post Thursday, 18th February 2021, 05:32

How to start the game engine without a front end

I would like to be able to interact with crawl using the raw json. According to an older blog post (link below) the crawl engine is stand-alone and communicates with tiles and console using sockets however I can not figure out how to launch just the crawl engine.

I installed crawl-tiles from the apt-get debian package and the only binary appears to be /usr/games/crawl-tiles which only works from the desktop and launches the entire thing.

https://crawl.develz.org/wordpress/webt ... chitecture

Dungeon Master

Posts: 372

Joined: Monday, 18th August 2014, 20:04

Post Saturday, 20th February 2021, 22:43

Re: How to start the game engine without a front end

This page is describing the architecture of webtiles in particular, which isn't part of offline distributions -- regular tiles/console don't use sockets at all. To get a build that does this, you will need to build it yourself. In the repository source directory, "make WEBTILES=y" will do it, though this gives a dev-oriented setup without other configuration. See also https://github.com/crawl/crawl/blob/mas ... /README.md for some intro documentation.

There is no current version that completely lacks a front-end; the webtiles build uses a console front-end that can be controlled via a json over a socket connection (and then the console output is what online servers use for screen-recording). There is actually a branch that is not merged that fully suppresses the front-end (https://github.com/crawl/crawl/tree/headless/) but this will probably need some more work before it can be merged, not sure of the ETA. (But for developing a bot or the like, it might actually be easier to be able to see the console front-end in a terminal.)

Dungeon Dilettante

Posts: 4

Joined: Thursday, 18th February 2021, 05:11

Post Sunday, 21st February 2021, 01:15

Re: How to start the game engine without a front end

I finally clued into the fact that TILES and WEBTILES are not the same thing and am now compiling WEBTILES.

The reason I asked the question is I'm curious about the possibility of attaching different front-end UIs using crawl as the game engine. I was hoping the main crawl game engine simply opened a json socket that the tiles/webtiles front-end connected to. That doesn't appear to be the case in the main branch but your tip about the Headless branch sounds like what I'm after. Thanks for that.

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.