🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Moe progress update.

Published June 09, 2007
Advertisement
For whatever reason, the threat of financial troubles (or perhaps the frugality that it promotes) provides programming motivation. At work I'm picking up Java for a project and as a general alternative to C++. At first glance it seems to be less good than I expected. I expected C# with some nuances. While the language itself sort of fits into that regard, the ancillary stuff in the process of turning design doc into running software is not close to C# niceties. There's also the fact that C# stuff 'does what you expect' for the most part and it's nuances are a bit deeper (delegate behavior is a common one for me). Java's seem to be more shallow (string operator + does concatenation but == doesn't do value equality?!?)...


And Moe got hours of work this evening. It's nice to look back on my code and think that much of the stuff is particularly elegant rather than horrid. Wonder when that happened...

Anyways, added a test map renderer, which is still broken. It did turn up a few incomplete things. Added turn messages, added parser switching for client commands once they join the game, added a quit to the screen, changed the game to run in psuedo-fullscreen (window the size of the screen on top) by default, realized that network communication sent along create messages for new objects but did not link them up! (oops) so fixed that and added code to handle discovery, added a quit to the console, added an ascii tree dump for game objects (and linked into console).

Next small step is the test renderer, then summary screens, then extending game objects, then turn processing, project stuff; lots yet to do before it's even vaguely playable. At least you'll be able to chat freely...
Previous Entry Ouch.
Next Entry Screenshot?!? wtf?
0 likes 4 comments

Comments

Swattkidd
Erm not sure what you mean by value equality but == does test to see if two things are equal in Java

for example

if(1 == 1)
{
System.out.println("the two equal signs DOES value equality or w.e lol");
}
June 09, 2007 02:23 PM
Telastyn

    public static void main(String[] args) {
        String moocow = "moocow";
        String moo = "moo";
        String cow = "cow";
        String mooandcow = moo + cow;
        
        if(moocow==mooandcow){
            System.out.println("yay, equal.");
        }else{
            System.out.println("wtf?!?");
        }
    }




wtf?!?


...
June 09, 2007 11:53 PM
Swattkidd
Thats because your comparing strings..

to compare strings you have to do

if(string1.equalsIgnoreCase(string2)
{
blah blah
}

but for numbers and all that, this works.
if(a == b)
{
}
June 10, 2007 07:33 PM
Telastyn
Yes, hence my qualifier that having string operator + do what's expected whilst string operator == does not is, to be polite, inconsistent.
June 11, 2007 03:31 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement