24

I've been playing Code Combat in order to learn about programming in JavaScript. I think it's been very helpful (similar to a typing game, in teaching a real world skill).

Are questions related to challenges within these games better suited for gaming.stackexchange.com or stackoverflow.com?

The games discussed on gaming.stackexchange.com are not as relevant to helping people get around coding challenges.

Example question:

In Code Combat I have an object (a character named Tharin). I control him by calling

this.moveUp();
this.moveDown();
this.moveLeft();
this.moveRight();

when I'm writing code out to move him, I have to repeat those methods.

this.moveDown();
this.moveDown();
//etc.

Is there any way I can write a line of code that would repeat the action "n" times?

9
  • 2
    Merely not stackoverflow.com :-/ ... Commented Sep 24, 2014 at 23:07
  • 1
    @πάντα, yup, but I'm split... this may be on-topic on gamedev. Commented Sep 24, 2014 at 23:08
  • 1
    @FrédéricHamidi Just what I said ;-) ... Commented Sep 24, 2014 at 23:09
  • 2
    reasonable to say you're in the realm of StackOverflow proper. Gaming is focused on gaming and the related storyline of the games(one question reads "How do I get rid of corpses?" ). I think you're oK on StackOverflow You're not really playing a conventional game, it's a programming tutor disguised as one. Commented Sep 24, 2014 at 23:12
  • Can you be more specific about the nature of the question you'd like to ask? It's not quite clear what you mean by "related to challenges within these games". Could you maybe even give us a sample question here?
    – jscs
    Commented Sep 24, 2014 at 23:18
  • @Coffee: Why did you delete your answer and repost it verbatim as a comment?
    – jscs
    Commented Sep 24, 2014 at 23:18
  • 13
    This question seems like it would answer itself, given sufficient time and effort with an actual programming tutorial. Commented Sep 24, 2014 at 23:52
  • @RobertHarvey: I'm proposing that video games can be a valid medium for a programming tutorial whether simple or complex. Beat This Level, Get A Programming Job Commented Sep 25, 2014 at 0:52
  • 6
    Simple? Not really. The answer for your hypothetical question would be easily found if you tried to look, and therefore would be downvoted into oblivion if asked. Plenty of lazy people asking easily answered questions. Don't be one.
    – user1228
    Commented Sep 25, 2014 at 13:11

1 Answer 1

35

The sample question you've provided is indeed a programming question, and as such fits Stack Overflow's topic matter rather than Gaming.SE's. Coding tasks are coding tasks, regardless of their origin.

I don't know anything about this game, but if you were asking something more along the lines of "Getting a perfect score in level 3" or "Where do I buy a laser for my robot?", that would be on-topic for Gaming.

That said, you should be aware that askers on Stack Overflow are generally expected to have a certain minimum amout of knowledge about what they're doing, and to have looked into their problems thoroughly before posting. While questions about difficulties you have with tutorials are welcome in theory, in practice coders who are just starting out are better served in an environment that supports a back-and-forth discussion, rather than Stack Overflow's Q&A.

As Robert Harvey mentioned in a comment, your example question -- although it shows curiosity, perception, and enthusiasm, which are priceless -- is exactly the kind of thing that the tutorial is likely to teach you.

In short, while you can ask this kind of question on Stack Overflow, I would recommend waiting until you've progressed beyond a few different tutorials and maybe a book -- to the point where you're writing your own stuff more or less from scratch -- before you engage Stack Overflow as a problem-solving resource.

2
  • 5
    Can't upvote this enough. Every word is spot on. Commented Sep 26, 2014 at 10:34
  • It is worth noting that there are a lot of questions about things like "untrusted" including the technical aspects of how to write code to achieve a specific goal - gaming.stackexchange.com/questions/tagged/untrusted. I would imagine that most things that come out of these games will be a bit too basic for SO personally (asking how to write a loop for example in a language I would expect to not be well received given any basic tutorial would answer the question).
    – Chris
    Commented Sep 26, 2014 at 14:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .