Hi there, my name is Diego and I am new to the forum. I discovered Choicescript recently, and I am having a blast.
I am trying to find examples of CS pushed to the limit. Here for instance, I have a page that generates a random maze and lets you play it. Note you must change the font to monospace with Chrome dev tools, because I cannot change style.css on dashingdon.com
Itās cool to see people pushing the limits of CS. I wrote a python script to generate an inventory system in CS for me.
I donāt understand your maze though. What do the commas and the hashtags stand for?
Also, you should consider that the game would run on different screen sizes, so this might phunk your maze. Besides the typeface.
Edit:
It just occurred to me that instead of common characters, you could use unicode characters with predefined lengths like:
Unicode 2588 (black block): ā
Unicode 2001 (empty char). This is not the same as simple whitespace! Unfortunately, it seems Discourse converts empty characters into whitespace. So it wonāt show here.
You can discuss DashingDon in its own thread:
And to contribute with features I think you would have to talk with @dashingdon.
Thanks for the warm welcome! I am Italian, but the name is misleading!
That was clearly a proof of concept, but the idea is that the maze should look like a map from above. Unfortunately itās tricky to get a nice rendering using only text. The Unicode trick helps (thanks!), but you still need to change the font to monospace - and the line height introduces vertical breaks.
As I mentioned, for a real game I would precompute a bunch of images of the map, but in that case the maze would never change.
Iād love to see you what you did with the inventory. Can you point me to your games and maybe share the script?
Hey, cool! Iām one-fourth Italian myself, but I never learned to speak it though.
I havenāt put anything out there yet. The inventory system was for a previous project. I finally abandoned it because it was too pretentious and I got overwhelmed. I might pick it up again someday, who knows.
I donāt think I have the script anymore. But it was very simple, it just declared all the variables for me, so I wouldnāt have to write it all down by myself. Something like this (Iām writing from the top of my head):
with open ('inventory.txt', 'w') as file:
file.write('*comment INVENTORY')
for i in range (1, 101):
file.write('\n\n')
file.write(f'\n*create slot_{i} false')
file.write(f'\n*create slot_{i}_equiped false')
file.write(f'\n*create slot_{i}_name')
file.write(f'\n*create slot_{i}_type')
file.write(f'\n*create slot_{i}_size')
file.write(f'\n*create slot_{i}_weight')
file.write(f'\n*create slot_{i}_value')
file.write(f'\n*create slot_{i}_buff')
Then I would just copy the generated text to the startup file.
Also, I donāt know JavaScript that much, but I think that if you add this line to the the page where you render the maze it should do the trick. Note that CoG donāt like games that use the *script statement, so thatās something you should keep in mind if you plan on eventually publishing through them.
I would say Missing Wings is one of those published games that pushes the engine to the limit. It has a simple managing sim, a similar maze escape thing, a logic-gate kind of puzzle, and many other puzzles (12, IIRC?).
Hi all, thanks for the tips and for sharing your code. The script command opens a whole new realm of possibilities. Here is the updated maze, with better layout and interactivity!
Missing Wings seems very nice. I just started. The only mini-game I found so far is Nice Dice, which is a very simple comparison of two random numbers. Do they also have a full maze in it? Iād be curious to see it.
Managing simulator refers to a genre that focuses on production, management, and efficiency. Games like Factorio, Cookie Clicker (this one leans more on idle-clicker), Automation Empire, Rimworld (this one is more on the survival), and recent EAccess Satisfactory (play with me Iām lonely anti-social weeb).
Btw, the timer seems inconsistent. I get a series of rapid brrt on my movement; canāt even click on my preferred option.
My favourite āLook at what ChoiceScript can doā game has to be Lunchtime at St. Expeditus by @aetheria (although I donāt believe theyāre active anymore). It basically turns the CS interpreter into something more akin to a Visual Novel.
I finally abandoned it because it was too pretentious and I got overwhelmed.
You have to stop and ask yourself, why am I using ChoiceScript? If Iām spending more time writing Python utilities, or hacking around ChoiceScriptās interpreter, than I am writing my game. Whatās the point? You may as well go and code your own engine/interpreter.
Note that Iām not trying to dissuade people from experimenting. Iām just encouraging people to be realistic, and Iām speaking from experienceā¦ Some of the stuff Iāve left by the wayside:
āHello Worldā ā Computer terminal style simulator, with ārunnable appsā, including an email system
āChoice of Friendsā ā A IF novel that takes place āonā a Social Networking Website
A Piracy simulator with real-world economy (growing towns/shifting allegiances)
Full inventory system with armour classifications and equip/un-equip UI
Hi all. Thanks so much for your comments - itās really nice to get so much feedback right on my first post!
@CJW āLunchtimeā is really beautiful, but I believe the core CS engine was heavily modified, right? I donāt think you can do all that stuff right out of the box. Mine is a just a fun challenge - what can be done without hacking the engine?
So, here is the updated version of my maze. (LINK IN THE FIRST POST)
New features:
an advanced AI (?) driving an enemy in the maze
autoplay can be turned on-off
to avoid inconsistent events (@Szaal) the ānextā button is disabled in autoplay
consistent directions (blocked directions are not hidden) so you can learn to navigate using the access keys 1-4
I am using a few script commands, which are in a sense modifications to the engine, but they are very limited.
--- Styling, because style.css is not supported in Dashingdon
*script document.getElementById("text").style.lineHeight = 1;
*script document.getElementById("text").style.fontFamily = "monospace";
--- Disable the page animation (one could do it manually in the settings).
*script window.animateEnabled = false;
-- This is where the magic really happens. Automatically runs "next" for you.
*script setTimeout(function(){document.getElementsByTagName("form")[0].onsubmit(); }, 1500);
-- Disable the "next" button in autoplay to avoid extra events.
*script document.getElementsByTagName("button")[5].disabled = true;
*script document.getElementsByTagName("button")[5].innerHTML = "AUTOPLAY";
There are a million ways one could improve it, but it would go beyond the proof of concept.
Directions could be relative. 1 to go straight, 2/3 to turn left/right.
Better enemy AI (right now itās random)
Better maze map (guaranteed solvable).
Treasures to collect along the way, scoring etc.
If one wants to use the script command more heavily, the map could be rendered with a series of small tiles, replacing the symbols for walls and corridor with little images.
The games of Snake or Tron could also work with a similar setup.
@Szaal Iāve spent some time on Missing Wings. Really nice! I loved the puzzles. I also found the maze. I canāt tell if itās randomized every time, but it was fun to chase all the warping tiles to the end.
The puzzles are p good, though I think a few of them arenāt balanced properly; the dwarves pairing ones especially starts to feel like a chore once you know the solution to them (thanks to how CS handles interface as well).
Hi, What youāve done its amazing!
I have created a really small maze for my game (though i could have done it a lot bigger if I wanted) a long time ago but it has no graphics. I just wanted to know if thereās a possibility to make the whole image dark and only show ālightā where the player is, and a grayed out where it has been, as a way of not knowing the path to the exit before start. Thatās how my maze works, as the player never have been there and it shouldnāt know it (at least not before the first playtough, which it could also be solved by the randomness of yours).
Yes, I believe itās doable. Iād be happy to help you with your game. Do you want to share a link? Feel free to send me a private message if you prefer.