Monkey

Discussion in 'Game Development (Technical)' started by joe, Mar 6, 2011.

  1. joe

    joe
    Original Member

    Joined:
    Sep 28, 2004
    Messages:
    420
    Likes Received:
    0
    I just started playing around with the new language by Mark Sibly: Monkey.

    It's seems like a great tool if you want to reach multiple platforms like HTML5, iPhone, Flash, Android and/or XNA.

    To get used to it I wrote a small asteroids clone in around 4 hours:
    http://www.intermediaware.com/blog/1141

    The api/mojo framework does lack in a lot features right now, but I'm guessing that the community will improve and create new libs they already done with BlitzMax.
     
  2. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    WHAT!! it was out already since 5 days!!
    Bah I was following his blog, I thought he would announce it there first... going to download it :)
     
  3. Desktop Gaming

    Moderator Original Member Indie Author

    Joined:
    Feb 24, 2005
    Messages:
    2,296
    Likes Received:
    12
    Teach you. :D

    Had a play with it over the last few days and its quite good. It is lacking in some features but its quite early days yet, and updates are frequent (there's been two already).
     
  4. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    I tried it and is quite good, not as good as python that I'm used too, but still acceptable.
    I think as it is now works better to make webgames than other platforms. Still is great because you can do flash games without getting insane with the worst language ever created (AKA, AS3).
    I suspect 15 lines of monkey gets translated into 500kb of AS3 useless verbosity :D
    (joking, but not even too much!)
     
  5. lennard

    Moderator Original Member Indie Author

    Joined:
    Jan 12, 2006
    Messages:
    2,390
    Likes Received:
    12

    AS3 has a lot of issues but I don't see bloat as being in the top 20... 500K would be an immense program - Dungeon Brawl weighs in at 95K total.

    I played the asteroids demo and found it really slows down with a little bit of action on the screen.

    Does anybody know if Monkey can communicate with server code?

    When it compiles for iOs what is it outputting?
     
  6. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    the demo is in HTML5 - so obviously much slower than flash :)
    it outputs C code to iOS AFAIK
     
  7. lennard

    Moderator Original Member Indie Author

    Joined:
    Jan 12, 2006
    Messages:
    2,390
    Likes Received:
    12
    Does that mean you then have to compile the output with some iOs C compiler?
     
  8. lightassassin

    lightassassin New Member

    Joined:
    Nov 21, 2009
    Messages:
    191
    Likes Received:
    0
    The HTML5 demo is interesting, in Firefox it runs pretty bad (3.6.15 or similar) while Chrome (just downloaded for testing, so newest non-beta) and it runs way better.

    I guess HTML5 isn't the best example to test with, I'm very curious to see the iOS, Andriod and win/*nix/mac versions. There is a game already been done in flash, Zombie one and it runs quite well (being flash).

    Interesting to watch, might finally be a excellent alternative to Unity for the 2d space. I'm curious to see the 3d stuff as well.
     
  9. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    the awesome thing of Monkey is that you code using its basic OOP syntax and then it translates it in the target platform language.
    So you get AS3 on flash, js on HTML5, C for iPhone/Android, bla bla bla.
    You need to have all the SDK/requirements for each platform though, so you need to have a mac with xcode and all the crap stuff needed to make the iphone game, or for the XNA you need the xbox360/windows7 phone, and so on.
     
  10. Indiepath

    Indiepath New Member

    Joined:
    Aug 22, 2004
    Messages:
    999
    Likes Received:
    0
    Not straight out of the box. I've written a module for ASYNC server comms but it only works with HTML5 at the moment (** Just added Flash) - I'll be knocking out code for the other targets as I get the time.

    http://www.monkeycoder.co.nz/Community/posts.php?topic=137
     
    #10 Indiepath, Mar 7, 2011
    Last edited: Mar 7, 2011
  11. joe

    joe
    Original Member

    Joined:
    Sep 28, 2004
    Messages:
    420
    Likes Received:
    0
    HTML5 Canvas isn't very fast yet. I've also compiled a Flash-Version of my demogame (http://www.kongregate.com/games/JoeManaco/asteroidgame).

    I'm sure that browsers will soon be faster in rendering canvas elements.

    And yes, monkey just translates the monkey-code to the target code (c, flash, js...), and then it uses a compiler to create the binary (Flex SDK, XCode...).
     
  12. bantamcitygames

    Administrator Original Member Indie Author Greenlit

    Joined:
    Jul 27, 2004
    Messages:
    1,731
    Likes Received:
    78
    @lennard - I was wondering the same thing about the server code. I could imagine writing a decent MMO client with this if it had that capability.
     
  13. Cartman

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    618
    Likes Received:
    0
    I converted some of my Sudoku code into it last night. It is similar to BlitzMax but there is still a long way to go on it.

    Some of the things that have currently tripped me up:
    1. Multidimensional arrays are handled like Javascript. Kinda confusing if you are not used to it.
    2. ASC is not available so I had to do some conversions.
    3. Error messages aren't very helpful in many circumstances. You need to know what you are looking for.

    One good thing is that when it says there is an error in a specific line in your code, it is always on that line. No hunting around to find out what line they really mean.

    Noone has made any frameworks for games yet, so it's still early but it's showing alot of promise. I'm going to convert some of my simpler games to it and see what it can do.

    As far as cost. The Monkey is $120. No license fees, or any other costs in the future. That's it. And Ziggy has produced a great Windows IDE for it called Jungle which goes for roughly $55.

    http://www.jungleide.com/

    If Grey Alien could produce a game framework like he did for BlitzMax, I would by that in a second.(hint, hint)
     
  14. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    Firefox 4's performance is closer to Chrome's. Opera is also comparable to Chrome.

    With those latest and greatest browser JavaScript is pretty fast. Unfortunately the drawing performance is still lacking and even seemingly simple things (which are usually free) like rotations are very expensive.

    E.g. 0° is fast, 180° is ok, and 90° or 270° are super slow. Not cool.

    Of course these issues will disappear with hardware acceleration, but so far hardware acceleration is kinda buggy. Even if you got a top notch GPU and the very latest drivers.

    Surprisingly, even Audio is somewhat troublesome. I mean, seriously... how hard can it be? But right now all browsers struggle with it. There is high (randomized) latency, issues with short samples, and in Chrome (even 11) it's so bugged that it goes completely silent after a few minutes.

    However, I'm certain that most of those issues will disappear in the next couple of months.
     
  15. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,797
    Likes Received:
    0
    I will indeed be doing that BUT I have to ship my current game first mid-April. That's enough time for the early kinks to be worked out hopefully.
     
  16. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    haxe?

    How comes nobody is mentioning haXe? Except XNA (which requires the still-under-development C# generator), you can already create stuff for the platforms mentioned using haXe.

    And haXe is free, open source, mature and already used to develop stuff for the platforms it supports.

    I think people do not appreciate the stuff they get for free and want to pay for them instead (*notes this down for future reference*)
     
  17. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    How works debugging in Haxe?
    I have to say that from my first impression, looks like debugging in monkey is going to be a real nightmare. I cannot imagine people doing complex projects with that... unless they like to suffer :D
     
  18. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    Mostly depends on the target platform's debugging capabilities (i assume Monkey is the same). For C++ targets (iOS, Android, Windows, Mac, Linux) you use a native debugger like GDB or DDD and native profiler like GProf or Shark. For JavaScript you use whatever your browser provides (such as Venkman for Firefox). For Flash i have no idea (which is slightly ironic since the Flash target is what i'm mostly using haXe for :p). But i've seen debugging buttons/menus in FlashDevelop (which i promptly never used :p) so you can probably use that.

    Personally i always use carefully placed traces :p
     
  19. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    But shouldn't a great tool let you debug inside it, rather than have you debug externally? not saying it's easy, but without a good debugger or break/edit/continue or the python reload, the coding time required to make a game increases exponentially... :(
     
  20. electronicStar

    Original Member

    Joined:
    Feb 28, 2005
    Messages:
    2,068
    Likes Received:
    0
    This seems to be a good option for HTML5 (but HTML5 seems to be at least a year from being interesting for a serious use). Could be interesting for android, although I'm not sure it's not simpler to just use the android sdk.
    As for the other conversions, it's not interesting. For flash I'll stick with flixel, Xna, is just fine by itself, etc...
    I'm not sold on the "devellop once and deploy on 100 wildly different devices" concept that everybody seems to be pursuing these days...
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer