I saw an explanation of how to look at “/scenes” for a game in a long-ago Choice of Vamp comment thread. If I hadn’t seen it, it wouldn’t have occurred to me that it was possible… and I’d have missed out on a whole lot of learning that’s come from digging into how other people coded their games!
[Edit: Reaperoa’s original explanation was back when mygame.js was where your scene list lived. Now it lives in startup.txt. So here are some Choice of Rebels examples to complement/update his explanation. Here’s my start up scene:
And once you’re there, you can see the names of the other scenes in the scene list; to view them, just cut and paste their names instead of “startup” in the url]
[Edit II: if you’re trying to look at the scene list for a compiled WiP, have a look at CJW’s suggestion here.]
[original post, no longer valid:]
@Reaperoa just gave a good concise explanation of how it’s done, which I’m reposting here for easy reference: Any CS game you can view online, you can view the code for. It just takes a tiny bit of poking around. Simply start up the game, it’ll shoot you over to the inner index.html (links may be to the outer one, so you’ll want to visit the game and let it load to get the link to the inner one), from there you can replace index.html with mygame.js in the address bar, and from there it’s just a matter of /scenes/foo.txt. Too technical? Let me give you an example: Compare this link (The actual link, not the page itself):
With this one:
Then, once you visit the mygame, you should be able to figure out this one:
Edit III (18 June, 2019):
If you're still confused, here's a visual guide on how to look at a game's code (CoG Webstore Only)
First thing you have to do is choose the game whose code you want to see!
I’m using Community College Hero 2
because I love staring at Hedonist’s beautiful nose as I work.
Click on Play Online.
If you want to look at a full game's code, make certain that you are logged into the account that you bought the game with. If you are logged in, you will be able to see the option to sign out on the right-hand corner of the screen.
Note: You don’t have to be logged in to see a game’s code, but you will be blocked from seeing scenes you haven’t paid for. I don’t know how, please don’t ask me why, I’m assuming it’s actual wizardry.
You should now arrive at this screen:
People experienced in code-diving or even game writers will recognize this screen, but for the newbies, this is the file that lists the game scenes and its stats (and achievement, if it has any).
$ in front of those scenes means that they’re locked behind a paywall. If you’re not logged into an account where you’ve bought this game then you will only be able to follow the next steps with the demo scenes (i.e. the ones without the
$ in front of them).
And replace it with the name of the scene whose file you wish to see.
Again, I just copy & paste it, but you do you. If your fingers need the workout, go for it!
And that’s how you look at a game’s code!