Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1378801 Posts in 65621 Topics- by 57983 Members - Latest Member: Mifux Studio

July 04, 2020, 05:36:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogs5N²+6N-4 . . . . . . (codename)
Pages: 1 ... 3 4 [5] 6
Print
Author Topic: 5N²+6N-4 . . . . . . (codename)  (Read 11093 times)
a-k-
Level 1
*


View Profile
« Reply #80 on: November 30, 2019, 07:46:02 AM »

.
Logged

a-k-
Level 1
*


View Profile
« Reply #81 on: November 30, 2019, 07:47:53 AM »

I think having a shortcut for swapping workers would be pretty convenient, because my most common mistake was "oh whoops i got the order wrong" and then having to re-input both workers, or having A join B require drag join then two more shortcuts instead of just drag and swap. It is just another shortcut, but given how many times I found myself just wanting to swap the order instead of change the actual workers, I'd probably get more use out of an exchange shortcut than the dedicated worker and SHIFT+worker shortcuts as the majority of my use of them was swapping the order already on the command.
Shortcut added (that was 3 lines of code).

And yeah I guess my natural assumption was that program counter would continue along the last direction without interruption, especially if I'm just dragging commands into a straight row. I definitely think laying commands could be made faster with the ability to maybe turn on/off an autoconnect that links the last placed command to the newest command if they're adjacent or something like that, something optional.

But either way, great work with the project!

Thanks, this is really helping! I've implemented auto-connect and it's now in the prototype. It's not optional, it's unlocked after a few levels and then effective forever (that practice may be controversial, I know...) It can be enabled already from the first level by opening the browser console and typing
window.frames[0].postMessage('enableAutoConnect', '*');

Just managed to sit down and give this is a spin. Very neat!
Thank you!   (looking up the various meanings of neat in the dictionary...)
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #82 on: December 01, 2019, 01:25:01 AM »

(Oh shit, don't tell me there's a negative or sarcastic one among them? Who, Me?)
Logged
a-k-
Level 1
*


View Profile
« Reply #83 on: December 02, 2019, 09:57:03 AM »

I figured I would provide more details about the auto-connect algorithm mentioned in the last post. It's quite involved, so I'm just going to provide a specific example here while simplifying things for the sake of presentation.

We're talking about the player inserting commands using the mouse or the keyboard, including the ability to copy or move commands around, and the editor attempting to spare the trouble of manually setting the direction of each command toward the next one.

The algorithm is activated whenever the player inserts a new command in an empty cell on the grid, and that cell is not pointed to by any of the existing commands (i.e. it is "disconnected"). For example:


(player inserting a command into a grid with 4 sequences of commands)

Here, there are four neighboring commands, (1) to (4). Which one, if at all, should we connect to the newly-inserted one?

In order to reduce guessing, the editor remembers which command was placed last. This is tricky since the player may move the command, edit older commands, and in general perform arbitrary drag & drop operations that are sometimes ambiguous. And when they're finished, continue inserting more commands. So the editor has a "best-effort" concept of that previously-placed command - sometimes it's known, and at other times it's not.

When this information is available, how is it used? If the previously-placed command was (1), (2) or (3), then we simply connect it to the newer one. If it was (4), we don't auto-connect anything since it already has a direction (pointing downwards).

Now, suppose that we don't have a previously-placed command, or perhaps we do have, but it is neither of (1) to (4). In that case, we examine each one of the neighbors.

First, just like before, (4) is eliminated since it already has a direction. Secondly, we give priority to (1) over both (2) and (3) since it is part of the current program (that starts with the yellow symbol at the left) - there's greater chance that the player is currently editing it. Since we're left with only one candidate, we can now auto-connect (1) to the newly-inserted command.

Actually, (1) is not always selected. If (1) is part of a solution to the level that the player has already tested, then why would they want to extend it further with another command? In that case, (2) and (3) remain the only relevant candidates. In general, if there are two options and we can't determine which one to select, we do nothing. But suppose that (2) is also part of a (probably different) solution, and (3) is not - in that case, we'll auto-connect (3) to the new command.

There are additional safety measures, like not auto-connecting commands that are far away and therefore invisible (cannot happen in the prototype), and more design decisions like having the auto-connect be part of the same undo/redo event of the command insertion, so that undo cancels both.

As you can see, the algorithm takes many variables into account. While this may introduce some form of unpredictability for the player, in practice all this information is used in order to be as conservative as possible, and most importantly, in any case never override previous decisions of the player. This last point implies a simple way for players to avoid the algorithm altogether - set the direction of the last command before placing the next one. So even though there's no setting for disabling auto-connect, in a sense it may be regarded as optional.


(Oh shit, don't tell me there's a negative or sarcastic one among them? Who, Me?)
Not in the slightest! Now also verified numerologically in radix 10 and 16.
Logged

destinysWalrus
Level 0
*


View Profile
« Reply #84 on: December 03, 2019, 04:23:35 AM »

I tried out the demo! So far it provided enough puzzle (for a demo) without driving me bonkers trying to figure things out. It took me a few tries to get how the unlink worked - I kept putting the workers in the wrong order - but once I got that down I didn't have too much trouble.

The main exception to the above was level B7, though this was mostly because I misunderstood the instructions! For whatever reason, I thought that I had to - out of the cycle and chain - construct a cycle combining the two, not a chain. I spent ages trying to figure out how I'd do that without conditionals or access to worker H, tentatively concluded it was impossible, then kept trying on the assumption that you wouldn't give us an impossible level. Basically I meant to make a single chain as Step 1, then figure out how to connect the ends as Step 2, but was mildly surprised when Step 1 was the actual goal. Facepalm Grin This probably tells me that 3:30 a.m. is not an optimal time for programming or puzzle games.

I did very much appreciate the single step forward/back buttons once I unlocked them. It meshes with my programming style - basically work on a bit of a problem, slightly tinker with it until I get that step right, then continue to the next bit and repeat.
(Python was my first programming language, and it made that kind of thing really easy)
Logged
a-k-
Level 1
*


View Profile
« Reply #85 on: December 05, 2019, 09:50:28 AM »

I tried out the demo! So far it provided enough puzzle (for a demo) without driving me bonkers trying to figure things out.
Thank you for playing the demo! That's exactly what I've been aiming for.

It took me a few tries to get how the unlink worked - I kept putting the workers in the wrong order - but once I got that down I didn't have too much trouble.
You seem to be in good company with respect to "unlink"! There are good reasons for keeping the order of the workers as is, as well as not reversing the animation (which might have helped?) Instead, I've changed the error for "unlink" so that it will be slightly different when a link exists in the opposite direction. It's subtle but perhaps it can help a little.

The main exception to the above was level B7, though this was mostly because I misunderstood the instructions! For whatever reason, I thought that I had to - out of the cycle and chain - construct a cycle combining the two, not a chain. I spent ages trying to figure out how I'd do that without conditionals or access to worker H, tentatively concluded it was impossible, then kept trying on the assumption that you wouldn't give us an impossible level. Basically I meant to make a single chain as Step 1, then figure out how to connect the ends as Step 2, but was mildly surprised when Step 1 was the actual goal. Facepalm Grin This probably tells me that 3:30 a.m. is not an optimal time for programming or puzzle games.

Any time is perfect for having fun! I think I can see where the confusion came from, the layout of the goal was too similar to a cycle, at least for the default input. I've changed it to be S-shaped:



I did very much appreciate the single step forward/back buttons once I unlocked them. It meshes with my programming style - basically work on a bit of a problem, slightly tinker with it until I get that step right, then continue to the next bit and repeat.
(Python was my first programming language, and it made that kind of thing really easy)

I'm glad you find backward-stepping in particular useful - it's even more powerful when combined with breakpoints and more challenging levels. When you control all state changes, supporting running backward is actually no different than having undo/redo.
And Python is a great language! It's even included in the full game (though I had to butcher it a little for achieving that... may BDFL forgive me.)
Logged

a-k-
Level 1
*


View Profile
« Reply #86 on: December 07, 2019, 10:15:58 AM »

I've discovered (a bit late) that most players could not communicate with my server, so their solutions were not received and the global histograms were not shown to them. Nobody here complained about this, I guess you all thought they weren't implemented.

I'm still not 100% sure what the root cause is. Before I made the game available here, the itch.io version had already been tested on 4 browser families, on multiple computers (and 1 smart TV), and everyone had seen the histograms. After rejecting a few possibilities (locked-down environments, DNS/DoH issues, CSP etc.), I came to suspect browser extensions such as ad-blockers that do not only use blacklists but also employ heuristics to block tracking - perhaps they classify my XmlHttpRequests as such?

I'm not familiar with ad-blocker extensions (I use different measures), but come to think of it, if I were to develop one, I would certainly block the communication with my server. Here's why:


(itch.io setup)

1. The webpage is hosted on one domain (....itch.io)
2. The game runs inside an <iframe> from another, unrelated domain (....hwcdn.net)
3. The code from that 3rd party domain, running in that <iframe>, tries to communicate with yet another 3rd party domain (my server)

Now, even if I wanted to, I can't test with all the various ad-blockers, and I imagine their heuristics constantly change anyway as part of the online tracking arms race. So with some educated guessing, I changed the setup on itch.io as follows:


(new itch.io setup)

1. The game now runs from my server instead of the CDN that itch.io uses.
2. The communication between the game and the server is in the same domain.
3. Additionally, the domain name was renamed from a combination of cryptic letters to the game name, and the server endpoint URL - from "gamestats" to "gamehistograms"...

This also involved hastily making my website available, where players can finally view the leaderboards, including new screenshots that show futuristic content.

I'm hoping that this fixes the issue. It would be great if someone that had previously played the game and was seeing "waiting for server.." indefinitely could confirm that they're seeing all histograms now (it's enough to test on 1 level). link to itch.io

---
Following marcgfx's feedback from the playtesting section:
[...] I also found the help text rather confusing. Telling the player to press the next button (that while looking like a button is not one, but you have to click top right).

I've added support for "control references", where a GUI element that is hovered can reference another control, by name. Specifically, when the player hovers a "rich text" label that mentions other parts of the UI, a blue arrow is automatically drawn from it to the target:


(usually the actual control is further than is shown here)
« Last Edit: December 07, 2019, 10:29:30 AM by a-k- » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #87 on: December 08, 2019, 03:30:18 AM »

>  Nobody here complained about this, I guess you all thought they weren't implemented.

Yep
Logged
a-k-
Level 1
*


View Profile
« Reply #88 on: January 03, 2020, 06:11:15 AM »

Extended demo version

The extended demo version adds 6 levels in areas A, B and C (1, 2 and 3 respectively), further developing the concept of non-determinism and loops. It also adds a third programming language and new UI elements.

Specifically regarding non-determinism: previously, the player had to deal only with "adversarial" RNGs - ones that had a well-defined behavior, selected especially for each level. Now, their solutions need to handle more random RNGs, and "input" has become a combination of the input structure and the RNG (called "scenario" in the game).


(what happens when you have false assumptions about the RNG)

This version was actually uploaded ~3 weeks ago.

Rank in leaderboards

The server now communicates the player's rank in the leaderboards to the client, and that rank is displayed at the top of the records screen. Whenever the rank improves, the trophy button that leads to the records screen turns yellow. Currently, the server calculates the top 20 players but the leaderboards only show the first ~15, so players get feedback just before they make it into the leaderboards.

Previously, the button that led to the leaderboards was buried at the bottom of the 2nd tab out of 4 in the records screen, so I guess many players didn't know they existed. By these changes I hope that players will be more aware of them, especially those that are already (or almost) there.

Tutorial instead of hint system

The first two levels now have a tutorial that's simply made of the previous context-based hints but in an always-visible mode. No UI is blocked, so players can still ignore the instructions if they wish. This change was done after watching jbarrios's illuminating playthrough, which demonstrated a fundamental issue I had in the UI explanations.


(two terms, each referring to two different concepts)

More options for mouse users (explained in levels A5 and A7)

Toolbox commands can be customized by dragging workers into them:



This was considered in the past, but rejected since it could lead to invalid commands that might confuse new players (e.g. "link B-->B"). But after seeing both michaelplzno and jbarrios trying to do that, and given that I have a tutorial now, that has become less of a concern.

In addition, as an alternative to drag & drop, players can insert commands and modify workers by double-clicking the icons in the toolbox instead of dragging them. Combinations of drag & drop and double-click should also work well, just like combinations of mouse and keyboard shortcuts.

Something for keyboard users

The X key that normally exchanges workers also swaps Y and N when applied to "test" commands.
And some "juice": buttons and icons are highlighted briefly when they're activated by a shortcut key.

Automatic step backward

In certain scenarios, for example when the player removes the last command or modifies its workers, the game will automatically step backward if that will keep the execution state up to date. This will save the need for the player to re-run the algorithm from the beginning.

I had actually implemented this feature long ago, but disabled it after realizing that the immediate backward-step might confuse players - it's done abruptly, without animation. But after carefully reviewing michaelplzno's video, I decided to give it a second chance in a more limited form (e.g. without supporting switching of commands). Hopefully, players will find it intuitive that the game cancels their last-executed command once they modify it.

The feature is available for sequential algorithms only (neither loops nor conditions) from level A4 onwards.

Miscellaneous

Besides all these, I've made small changes here and there following michaelplzno's feedback, and introduced more tooltips while postponing some UI elements to later levels. The most noticeable change is that workers have names now. This is something that I tried in the past, but found that for big structures the names may hide links, and in general overwrite each other. I still don't have a solution for that, so I've added a setting that reverts back to letters.
Logged

michaelplzno
Level 6
*



View Profile WWW
« Reply #89 on: January 09, 2020, 07:28:18 PM »

After looking at this I imagine your home is very tidy and cozy. Lol, this is a really cool concept that anyone who is considering a CS degree should play.
Logged

a-k-
Level 1
*


View Profile
« Reply #90 on: January 13, 2020, 12:03:12 PM »

After looking at this I imagine your home is very tidy and cozy. Lol, this is a really cool concept that anyone who is considering a CS degree should play.
Well, the game is very much about minimalism so I can see where you're coming from. I'm glad you enjoyed it! The next levels will demand greater collaboration from the little adversaries, I really hope they can make it past them...
Logged

a-k-
Level 1
*


View Profile
#2
« Reply #91 on: February 13, 2020, 02:58:52 PM »

I've been waiting for this for a long time, and finally the milestone has been reached:


(me no longer ranking #1, courtesy of mapleOwO)

There haven't been many changes besides releasing some new levels as candidates for the next version of the demo, and adding a few hint levels for the existing ones. I'm concerned that by adding levels to the first areas of the game (A and B), the game is becoming harder for new players, so I still need to see how to mitigate that.

But hey, now with the competition in the leaderboards, I can step away from the developer position and enjoy my game as a player for a few moments...
« Last Edit: February 13, 2020, 03:43:13 PM by a-k- » Logged

a-k-
Level 1
*


View Profile
« Reply #92 on: February 29, 2020, 01:38:19 PM »

A few updates to the game, while I'm still in the process of finalizing the levels for the next version:

New scoring system

The new system better unifies scoring according to the nominal values of cost and cycles, and scoring relative to the cost and cycles of "expert" solutions. More details can be found in the playtesting section so I won't repeat them here, just mention that players get more nuanced scores than before when they improve their solutions.


(a new histogram in the Level Complete screen; lower scores are aggregated in the leftmost bar.)

Players% per achievement

The % of players that unlocked each achievement is now shown in the Records screen. Due to the trivial "solve a level" achievement, players that unlocked only one achievement aren't that interesting so they are discarded in the calculation. There's no specific second achievement that players unlock, which means that only the first achievement gets 100%.


(8.5/12 bars ~ 70%)

Definition-->use

When the player hovers a worker that gets assigned to in the code, arrows show where it is used. And vice versa - hovering a worker that gets used in the code displays arrows from the relevant assignments to that worker.


(I wish IDEs had this.)

This is not exactly a new feature, previous versions have already made those workers bold upon hovering. But now that I've added the arrows, it looks almost like a useful feature and not one that I've added solely for my own enjoyment...
« Last Edit: February 29, 2020, 01:57:35 PM by a-k- » Logged

a-k-
Level 1
*


View Profile
« Reply #93 on: March 14, 2020, 05:41:50 AM »

A few updates about the version that was released 2 weeks ago, and a recent UI enhancement:

Difficulty histograms (sort of)

A new "pie chart" is displayed in Level Select, dividing the players that started the level according to their accomplishments:


(left: basic info; right: extended version shown to players that "rooted" the level (i.e. solved it with unpermitted commands or workers))

Players that didn't complete the level are split to two groups according to whether they did succeed to solve any of the following levels ("skipped the level") or not ("attrition"). I've cut some corners to simplify the implementation, and unlike the cost/cycles/scores histograms, this one is not necessarily updated in real-time when the player completes a level, so it may appear a little broken for new levels (actually, so are the achievement histograms.) And some old players are intentionally excluded (e.g. me).

"Optional" levels

From the start, the game has allowed players to skip levels:


(some examples and limitations; colored levels are playable, green=completed)

In practice, however, it seems that players don't tend to skip levels they don't succeed in and continue with the game. Two levels, in particular, had exceptionally high attrition (25-30%). Both were already supplied with hint levels and the easier alternative of solving them using root, but those features weren't too popular among beginners either.

To address that, I replaced some levels with stripped-down versions that cover only the essentials in a simplified form. The original versions were kept, but placed in branches that can be considered optional, and the level selection algorithm was modified to suggest them only much later in the game progression.

For new players, these changes restore the beginning of the game to what it was like in the first demo, which was optimized for getting up to speed with the 6 commands and with loops by playing only 16 levels. Except that the two levels that were responsible for most of the attrition in the early game are now gone.

Super-extended demo

This version adds 12 levels, for a total of 34 (not counting 15 hint levels):
- 3 levels - simplifications of existing levels
- 4 levels - area C (loops)
- 4 levels - new area D (nested loops)
- 1 level - new area E

Most of the new levels had already been released throughout the previous weeks so I was able to get some feedback. Many hint levels were added across the board. The version now includes 15 achievements and 4 languages.

In one case, I had to take away a few workers from an existing level after mapleOwO found a backdoor that didn't require multiple loops (applied a technique from a more advanced level, which has been removed since then). That change made all previous solutions to the level "rooted solutions". Consequently, some players started getting complex scores for the first time even though they hadn't intentionally rooted any level, which was undesireable. I haven't found any better alternative since then, so the change remains intact.

Secondary mouse button

The secondary mouse button, which has been reserved for future use since forever, can now be configured to delete commands or exchange workers/Y/N.


(various options; 1 & 2 are implemented)
Logged

a-k-
Level 1
*


View Profile
« Reply #94 on: March 21, 2020, 01:46:19 AM »

After struggling with this for a long time, I've finally decided the progression concept for the mid game. Consequently, many unneeded dependencies between levels in area C onwards have been eliminated, resulting in more branching and more optional paths.

Updated levels map:


(in white: two levels with a fan out of 4)
Logged

a-k-
Level 1
*


View Profile
« Reply #95 on: April 04, 2020, 12:31:14 PM »

As described in a previous post, the HTML5 version of the game is hosted on my server and actually runs from there even when players play the game on itch.io. In the last weeks, that has led to a few issues:

1. Despite the small download size (4 MB), during certain hours of the day the game would take minutes to download instead of a few seconds. Apparently a consequence of COVID-19, the situation has deteriorated over time, rendering the game unplayable:


(56K dial-up?)

Last week I migrated the server to a different region that resolved the issue for me, but of course the results may vary across the globe. Shall I introduce a CDN just for a few megabytes?


2. The latest version of Firefox introduced a stricter "feature policy" for 3rd party domains that broke the fullscreen button in the settings screen when the game was played on itch.io. Looking into it, I realized that the button hadn't been working for Chrome users too, for similar reasons and for a long time.

Unfortunately, when I published the game on itch.io, I set the frame size to a small 4:3 area and didn't enable their built-in fullscreen button. While still playable, the game is much better in a wider aspect ratio, where players can view the "localized" translations. As a workaround I changed the settings to more sensible ones, but a few days later itch.io deployed a fix that allows 3rd party domains to initiate fullscreen so now everything seems to be working again.


3. The latest version of Safari started purging the browser local storage automatically for 3rd party domains, after 7 days of inactivity. This means that players that run the game from itch.io, wait a week, and then return to the game, will discover that their savefile was wiped out.

I could advise Safari users to launch the game from the game's website instead of itch.io (which btw would have helped for the fullscreen issue too), but the topic of browser history getting cleared is more general. The HTML5 version already allows players to save their savefile to a local file to mitigate that, but I guess nobody actually does that...

Logged

tague
Level 0
**


View Profile WWW
« Reply #96 on: April 04, 2020, 09:14:39 PM »

Looks awesome! I will say, there's a lot of clicking / skipping / waiting that needs to be done to get between levels, though - maybe just add a button to hop right to the next level once you're done one!
Logged
a-k-
Level 1
*


View Profile
« Reply #97 on: April 06, 2020, 02:06:41 PM »

Looks awesome!
Thank you!

I will say, there's a lot of clicking / skipping / waiting that needs to be done to get between levels, though - maybe just add a button to hop right to the next level once you're done one!
Yeah, I guess there are too many screens... Which transition would you add as a shortcut?


(omitting some transitions from Level Select)

As for having to wait, have you tried any of the following?



Update: to make navigation between screens easier, the HTML5 version now supports the forward/back mouse buttons - but only when launched from the game's website. itch.io is excluded because the implementation involves hijacking the browser's back button...
« Last Edit: April 07, 2020, 09:00:46 AM by a-k- » Logged

tague
Level 0
**


View Profile WWW
« Reply #98 on: April 07, 2020, 09:00:41 AM »

Which transition would you add as a shortcut?

I think a way to jump directly from the 'Success' state of one level to the beginning of the suggested next level (without waiting for the tally of cycles or bothering with the main screen of challenges) would be nice.

Though since I made that reply I've kinda gotten hooked and the wait hasn't bothered me much anymore!

As for having to wait, have you tried any of the following?

Yep! Found them after I made the reply, they speed things up a bit!
Logged
a-k-
Level 1
*


View Profile
« Reply #99 on: April 07, 2020, 09:06:33 AM »

I think a way to jump directly from the 'Success' state of one level to the beginning of the suggested next level (without waiting for the tally of cycles or bothering with the main screen of challenges) would be nice.

Though since I made that reply I've kinda gotten hooked and the wait hasn't bothered me much anymore!

That's great Smiley
My main concern with skipping Level Select is that players may not be aware that they can skip a level they have problem solving, or ignore the suggested level altogether. Actually, I'm trying to think of ways to make these options more apparent...

(Additionally, I've just updated the previous post with something that may help you navigate screens more easily if you use the mouse.)
« Last Edit: April 07, 2020, 09:32:17 AM by a-k- » Logged

Pages: 1 ... 3 4 [5] 6
Print
Jump to:  

Theme orange-lt created by panic