Results 1 to 2 of 2

Thread: Coding a DD turn-based game using Ext

  1. #1
    Ext User
    Join Date
    Jul 2008
    Location
    Silicon Valley, CA
    Posts
    3

    Default Coding a DD turn-based game using Ext

    I was actually in the process of writing a thread for the help group but as I was typing in the description of the problem I was able to see the solution. So I thought that I would at least introduce myself instead.

    I am new to Ext and somewhat new to JS. I have been a Java developer for nearly 10 years and have tweaked JS/CSS for different projects, but this is my first attempt at a full blown JS application. I have looked at the different libraries (Dojo, YUI, MooTools, and a few others) but really like the flexibility and extensibility of Ext.

    I have the simple mechanics of the game working (initializing the board, dragging pieces, validating movement, etc) and am now getting into more complex design - ajax, working with validation on the server-end, and then AI. I am sure that I will be posting questions or lessons learned soon.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Quote Originally Posted by anotherhale View Post
    I was actually in the process of writing a thread for the help group but as I was typing in the description of the problem I was able to see the solution.
    That's often the way. Once you start to analyze things and serialize them into a narrative, you see where you go wrong. Anyway, well done on figuring out this complex area of Ext.

    Quote Originally Posted by anotherhale View Post
    So I thought that I would at least introduce myself instead.

    I am new to Ext and somewhat new to JS. I have been a Java developer for nearly 10 years and have tweaked JS/CSS for different projects, but this is my first attempt at a full blown JS application. I have looked at the different libraries (Dojo, YUI, MooTools, and a few others) but really like the flexibility and extensibility of Ext.

    I have the simple mechanics of the game working (initializing the board, dragging pieces, validating movement, etc) and am now getting into more complex design - ajax, working with validation on the server-end, and then AI. I am sure that I will be posting questions or lessons learned soon.
    Welcome to the forums, and I look forward to seeing what you've been doing. I'm sure with years of OO java behind you, you will like the structur of Ext's classes.

    The worst gotcha when migrating your mind from Java to Javascript is the concept of scope.

    When you specify a function as a callback, even if you specify this.memberFunction, no reference to any "this" is passed. All you sre sending is a function reference. A bit like a reference to a java.lang.reflect.Method. You usually have to specify a scope option which is the first parameter to what would be invoke in Java, but is apply in Javascript.

    Apart from that, you'll have no problems at all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •