How do I use w3schools or learn coding?

mrangel kindly revealed a huge coding explanation website at
https://textadventures.co.uk/forum/quest/topic/jue4u7tdj06fgq4ap5n53q/trying-to-change-the-inventory-pane
But I did not want to hijack that thread and go off topic, so I post a new topic instead.

Quick link to w3schools:
https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp


First of all, I am completely stuck and do not know how to use that website or learn coding from other websites.
Eventually, I realized that is because textadventures is using a completely different set of coding possibly ASLX which is not taught at other websites.

So, yes, it is possible to learn ASLX from quest documentation.
But I got a gut feeling that it doesn't teaches everything, as every time a coder or mrangel speaks, my head goes blank.
I am unable to understand why this advanced code is more advanced, more efficient, more easier to do or what does the code means.

Note: Yes, it's a spring tensor distribution algorithm implemented using bubble sort. As much as I'd like to do it more efficiently, every method I could think of ends up being way more complex thanks to the interesting quirks of Quest's data scructures.

https://textadventures.co.uk/forum/samples/topic/qlq41v0lkky5hlf_rnk5sw/silly-way-to-do-page-numbers-quest-gamebook
Holy, what is spring? what is tensor? what is distribution? what is algorithm? what is bubble sort?

Because I do not understand advanced coding, I cannot modify, upgrade or create a better coding or evaluate the efficiency of a code.

foreach (object, GetDirectChildren (room)) {
if (HasInt (object, "x") and HasInt (object, "y") and not Contains (game.pov, object)) {
object.visible = (object.x = game.x and object.y = game.y)
}
}
floorlist = FilterByAttribute (GetDirectChildren (game.pov.parent), "prototype", Floor)
if (ListCount (floorlist) = 0) {
// do whatever you wanted to do if there isn't a floor here
thisfloor = CloneObjectAndMoveHere (Floor)
thisfloor.x = game.x
thisfloor.y = game.y
}

https://textadventures.co.uk/forum/quest/topic/igcf62bri0ovenfu0aapwg/how-to-create-infinite-maze

Holy, what is foreach?, what is hasint? what is floorlist? what is filterbyattribute? what is thisfloor?
Okay, I understand each of the definition can be found in quest documentation, but it does not explains it well enough.

  1. Why use this method?
  2. Why is this method more efficient?
  3. When do I use this method?
  4. Which coding methods works well with which coding methods?

At the very beginning, I have only known if else loop.

Over the years, I have understood more concepts with mrangel's help like
game.pov (Player.)
this.parent (Teleporting.)
this.visible (Purchase/sell, kill/respawn.)
a little bit of parser command (Parser games.)
pixie's library (Most efficient npc conversation and possibly detective style games.)

But I feel like I am missing out on something, something like a "coder style" or efficiency guide or "other methods besides if else loops".


Log in to post a reply.

Support

Forums