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

Login with username, password and session length

 
Advanced search

1380256 Posts in 65803 Topics- by 58195 Members - Latest Member: RinazGames

August 06, 2020, 02:21:11 AM

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


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

.
Logged

a-k-
Level 1
*


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 1
*


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 1
*


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 1
*


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 1
*


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 1
*


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 1
*


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
Pages: 1 ... 4 5 [6]
Print
Jump to:  

Theme orange-lt created by panic