-<= Notepad =>-


#1

Hi,

I would like to submit an idea.
I dream of having a wonderfull item : a notepad.
My hero got all the function books (all 3 of them), but she really wants to be able to write it’s own book, with new spells.

So this new item, the “notepad” could be just few sheet of blank paper where she can copy past the new functions she creates. So she can put it with the books in a new place that we could call : the library (trumpet please).
This way, functions should be available accross levels, helping us to build better and nicer code based on these functions we could improve days after days. It could avoid to duplicate code everywhere (copy/past is bad :imp: ).

It’s really something I miss, and I’m too lazzy to use an external editor to do that by myself (shame on me).

As we learn how to write function, it could be a great time to introduce such a tool.

Thanks to listen to me to the end,
Regards,
Vettax the ancient.

PS : I’m still retaining myself to request again a correct debugger has we could have had on some of the first old levels, but I don’t know if I’ll retain long :wink:


Feature suggestion: User-created functions
Priority targeting
Personal library?
#2

I like myself the idea. But I’ll be the devil’s advocate here. I don’t think this would be great to be able to edit it. When I see some of the quality of coding new coder can do, I think it’s better for them not be able to store poorly written code, with poor formating. It might work for non complex code, but will accumulate bugs or errors along their journey.

However. I’d like to have a preformated spellbook with standard writting ready to copy paste. This is exactly what I think a Scribe could do, and I like the ingame book idea to do so.

Example page 1 :

if ( condition1 ) {
    statement1 ;
} else {
    statement2 ;
}

with a design ressembling (2sec google search, imagine more CodeCombat-esque and less Beauty and the beast) :


#3

In fact I was thinking of simple function only, like the one we have to wrote in “Vital powers”.
Ex :

this.kill = function(mytarget) {
    if(mytarget) {
        if (this.isReady("bash")&&(mytarget.health>100)){
            this.bash(mytarget);
        } else {
            this.attack(mytarget);
        }
    }
};

This my own method, and I’m able to customize it for my needs based on the weapons I have. For this kind of simple method, I really think each player need to build his own. But it’s not a real good programming practice to rewrite it each time we need to fight against an enemy. Learning own to build our own lib and reuse as much as we can seems to me a good think.

About formating, I’m agree with you. Something is missing to help players to learn it. A good point could be to have a bonus for correct code formating, but it’s maybe very hard to implement. Maybe just a magic button to reformat the code could help…


#4

Can’t agree more. I’d love to have this for me too. I rewrote countless time the same lines again and again through the campain. But I know repetition is good learning. It’s not pleasant, but it’s efficient.

I don’t like the learning behind a magic button. I think level creators are doing fine showing some well formated code already. I think when the times come, levels will be harder (in a few months) and will adress a intermediate level of coding with functions. Still I understand you, and I also would like a “User manual” for each weapons that provides sample codes, exactly as you provided above.


#5

But shouldn’t finding a good external editor (with code highlighting, say) be a beneficial external step in the learning?


#6

To be honest, I know how to program for more than 10 years now, and I still don’t have a good jack-of-all-trades code editor / compiler. I never felt the need for that, and I’d be glad to know what’s best to program in JS, because for now I’m programming in google API mostly and it doesn’t have the best editing tools. Learning code and having a good environment to program in are two separate things. Some editors could be pointed out by CodeCombat, but I don’t expect learners to search to improve their (potentially poor) programming environment by themselves.


#7

We are tracking the issue over here: https://github.com/codecombat/codecombat/issues/2444


#8

I’m a hobby coder, but I also struggled with rewriting the code every time… so I started saving the level codes in text files on my pc. I also store the frequently used snippets in separate files (like collectCoins.py). I also started using a simple external editor (notepad2), because the game’s editor window is rather small for the later levels. I thought about using pastebin, so I could access my code from anywhere, but didn’t bother to do that (yet).

All that said, I fully support the idea of a built-in notebook/spellbook, where we could save our own code!


#9

I used to keep my code in a textfile (or three) on my computer. Now I use github. I can access them from anywhere and they are completely private.