#Advanced Tutorial

49 messages · Page 1 of 1 (latest)

frank prism
#

We are considering adding more tutorial challenges for advanced topics. They would allow players to work on some additional coding challenges and game mechanics to better understand the game. They will be a separate, optional part of the Tutorial, organized by topics.

What topics do you personally feel we need to include in the Advanced Tutorial?

polar shore
#

YES! I love tutorial!

well, everything!

  • ranged mass attack
  • more building
  • matrices
  • searches for paths with strict timelimits
  • ramparts
  • breakable walls
  • various structures like more towers, expansions etc
  • more actual combat bots to fight
  • the more the better!
#

I'd also love tutorial to be launchable as Tests. In bulk. It could serve as unit tests for my codebase. Whatever changes I've made, at least fixed neverchanging tutorial should be passing.

carmine basin
#

-using a cost matrix to path through destructible structures
-how to use flee flag / basic kiting
-extensions
-towers
-pull mechanics
-defensive building ( building some ramparts to survive/ hold off an attack)

silent surge
#

Fleeing from the enemy creeps could also be there, since we discussed it in another channel.

thick loom
#

Building a distance map and drawing it

carmine basin
#

Oooh ya, a tutorial on visualizations in general would really help new players debug

#

-Concurrent actions

narrow heron
#

Maybe a tutorial for each of the arenas that season. Just to build code that can beat idle system in each of them, so a new player has their hand held slightly on each arena if they need it

#

I know the actual tutorial kinda does that in parts, but just pulling it together for that arena, maybe you did tutorial last season and came back to no code saved, or just need a little bit of boilerplate to build on

flat violet
#
  • Pathfinding (moveTo, findPath, searchPath, CostMatrix etc.)
frank prism
limber meteor
#

It probably is enough, though I never even really looked at it.

#

(Until, like, yesterday)

#

But that's because CtF had radically changed from when I wrote my code for it and I went back actually read the description properly 🙂

narrow heron
polar shore
#

I've seen that starter code in each arena description, it helps formalize actual goals of arena. Reading it in code rather than in text.

I can't say I approve of codestyle though:
var myCreeps = getObjectsByPrototype(Creep).filter(creep => creep.my);
good, they are properly creating a variable

const energySource = creep.findClosestByPath(getObjectsByPrototype(Source));
oh god why are they creating constants in cycle!

sometimes they even let variables be

And we are lacking code examples for Advanced :) maybe that's what Juha meant, give all examples :)

narrow heron
#

I just didn't think of the samples as complete code, I 100% just thought it had like two lines of code for the objective to showcase the arena gimmick 😅

polar shore
#

But anyway I want examples to give insight.
Like seeing it cover some corner case that's not obvious (like rma can't damage walls). I want it, and advanced tutorials to be "oh, I never thought of it this way, wow!"

and basically ideally, after I've completed advanced Tutorial, I should know of EVERY thing game has to offer. Pulls, matrices, building, blocking and cancelling spawn, it doesn't have to cover every technique like building long flying snake is not necessary. But at least every method that is a part of executing that snake must be covered. This way I won't be surprised "oh, tower can heal?! oh, rangers can massattack?!"

but I just love tutorials, maybe it's just me :) well, it's "advanced" for a reason, make it nerdy and lengthy, why not!

limber meteor
polar shore
#

proper languages like php has zero keywords for declaring variables. Javascript used to be ok with having just one, var qwe, and now it's insanity having three different keywords for declaring variables. Do that in TypeScript, they like overcomplicating stuff, add 7 different new var keywords there, I don't care.

limber meteor
#

Tough.

#

PHP is a shitty language, partly for that reason.

#

var is awful and it was essentially replaced and deprecated for good reason.

polar shore
#

lol it is not replaced at all. I use it, screeps use it in tutorials.
Some hipster consts lets are creeping into screeps tutorials from time to time, but it's manageable.

#

having to think even when creating variables, no thanks

#

I don't like thinking

thick loom
#

You should not use var except as a global

#

Everything in a function should be let or const

#

And from a practical standpoint, everything can just be let

#

But this reminds me of something new players could really use

#

A starter engine

#

It would do basic things like grab various objects into lists and have an attack and a move section

#

The attack section can even have each creep attack whatever's in range

polar shore
# thick loom You should not use `var` except as a global

yeah I've investigated this question thoroughly, and I'm positive I should use specifically var, always. Except when it's important to like curry(or whatever it's called) for (let i++) { ()=>i*2 }

I'm not into thinking
I'm not into hipster stuff
I'm not into "const" that is not actually a const wtf

and if my code suffers because of var quirks, that's my code issue, not var issue. Just write it properly lol, follow uncle Bob's advices. Write code for people, not for robots.

thick loom
#

If you don't want to think, then you should use let

limber meteor
#

Eh, it's a game. Do what you like, not what's good 🙂

polar shore
#

I like doing what's best though :)

thick loom
#

Otherwise you will get random bugs that make no sense because a var collides with another and does something unexpected

#

Not give you an error

polar shore
#

"a var collides with another"
how shitty my code must be for it to happen

thick loom
#

Just not give you the intended behavior

polar shore
#

so far during my entire life the only thing I've encountered is that for (var i++) { ()=>i*2 } this arrow function instances each return same latest i value. I thought it snaps local environment the moment it created. And in my worst dreams I couldn't imagine it passes int byRef!!! like wtf welcome to ugly JS.

when I'll become senile and will redeclare my variables, I'll maybe reconsider. I'm not there yet.

#

And it makes me happy that we are on the same wavelength with screeps devs, since they don't appear clueless at all, yet they use var too.

flat violet
polar shore
#

how about stopping passing ints byref first lol :)
classic "we had 14 standards, it's a problem, let's make best standard!.. outcome: now we have 15 standards". Introducing x3 variable declarations way is not the way lol :)

flat violet
polar shore
#

I understand. That's why I proposed using typescript for such experiments instead.
Plus they've introduced a bunches of different breaking stuff, like "strict" whatever it is, it changes rules of the language. Could have changed rules for var for strict just as well.

ok they had to make this hard reallife choice. What happened to them why they had to make a pair to let, the const which is not a const?

limber meteor
#

Closures are not "passing by ref"