Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 04:44:12 AM

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


View Profile
« Reply #100 on: April 08, 2020, 07:23:38 AM »

.
Logged

a-k-
Level 2
**


View Profile
« Reply #101 on: April 08, 2020, 07:26:29 AM »

How to avoid feedback on itch.io in 7 steps:

1. Port your work-in-progress game from PC to HTML5.

2. Realize that in the browser, the Esc key you use as a shortcut exits fullscreen, and change it to Tab.

3. Support IE11.

4. Discover that sometimes in IE, pressing Tab causes your game to stop receiving keyboard events, and ensure that you always have the keyboard focus with this little gem:

gameCanvas.addEventListener('blur', function(e) { setTimeout(function() { gameCanvas.focus(); }, 0); }, false);

5. Wait a few years until you no longer remember that you assumed your game was the only interactive element on the page.

6. Publish your game on itch.io to auto-run inside a frame, enabling the comments section as if you were inviting feedback.

7. Don't test the functionality that itch.io provides on your page - it's for users not developers.

Now, whenever someone attempts to interact with anything on your itch.io page that's not a link, for example the 'write a comment' field, the page will immediately scroll up all the way to the top and your game will regain control of the keyboard focus. Mission accomplished!
Logged

tague
Level 0
**


View Profile WWW
« Reply #102 on: April 08, 2020, 09:13:00 PM »

Now, whenever someone attempts to interact with anything on your itch.io page that's not a link, for example the 'write a comment' field, the page will immediately scroll up all the way to the top and your game will regain control of the keyboard focus. Mission accomplished!

That's beautiful.
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #103 on: April 08, 2020, 10:09:13 PM »

Oh wow. And since nobody could tell you you never found out Cheesy
Logged
a-k-
Level 2
**


View Profile
« Reply #104 on: April 11, 2020, 01:28:39 PM »

That's beautiful.
Some create beautiful art, others - beautiful bugs...

Oh wow. And since nobody could tell you you never found out Cheesy
Exactly. Fortunately there's this forum here! The game has been made so much better thanks to feedback, I'm always amazed that the supply of low-hanging fruits never ends.

---
A few low-key updates:
- The thousands separator and decimal point are now localized.
- As preparation to the PC versions, the server maintains information about the distribution of client versions.

Following the I/O degradation that led me to relocate the game's server, I've added a hourly task that calculates the expected download times of the game from several regions, to be displayed to players while the game is loaded:

Quote from: the loading screen
1 sec (Frankfurt, London), 3 sec (Newark, Toronto), 4 sec (Atlanta), 5 sec (Fremont, Mumbai), 6 sec (Dallas), 7 sec (Singapore, Tokyo), 10 sec (Sydney)

The estimates are calculated by simply uploading 1MB from my server to those of a competing VPS provider (after some warmup), and multiplying by 4 to reflect the total download size and number of requests. It's a bit naive - the typical player may not have the bandwidth of a cloud provider, so it's probably more of a lower bound.
Logged

a-k-
Level 2
**


View Profile
« Reply #105 on: April 26, 2020, 08:03:03 AM »

New itch.io HTML5 flow

When the game detects that it runs inside an <iframe>, the flow changes as follows:



The advantages are:
- Savefile is first-party cookie not third-party (so Safari won't wipe it after 7 days)
- Windowed mode uses the entire window, not the fixed-size <iframe>
- Forward/back mouse buttons are hijacked for game navigation
- As before, the game still auto-starts (less friction), and communication with my server is same-origin (less susceptible to adblockers' false positives)


Scoring, root and more

- Levels are scored relative to the best solutions of everyone, not only me
- Rooting a level (i.e. using unpermitted commands) is encouraged for levels in which it can lead to higher scores, and root-specific stats are shown for those levels
- Optional levels are indicated as such in Level Select
- Leaderboard displays areas and languages per player, verified at server:


(uppercase=fully completed, lowercase=completed at least 1 level)

- Faster Testing and Level Complete animations + related tip (following tague's feedback)
- Refinement of 2 achievements to make them more general and easier to unlock


New levels, achievements and languages - lots of new content, will post about this shortly.
Logged

a-k-
Level 2
**


View Profile
« Reply #106 on: May 29, 2020, 12:00:26 AM »

Embedded leaderboard on itch.io:

The itch.io page now displays a leaderboard that updates in real time (a snippet from the full one that's available on my website). I took the idea from here, except that instead of a PNG it's simply an HTML table embedded inside an SVG as a <foreignObject>.


(recently added: # of keywords)


Bonus for selected players:

Players that contribute new cost-cycles metrics that affect scoring (there are currently 12 such players, though many are no longer active) will have their Level Complete/Stats screens depict the scoring thresholds and the tradeoffs between them:


(in this level, 2 out of 4 thresholds have been contributed by players)

Additionally, for all players, changes in score of past solutions due to updated scoring thresholds are now elaborated in the Verification screen.
Logged

a-k-
Level 2
**


View Profile
« Reply #107 on: June 13, 2020, 09:32:00 AM »

HTML5 enhancements for long-term play

The HTML5 version now supports saving progress to a file and loading it also in private browsing mode. This already worked in Chrome out of the box, but in order to support browsers that disable IndexedDB in that mode (Firefox/MSEdge/Safari), I added a fallback to Emscripten's in-memory filesystem and modified the loading flow to temporarily use sessionStorage*.

In addition, the browser will prompt the player when the game is closed without saving progress. This is activated only for players that solved at least 5 levels or unlocked 2 achievements.

* Old Safari versions disable sessionStorage in private browsing (11+ should be OK), and IE11 wipes it when pages are reloaded. Loading will not work in those cases.


Welcome script

The Welcome screen that comes right after the mini-game now features a script that scrolls from the bottom and analyzes the structure that the player interacted with.


("show don't tell", in SQL)
Logged

a-k-
Level 2
**


View Profile
« Reply #108 on: July 03, 2020, 08:31:22 AM »

A seventh language has just been added to the demo, and now INTERCAL-speaking players can finally feel at home!


(a solution to a hint level and its translation to INTERCAL and J - two opposite extremes of wordiness)

I really rushed it out this time so the translation is not as optimal as I could possibly do:
  • Politeness (the compiler rejects programs that are either not polite enough, or too much) - currently, the correct amount of "PLEASE" words is added starting from the bottom, but now it feels better to me to prefer littering them over control flow statements than actual commands.
  • Only after I implemented a restricted use of "COME FROM" did I learn that it is more powerful than I had initially thought. It can jump "forward", so is not limited to loops, and can also affect the targets of conditional jumps. This means that I can use it in more cases to save a line or two - at the expense of readability (which is actually a plus in INTERCAL...)
  • Error messages could adopt the compiler's jargon.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #109 on: July 03, 2020, 12:34:42 PM »

Well, that's something I never expected to encounter in a game context  Cheesy
Logged
a-k-
Level 2
**


View Profile
« Reply #110 on: July 05, 2020, 12:24:44 PM »

Well, that's something I never expected to encounter in a game context  Cheesy
It needs to be a game also for the developer!
(Actually, it already is - I don't have the maximal scores for all levels, as some players have submitted more optimal solutions for a few levels that I haven't succeeded to achieve or surpass yet.)
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #111 on: July 06, 2020, 01:22:28 AM »

Heh, might end up learning some novel coding tricks this way Wink
Logged
a-k-
Level 2
**


View Profile
« Reply #112 on: August 06, 2020, 12:09:45 PM »

Server data report

Players can now view the server data that's associated with their savefile from the About screen. Since the report is textual, solutions are displayed in the (previously-internal) format that's used by the client and the server for representing programs as graphs:


(a solution and its canonical representation, abstracting away the layout of commands on the grid)

In terms of implementation, the server's report doesn't include the solutions as is but only salted hashes thereof, and the client translates them back based on the solutions it already knows. This is actually done for all types of information. As a side effect, obsolete data that may exist in the DB (e.g. achievements that the player had unlocked but were later dropped from the game) is also included in the dump, so some veteran players may still notice a few leftover hashes in their report.


Upgrade notifications

In order to notify the player of the need to upgrade the game:
- A message is displayed in Level Complete/Stats if the results of server verification of solutions to the level (score or metrics) differ from the client's.
- Similarly, a message in Level Select if the visible part of the server's level map doesn't match what's shown on the screen.

For the latter, the client fetches level map information from the server on startup and whenever it detects that the server was restarted. Specifically, for each level, the client gets a hash of its successor levels, hint level (if exists) and certain properties of the level. In Level Select, the client compares those hashes for the levels that are playable, and ignores mismatches on levels that are not.

This means that instead of a generic "a new version is available" message, the player is notified only when an upgrade can actually make a difference given their current progress in the game.
Logged

a-k-
Level 2
**


View Profile
« Reply #113 on: August 07, 2020, 01:12:32 AM »

Heh, might end up learning some novel coding tricks this way Wink
You know, I really tried to make common programming practices less applicable in this game, so if you learn anything, it cannot not be novel... Only near the end of the game (the X levels) is a new mechanic introduced that enables you, for example, to easily implement DFS (which you can do before, but it's not worth the trouble). So I feel that the challenge for me now, in terms of level design, is to stay true to the original spirit despite players' having much more power.
Logged

a-k-
Level 2
**


View Profile
Go
« Reply #114 on: August 22, 2020, 02:49:11 AM »

Go

I've recently noticed that when the levels are played in the default order, without skipping or changing routes, there's a gap of 15 levels between unlocking Pascal and Python. That's in the first third of the game, where a lot of mechanics are introduced, so maybe it wasn't an issue, but anyway, I went straight to implementing a new translation that would unlock in the middle:


(Go translation, demonstrating multi-level/labeled continue)

Implementation-wise, this wasn't a very interesting feature, and I was reminded why I hadn't originally wanted to add too many C/ALGOL-like languages - for players too it may just feel "more of the same". So now I'm looking for a more unusual language (just like Common Lisp and J), to fill a similar gap in the second half of the game. That may not be easy - the need for goto eliminates many modern options, and when considering esoteric languages, those usually lack support for subroutines. We'll see.


Naming

We've already had the demo, the extended demo, and the further-, greatly-, hugely- and incredibly-extended demo versions. Now I'm out of adverbs. Should I finish this game?
Logged

Sp1ke
Level 0
***


Mike


View Profile WWW
« Reply #115 on: August 22, 2020, 06:30:11 AM »

Wow wow wow!!! One in kind!
Logged

a-k-
Level 2
**


View Profile
« Reply #116 on: August 22, 2020, 07:26:12 PM »

Wow wow wow!!! One in kind!
Thank you! Esoteric features for the win Smiley
Logged

a-k-
Level 2
**


View Profile
« Reply #117 on: August 29, 2020, 06:10:35 AM »

This may be the beginning of a new game:


(0-9, a-h = room (18 types); - = tunnel (invisible); # = special encounter)
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #118 on: August 29, 2020, 10:17:23 AM »

A very cryptic game :p
Logged
a-k-
Level 2
**


View Profile
« Reply #119 on: August 30, 2020, 12:28:26 PM »

A very cryptic game :p
Yeah, I'm currently just playing with algorithms, but in the end, creating the UI that will make this more accessible to the player is going to be the real challenge.


(a map, with colors in the form HSL(60°K, 1.0, ...))
Logged

Pages: 1 ... 4 5 [6] 7 8 ... 14
Print
Jump to:  

Theme orange-lt created by panic