Does anyone have any tips for writing a game on my phone?

Hello!

So, for quite a few years now I’ve been wanting to become an author for COG, wether it’s through Hosted Games, or as a company man.

The problem is twofold; I only have the ability to use my phone for the foreseeable future, leaving me unsure if my ambition is even particularly feasible, and I’m lacking literally any experience in coding, at all.

Can I code a game from my phone? Can I learn to use the COG coding apparatus using a phone?

I know it’s possible to actually write a game from my phone…and as a result this doesn’t seem especially concerning, but please feel free to let me know if that’s just a delusion, and the degree to which it is a delusion, if so.

2 Likes

My fingers are no good at tapping these small keys. If were to add an external Bluetooth keyboard, maybe will help. I can barely copy paste properly without messing up. They do sell BT keyboards for phones.

1 Like

At a very basic level, all you need is a text editor to write the game with. There are many options for that.

Here’s how I would do it if I could only use my phone. Instructions for Android.

Download ChoiceScript

Go to ChoiceScript’s github page and download the source code for the engine.

Using a file manager (I recommend File Manager, yes, that’s the name), move the zip file to an appropriate folder inside your mobile instead of leaving it in the download folder.

Install Spck Code Editor

There are a couple good code editor apps out there. I personally recommend Spck Code Editor.

Open the Project

Open the zip with Spck and start editing the files inside web/mygame/scenes. When you want to playtest, open the index.html file inside mygame folder and press play on the top right-hand corner.

You can run them from Spck.


Good luck!

7 Likes

Choicescript is just text, so any text editor that runs on your phone should work just fine for the actual coding.

Make sure that what you use does not replace apostrophes and quotes with curly apostrophes or curly quotes, or do any kind of other auto-correct or auto-replace, or your code will likely break a lot.

Indenting will be kind of a pain since it’s hard to tell how many spaces there are in front of things (at least for me) but I don’t think that’s a deal breaker.

AFAIK quicktest and randomtest are not officially supported on mobile device. That means that–while you can potentially write a game and make it run–you might not be able to have it officially hosted by COG. In theory, you might be able to get them to work, though, in which case I don’t think there would be any real problem.

That said, writing a full length text game for COG is a huge amount of overwhelming work!

I would recommend you start with a smaller piece of interactive fiction to get used to the coding a bit. You can still use choicescript for this! Post it in the forum for people to try and give you feedback on will not only give you hands-on experience with coding, but it will make it much more likely that COG will consider you as a writer for an official game (as they often prefer people with demonstrated writing or coding experience for those).

You could put a short game like this in COGDemos or a similar site (but note that the choicescript license prohibits use of the script in commercial products without permission).

4 Likes

Impressive!

Do apple phones run this too?

Sorry, I don’t have iPhone, I can’t opine.

20160229082807360017o

3 Likes

There does seem to be a Spck Editor on Apple’s app store, and it seems to have the same icon, but I don’t know if it’s the same one functionally.

2 Likes

It actually possible to code a choicescript game from your phone. I started experimenting with choicescript on my phone using a text editor called DroidEdit pro. But the problem’s you wont be able to do the quicktest and randomtest on mobile. You will have to correct every error on your own.

I used to create a folder for each new game a came up with. I would title them the same as the book: maybe: The world beyond. Then in that folder i would store every file related that make up the choicescript gamebook: choicescript_stat.txt, startup.txt, chapter1.txt, chapter2.txt… The text editor lets you name files you create and then save them in your phone’s storage, you would just have to navigate to the related folder and save the current file there. But to be able to publish your game with HG you would have to beta test your game in the forum first and then run the quick and randomtest on the whole product to ensure it’s error free (and that needed a pc back then)

PS: There might be newer and more efficient way to code on your phone it has been a while since I checked.

1 Like