• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
fir

whats this? javscript/ga

28 posts in this topic

when trying to learn a bit javascript canvas game tehnology 

on the bottom of the code i found something like

 

 

 

   <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 
      ga('create', 'UA-50885475-1', 'playfuljs.com');
      ga('send', 'pageview');
    </script>
  </body>
</html>
 
would someone able to explain me ehat it is, if as im writing a canvas game should paste it myself
or what, and a bit what this script is doin (how it is workin line by line)
?
 
tnx
 
0

Share this post


Link to post
Share on other sites

allright that was very helpfull, Could you say meybe a bit more, :  if this is some script that collects some information ehen he is storing it, and how me as a webpage owner can use this information (just for curiosity), also would it slow a canvas game or its page or not at all?

0

Share this post


Link to post
Share on other sites

allright,

could I maybe ask here few of some simple javascript related questions?

Im trying to understand some thing if some could answer some question it would be helpfull

 

Im trying to quickly analyze such code 

https://github.com/hunterloftis/playfuljs/blob/master/content/demos/raycaster.html

but my knowledge is little (an i had not to much time to learn it,

but would like to understand it as far much as possible)

 

one is - 

 

if si got some page with two scripts like here <script>  </script> <script>  </script>, which one is running first? is one firing the another or what? could someone explain? (if so tnx, )

 

the second would be 

 

 var MOBILE = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)

 

- whats this? its looking very strange (as for m c ground man)

Edited by fir
-1

Share this post


Link to post
Share on other sites

From your responses, it is unclear if you're even trying to research these topics at all.
 

trying to research it myself is not my methodology today - sometimes it is more effective to talk with somebody who knows that - and im looking for such place here [there are some reasons for that, (if you just call me lazy you may totally miss some point, really, though its probably to long to explain this thing )  ]

Edited by fir
-13

Share this post


Link to post
Share on other sites

Google search: HTML script tags order of execution

Google search: navigator.userAgent

 

that was a bit helpful but as i do not know html/javascript those link do not say me much - navigator i dint understood at all, as to script tags, they say that they are executed sequentially what if there is a game in the first which has a loop so it do not ends, then the second is never called?

-4

Share this post


Link to post
Share on other sites

 

trying to research it myself is not my methodology today - sometimes it is more effective to talk with somebody ho knows

Well, typically you have to pay money if you want someone to walk you through everything. If you want free help from the Internet, you'll run out of volunteers quickly unless you demonstrate you've made some attempt to do your own research.

that - and im looking for such place here [there are some reasons for that, (if you just call me lazy you may miss some point, though its to long to explain ) ]

There is lots of brilliant information that someone already went to great lengths to create just waiting for you to find it. I've no problem if you cannot find such information after making an honest search (provided you mention the kind of searches that weren't fruitful), or if you cannot understand the information when you do find it (provided it is clear which parts you're having trouble with).

However, being unwilling to do some basic research first is lazy. It wastes not only the time of the people who've already written about these subjects, but also people on these forums (or elsewhere) reproducing such information.

as to script tags, they say that they are executed sequentially what if there is a game in the first which has a loop so it do not ends, then the second is never called?

What have you tried?

 

 

i disagree imo you see it wrong,

 

1. First youre too pesymistic as to this volounteers I have made some talks when people just talked with me and didnt want me to pay me to them (that would be a bit awfull), i also provided help with them - (providing help is not just waste of time if you think so at leas not for me  it helped me to clarify the things too, )

 

2. i know tahat there are tons of materials waiting for me, I can learn it quite easily though It is a last resort for me becouse I just prefer a talk way and cannos spend much time this time on it

 

maybe someone should write a paper "why not to do private research first" (but talk to fellows, this is quite obvious - IMO this attitude to send asker to a google is not so much logically right  as this is often presented - so i just disagree wuth this argumentation 

Edited by fir
-11

Share this post


Link to post
Share on other sites

yet as to my questions: in thic code link i provided there is many sentences like this. (many thises).

 

like here

 

 

  function Controls() {
        this.codes  = { 37: 'left', 39: 'right', 38: 'forward', 40: 'backward' };
        this.states = { 'left': false, 'right': false, 'forward': false, 'backward': false };

      ....

}

 

and many other thises

 

 

What is this this adreessee/receiver? is this canvas or are they refering to different objects here, what it is?

 

what is 

 

Controls.prototype.onTouch = function(e) {

 

does this mean tat this function is a method of some object called controls? and this in this method refers to controlls?

 

that would be helpfull, tnx

-3

Share this post


Link to post
Share on other sites

I'll take that as a "no, I haven't tried anything".

As someone who has put much time into volunteering to help many people on these forums and elsewhere, I believe my opinion is more informed than yours on this matter. However, this is derailing the thread, so I'll speak no more about it.

 

not a problem :)

0

Share this post


Link to post
Share on other sites

fir, you should probably first learn the basics of javascript before diving into canvas stuff etc. As a seasoned js coder I can assure you that you will have many more WTF moments in the future.

 

Most of the stuff you have asked here will be covered in any javascript tutorial online.

 

* Quirks of the *this* pointer

* event handlers

* regular expressions

 

etc etc.

2

Share this post


Link to post
Share on other sites

fir, you should probably first learn the basics of javascript before diving into canvas stuff etc. As a seasoned js coder I can assure you that you will have many more WTF moments in the future.

 

Most of the stuff you have asked here will be covered in any javascript tutorial online.

 

* Quirks of the *this* pointer

* event handlers

* regular expressions

 

etc etc.

 

Im reading it but it goes slowly, answers could speed up the thing a bit 

 

ps. but if you want you can give me some links to such tutorials i will sweep them then

Edited by fir
0

Share this post


Link to post
Share on other sites

Do not bump your posts so soon after your last one, wait at least 24h between posts to give people a chance to reply.

alright, i wanted to say that this questions are still open , If some provide answers i can give maybe two or three yet more on this topic

0

Share this post


Link to post
Share on other sites

 

so, anyone?

Sure.

[spoiler]I often feel like "let me Google that for you" links are a little rude, but I think refusing to do any of your own basic research is worse, so I've made an exception this time. Note that if you had done your own basic research but were just having trouble with these concepts I would have been happy to downs quite a bit of time explaining them to you, but you haven't, so I won't. I can't speak for others, but I expect this may be a contributing factor in why you aren't getting more responses.

You might think what you're doing is ok, but it's generally excepted common courtesy when asking for help online that you should do your own basic research first; that is to say, most people feel differently to you, and if you want the best chance of getting help you need to demonstrate the common etiquette that everyone else expects of you.[/spoiler]

(Posted from mobile, please excuse any small formatting or spelling errors.)

 

I was explaining to that this attitude do a reseach first, its just logically wrong - I very often use the metodology of doin research later (or mixed one when doing research and asking in parallel, and i find it quite reasonable)

 

it is.. depends on situation (often long research can bring you more but sometimes the situation is this kind that you wold like jus a small talk against the heavy research with docs For example in some last thread about android Im very happy with a result of talks - im sorry there is no more such small talks here it could be quite educative IMO

 

at least in begginers forum it should be okay imo

 

much worse i find an answers like "google it" - when someone comes with specific question (that can be found but not al begginers are able to find it quick, sometimes it can take so much effort that he drops it down, ) "google it" is of no help and imo trashes the forum - imo stright answer would be much better and welcome

Edited by fir
-11

Share this post


Link to post
Share on other sites

 

i find it quite reasonable

Almost noone else does though, and there's really nothing objectively more logical about it than the alternative.

Search for how to ask questions online and almost every guide will suggest you do your basic research first.

It's common courtesy, almost everyone else expects it of you, and you simply aren't always going to be able to find the discussion you want to have first if you don't because people will think you are being rude and simply close your topics without responding.


I won't say any more on the topic, but I won't be volunteering any of my valuable free time to help you unless you change your approach and do your own basic research, and I can guarantee you that along with all the earlier members who have told you very similar things the are other members who haven't responded here feel the same. It's your choice.

Good luck.

 

 

 I know its common but I think its wrong.. The opposite, I mean the thing that some fellow just answer you is also present (and i find it okay) As to you feel free not to answer me, nota problem here smile.png

 

(you already not answering this as you say so it is not realy any change)

Edited by fir
-8

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0