Javascript book for gaming?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shaselai
    New Member
    • Jan 2010
    • 7

    Javascript book for gaming?

    I am trying to create an online game with others and javascript is a key part of it... I know java but not javascript - any suggestions for good books toward online gaming development? I have listed a few below i searched online.. any suggestions to any? thanks!

    Professional JavaScript for Web Developers (Wrox Programmer to Programmer) by Nicholas C. Zakas

    Head First JavaScript

    Learning JavaScript, 2nd Edition by Shelley Powers

    Learning PHP, MySQL, and JavaScript: A Step-By-Step Guide to Creating Dynamic Websites (Animal Guide) by Robin Nixon

    Beginning JavaScript by Paul Wilton and Jeremy McPeak

    Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett (Paperback - Dec 30, 2009)

    Beginning Scripting Through Game Creation by Jeanine Meyer (Paperback - Jan 25, 2008)
  • larztheloser
    New Member
    • Jan 2010
    • 86

    #2
    Most books about online game development do not center around Javascript. If you are looking to create the next runescape, do not use javascript. It is too slow. Given that you are developing this project with others, it sounds like a bigger project that maybe java or flash would be better suited to (and you'll find more books).

    If it's a small, simple game with no sound requirements then you probably don't need specilised knowledge of how to build a game in javascript. Javascript is a very simple language which can elegantly manipulate an HTML page. As long as you have a clear idea of what needs to be manipulated, and when, any javascript book should give you the tools you need to do it.

    If your game has more complex graphics requirements, you would be better off using something like jQuery. jQuery books are also available but I've never used it. The jsDraw2D and Walter Zorn graphics libraries draw non-standard shapes, such as curves, using javascript (which jQuery doesn't do) but to use them you'll need some basic javascript knowledge anyway.

    So if you really need to use javascript, I would say any of the below books but especially those which deal exclusivly with javascript because these usually go into more detail.

    Comment

    • shaselai
      New Member
      • Jan 2010
      • 7

      #3
      thanks for input. Well we are doing a browser game and isnt javascript good with not reloading etc all the time? and the game is not going to be graphics intensive as well either. Is there some major hurdles with javascript? and is flash better all around?

      Comment

      • larztheloser
        New Member
        • Jan 2010
        • 86

        #4
        True, javascript doesn't need to reload all the time. Neither does flash, for that matter, or java. Javascript is slow on graphics and so on - especially if you want to draw lines or curves (as opposed to boxes and pictures). The other "major hurdle" with javascript is the lack of sound support. Sure, you could use an <embed> tag, but not all browsers support this. Also, none of these languages can actually do anything server-side. Using technology called AJAX, javascript can read files from the server but not write them - so if you want a "persistent " game people can return to, you'll need at least some CGI or PHP or ASP.

        Personally, however, I prefer javascript to flash because:
        • it's free
        • it's easier to learn, in my opinion
        • code is simple to manage, as it's a single script and not a load of behaviors attached to objects
        • you can intergrate it with your HTML code easily, forms look natural because they're HTML etc


        So yeah, if it's small and simple, go for it!

        Comment

        • shaselai
          New Member
          • Jan 2010
          • 7

          #5
          it's prob ably wont be small or simple - it will be served with goal of hundreds/thousands players play simultaneously in one session. but there will be no sound and it will be low graphic so i guess java script still decent?

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            When you say playing simultaneously, do you mean multi-player? If so, you will need some server-side code too. What is the game supposed to do, i.e. how complex is it? If it's going to be quite complex, you may need to look at memory, efficiency, performance, code size, page load time, etc.

            PS. most of those books are general books, not necessarily geared towards gaming.

            Comment

            • shaselai
              New Member
              • Jan 2010
              • 7

              #7
              yes i mean multiplayer. Basically players all play on the same map and there will be server side coding needed (in php/mysql). Javascript will be the front end stuff. The game is basically you build towns and fight eachother using different units. but we think java script will be good for the front end? If those books might not be good do you have a suggestion for another? thanks

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #8
                well, looking at your book list, JavaScript for Beginners may not be enough, since OOP might be better suited here (although that depends on the complexity of the script). I think, you should use a framework to write the code.

                points of interest:
                • what is OOP (what can it do and what not)
                • JavaScript objects & the "this" keyword
                • interfaces, DOM & Events
                • prototype based inheritance
                • Closures
                • AJAX

                Comment

                • shaselai
                  New Member
                  • Jan 2010
                  • 7

                  #9
                  OOP you mean object oriented programming right? Yeah we are going to have to use AJAX since we dont want to reload all the time. DOM also came up in our discussion as well.

                  what about:
                  Professional JavaScript for Web Developers (Wrox Programmer to Programmer) by Nicholas C. Zakas

                  Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett (Paperback - Dec 30, 2009)

                  Beginning Scripting Through Game Creation by Jeanine Meyer (Paperback - Jan 25, 2008)

                  ? I think the first 2 focuses on related technologies i will be using - html, css and web. The last book i am not sure how it will fare....

                  Comment

                  • Dormilich
                    Recognized Expert Expert
                    • Aug 2008
                    • 8694

                    #10
                    well, I can’t really help you with books, because I never really used one.

                    Comment

                    • shaselai
                      New Member
                      • Jan 2010
                      • 7

                      #11
                      any good sites you found very good for beg-adv? There are a lot of sites to go through heh...

                      Comment

                      • Dormilich
                        Recognized Expert Expert
                        • Aug 2008
                        • 8694

                        #12
                        I’ve been reading quite a bit at A List Apart. the other stuff is just googling for articles/blogs having advanced topics … and then practice.

                        Comment

                        • acoder
                          Recognized Expert MVP
                          • Nov 2006
                          • 16032

                          #13
                          Check out some of the links in the Offsite Links sticky thread. One that is always recommended is MDC.

                          Comment

                          Working...