Author
|
Topic: Raph is no longer taunting us (Metaplace) (Read 566529 times)
|
Alkiera
Terracotta Army
Posts: 1556
The best part of SWG was the easy account cancellation process.
|
Umm...Java, C, C++, C#, Javascript among others, none have if/elseif/then constructs. (Particularly the "then")
The LUA syntax looks a lot more like Pascal that something more heavy-duty and modern. There is also a distinct lack of {...} in favor of "end"
The syntax is Lua's biggest downfall. It is a *wonderful* embedded language. Very light, clean, easy to integrate. Clever little VM and runtime environment. The pascal-ish syntax is a little gross, but probably the most obnoxious thing is: foo.bar(foo) vs foo:bar() The latter is syntactic sugar for the former and it is *really* easy for people writing scripts to get them mixed up and end up with really odd results that can be frustrating to debug. - Q Sure it's just sugar? I recall one language, may have been lua, where obj.method() differed from obj:method() in that the former threw an error if obj didn't have a method(), but the latter did not error, just did nothing. If that is lua that I am recalling, that could be even worse than just being sugar. -- Alkiera
|
"[I could] become the world's preeminent MMO class action attorney. I could be the lawyer EVEN AMBULANCE CHASERS LAUGH AT. " --Triforcer
Welcome to the internet. You have the right to remain silent. Anything you say can and will be used as evidence against you in a character assassination on Slashdot.
|
|
|
Quinton
Terracotta Army
Posts: 3332
is saving up his raid points for a fancy board title
|
The syntax is Lua's biggest downfall. It is a *wonderful* embedded language. Very light, clean, easy to integrate. Clever little VM and runtime environment. The pascal-ish syntax is a little gross, but probably the most obnoxious thing is:
foo.bar(foo) vs foo:bar()
The latter is syntactic sugar for the former and it is *really* easy for people writing scripts to get them mixed up and end up with really odd results that can be frustrating to debug.
Sure it's just sugar? I recall one language, may have been lua, where obj.method() differed from obj:method() in that the former threw an error if obj didn't have a method(), but the latter did not error, just did nothing. If that is lua that I am recalling, that could be even worse than just being sugar. It is sugar, but I would have preferred if the language was more explicit about it, because it's really easy for people to make mistakes due to two rather similar forms with rather important differences. It's easy for experienced programmers to get tripped up by this, but worse, your target audience for embedded scripting languages in games is often people without much (or any) programming experience who are likely to get even more confused. - Q
|
|
|
|
naum
Terracotta Army
Posts: 4263
|
DL'ed Lua and played with it a little… …haven't really written anything other than toy programs…
Two things struck me though…
* Array indexing begins at 1, not 0 as is the case for every modern language… …what a throwback to FORTRAN/COBOL days…
* Definitely not OO as Ruby/Python, must use String.somefunc instead of invoking method directly on a "string" object, for example… …will take getting used to…
Tables seem to fill the role, serving like PHP/JS "duck typed" arrays that can do simple integer arrays to holding complex "object" graphs… …and there seems to be a way for persistence, though according to Meatplace forums, there'll be a web services setup to shuttle data back and forth between templates…
|
"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
|
|
|
tmp
Terracotta Army
Posts: 4257
POW! Right in the Kisser!
|
* Array indexing begins at 1, not 0 as is the case for every modern language… …what a throwback to FORTRAN/COBOL days… You can start them with 0 if you want. * Definitely not OO as Ruby/Python, must use String.somefunc instead of invoking method directly on a "string" object, for example… …will take getting used to…
That'd be because default strings are simple data types with no built-in methods, so you use library of functions called 'string' to manipulate them. But it's like saying Python isn't OO because you have to use math.sqrt(9) rather than 9.sqrt()
|
|
|
|
Soln
Terracotta Army
Posts: 4737
the opportunity for evil is just delicious
|
LUA does have easy filestream functions, whatever they call it, so you can save/retrieve scores and small amounts of data easily. The WoW chat scraper guys, like Thotbot, auction, and-everything-else-Wow-macro, do just thus that no matter the single file size (and every macro in WoW is loaded with the client only at startup, so you don't really noticea delay). Something like a friends list probably could be saved easily. LUA is not "robust" robust and I'm skeptical about having 3rd party connection libs -- Oracle, Sybase are hard and last look, not free. I see Sean Riley in his meatplace blog post (of the Pyhon Dev Game books?) notes that "persistence" is on the roadmap so TBD. We will have to see. In the meanwhile, what you can do with LUA is probably perfect for small webby games. No problem with flat file persistence and good enough for good games. I could see Peggle done well this way and that would right on. But not the full "web mmo" M3mnoch who works with Areae though now was working on a year ago. Edit: Rails. That will be what they offer. Nvm.
|
|
« Last Edit: October 15, 2007, 07:45:42 AM by Soln »
|
|
|
|
|
naum
Terracotta Army
Posts: 4263
|
Edit: Rails. That will be what they offer. Nvm.
Rails?
|
"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
|
|
|
Righ
Terracotta Army
Posts: 6542
Teaching the world Google-fu one broken dream at a time.
|
|
The camera adds a thousand barrels. - Steven Colbert
|
|
|
naum
Terracotta Army
Posts: 4263
|
Yes I am well acquainted with RoR… …odd, though, the mix of scripting languages, choosing of Lua because it's lightweight but then RoR which is extremely bloated, a memory hog, full of a lot of cruft a game app doesn't need…
|
"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
|
|
|
Righ
Terracotta Army
Posts: 6542
Teaching the world Google-fu one broken dream at a time.
|
extremely bloated, a memory hog, full of a lot of cruft
I believe that that is a trend, not only in gaming. :)
|
The camera adds a thousand barrels. - Steven Colbert
|
|
|
Samwise
Moderator
Posts: 19323
sentient yeast infection
|
I don't see any mention of Ruby on metaplace.com -- I think Soln meant that Metascript provides the same sorts of handy web app functions that Ruby on Rails does, making it Lua on Rails.
|
|
|
|
Yegolev
Moderator
Posts: 24440
2/10 WOULD NOT INGEST
|
This thread certainly is interesting, but I'm more interested in getting to the actual tools.
As for if statements, I am very partial to do_this if its_true; do_this unless its_true;
I'm not a programmer.
|
Why am I homeless? Why do all you motherfuckers need homes is the real question. They called it The Prayer, its answer was law Mommy come back 'cause the water's all gone
|
|
|
naum
Terracotta Army
Posts: 4263
|
* Array indexing begins at 1, not 0 as is the case for every modern language… …what a throwback to FORTRAN/COBOL days… You can start them with 0 if you want. * Definitely not OO as Ruby/Python, must use String.somefunc instead of invoking method directly on a "string" object, for example… …will take getting used to…
That'd be because default strings are simple data types with no built-in methods, so you use library of functions called 'string' to manipulate them. But it's like saying Python isn't OO because you have to use math.sqrt(9) rather than 9.sqrt() Yes, but consider that expressions are so much more elegant and simpler with Ruby/Python model… …instead of String.somemethod(str) you say str.method… …chain 2 ore more together and one is so much more expressive and compact compared to the other...
|
"Should the batman kill Joker because it would save more lives?" is a fundamentally different question from "should the batman have a bunch of machineguns that go BATBATBATBATBAT because its totally cool?". ~Goumindong
|
|
|
Venkman
Terracotta Army
Posts: 11536
|
This thread certainly is interesting, but I'm more interested in getting to the actual tools.
As for if statements, I am very partial to do_this if its_true; do_this unless its_true;
I'm not a programmer.
I'm a case man myself. And also not a programmer. But don't let me near Lingo or Actionscript if you value your project :)
|
|
|
|
Yegolev
Moderator
Posts: 24440
2/10 WOULD NOT INGEST
|
I do very bad things in practice, because I'm not a programmer. Like: something&&something||(something&&something);
I did end up rewriting something I did like that because of a very elusive gap in the logic. Since I'm not a programmer, I don't feel bad about writing things like that. I expect my MetaPlace game to be completely unmaintainable, even by me.
|
Why am I homeless? Why do all you motherfuckers need homes is the real question. They called it The Prayer, its answer was law Mommy come back 'cause the water's all gone
|
|
|
Venkman
Terracotta Army
Posts: 11536
|
Sounds like I'm the same way. Worse, I only remember how do to something when I learned how to do it, and only then when I needed to learn it. I've picked up code six months later and ended up scrapping it because even the comments I wrote were gibberish :)
|
|
|
|
tmp
Terracotta Army
Posts: 4257
POW! Right in the Kisser!
|
Yes, but consider that expressions are so much more elegant and simpler with Ruby/Python model… …instead of String.somemethod(str) you say str.method… …chain 2 ore more together and one is so much more expressive and compact compared to the other...
Perhaps, but if I understand it right there's nothing that stops you from implementing custom string datatype in lua that acts like a class, holding 'native' strings and providing common manipulation functions as part of item itself -- then you can use str.method with these as much as you want. It's not as much a difference in 'syntax model' or whatever, but rather difference in default implementation of one particular datatype.
|
|
|
|
Samwise
Moderator
Posts: 19323
sentient yeast infection
|
I haven't used Lua, but when it was suggested that it doesn't actually have "method" functions as such, the reason for "foo.bar(foo) = foo:bar()" syntactic sugar became immediately clear; to make a "method" you make the first argument to the function the "this" object, and then you call your function with the ":" syntax to have it look and act like a method call. I suppose I should actually go run myself through a Lua tutorial instead of just talking out my ass, though.  If I ever get into the Meatplace alpha I expect it might come in handy.
|
|
|
|
Soln
Terracotta Army
Posts: 4737
the opportunity for evil is just delicious
|
I don't see any mention of Ruby on metaplace.com -- I think Soln meant that Metascript provides the same sorts of handy web app functions that Ruby on Rails does, making it Lua on Rails.
yup exactly, or else they might include wrapper-like things for it. Digg people still brag about RoR for their backend, so I figured it might be the first thing they include. We shall see...
|
|
|
|
Quinton
Terracotta Army
Posts: 3332
is saving up his raid points for a fancy board title
|
I haven't used Lua, but when it was suggested that it doesn't actually have "method" functions as such, the reason for "foo.bar(foo) = foo:bar()" syntactic sugar became immediately clear; to make a "method" you make the first argument to the function the "this" object, and then you call your function with the ":" syntax to have it look and act like a method call.
Yup, exactly. Having used it for a few little projects, I've decided that having methods by syntactic sugar rather than the standard way to interact with things leads to a lot of mistakes. Overall, I wish it was a bit less meta, had a bit more consistent syntax, and felt a bit more like C/C++/Java than Pascal (though the latter is just a personal preference). - Q
|
|
|
|
Morat20
Terracotta Army
Posts: 18529
|
I do very bad things in practice, because I'm not a programmer. Like: something&&something||(something&&something);
I did end up rewriting something I did like that because of a very elusive gap in the logic. Since I'm not a programmer, I don't feel bad about writing things like that. I expect my MetaPlace game to be completely unmaintainable, even by me.
That drives me nuts. I go crazy with paranthases to make sure it's parsing my logic EXACTLY how I want. (Also, so I can tell at a glance what I'm doing, even six months later). I still shudder over the time I tried to monkey with a Perl script almost a year after I wrote it. That's when I started commenting my work.
|
|
|
|
Stephen Zepp
Developers
Posts: 1635
InstantAction
|
I do very bad things in practice, because I'm not a programmer. Like: something&&something||(something&&something);
I did end up rewriting something I did like that because of a very elusive gap in the logic. Since I'm not a programmer, I don't feel bad about writing things like that. I expect my MetaPlace game to be completely unmaintainable, even by me.
Heh...pretty anal about parens myself--in fact, in my code that would look like: if ( (something) && ( (something) || (something && something) ) )
Just to keep it straight in my own head. Of course, I changed the actual logic of your example to demonstrate my anal-ity, but I think you get the point :)
|
Rumors of War
|
|
|
Samwise
Moderator
Posts: 19323
sentient yeast infection
|
something&&something||(something&&something); Personally, I would just write that as: Practically speaking the compiler will just optimize it for you anyway, but I prefer not to leave these things to chance.
|
|
|
|
Yegolev
Moderator
Posts: 24440
2/10 WOULD NOT INGEST
|
Ho ho!
I'm even too lazy to do a lot of work on my examples. I did throw you guys a bone, though, since the majority of my variables are the two-letter type.
As for comments, I figure if the compiler/interpreter can figure it out, so can I.
|
Why am I homeless? Why do all you motherfuckers need homes is the real question. They called it The Prayer, its answer was law Mommy come back 'cause the water's all gone
|
|
|
Stephen Zepp
Developers
Posts: 1635
InstantAction
|
Ho ho!
I'm even too lazy to do a lot of work on my examples. I did throw you guys a bone, though, since the majority of my variables are the two-letter type.
As for comments, I figure if the compiler/interpreter can figure it out, so can I.
Is your real name Dave Moore? (totally insider Torque joke, sorry!) Example of an actual debug assert message built in to Tribes 2 (and therefore Torque for quite a long time): "If you see this, go slap Dave Moore".
|
Rumors of War
|
|
|
Samwise
Moderator
Posts: 19323
sentient yeast infection
|
I recall some apocryphal story about a Fortran compiler that in certain circumstances would instruct you to find someone named Rob and kick him in the nuts.
|
|
|
|
squirrel
|
Is your real name Dave Moore? (totally insider Torque joke, sorry!)
Example of an actual debug assert message built in to Tribes 2 (and therefore Torque for quite a long time):
"If you see this, go slap Dave Moore".
Lol. That reminds me of an error a buddy of mine built into an order processing system we worked on years ago - "If you see this, Darryl owes you a beer."
|
Speaking of marketing, we're out of milk.
|
|
|
Morat20
Terracotta Army
Posts: 18529
|
Lol. That reminds me of an error a buddy of mine built into an order processing system we worked on years ago - "If you see this, Darryl owes you a beer."
I got tasked with doing a code inspection a few years ago on an older system. I found a giant section (at least a hundred+ lines of code) commented out, and replaced by maybe 20 lines of code, along with the comment along the lines of "Jesus, I'm glad we fired that idiot" -- only with more obscenities.
|
|
|
|
Stephen Zepp
Developers
Posts: 1635
InstantAction
|
Nice to see similar stories, hehe.
Since I mentioned his name publicly, I should note that Dave Moore was brought in to "get 'er done" on Tribes 2 in a lot of areas, and his code accomplishes very successfully what it was intended to accomplish: meet a publishing deadline successfully. The code itself is fine, it's just that his implementation methodology was aimed at a closed source game in very tight deadlines--he simply wanted to know as soon as possible if asserts were hit, and his messages accomplished that because the testers came right to him.
It only becomes funny when it's 6 years later and no one has even heard of DMM or Dave Moore ;)
|
Rumors of War
|
|
|
Kaa
Terracotta Army
Posts: 53
|
I still like the classic "You are not expected to understand this." best :D
Kaa
|
|
|
|
Grand Design
Terracotta Army
Posts: 1068
|
You should find and hire a new, unsuspecting Dave Moore.
|
|
|
|
Samwise
Moderator
Posts: 19323
sentient yeast infection
|
HEY! I haz serious question, if any Areae people are still around in this thread.
What about version control? Will Metaplace have built-in versioning for all the pieces of Metascript/Lua that make up a game? If not, how hard would it be to "sync" it all down to a local PC? Is it possible to run a Metaplace "server" locally so you can do development on your machine (with proper versioning and all that) and upload it when it's done?
I ask because I was just picturing using the web-based tools to make a game and realized that I couldn't see any obvious place to stick my own version control system in there. And the idea of working on any project that takes more than a day to complete without decent version control for the whole thing scares the bajeezus out of me, especially if you have multiple people collaborating on one project.
|
|
|
|
Samwise
Moderator
Posts: 19323
sentient yeast infection
|
I think I might have found my answer to this one -- there was a similar question posed in this thread on the MeatForums, to which the most informative reply was "we're just beginning our very first stage of Alpha testing, which means lots can change." I'm going to interpret that as meaning they haven't figured out yet what they're doing about that. 
|
|
|
|
Righ
Terracotta Army
Posts: 6542
Teaching the world Google-fu one broken dream at a time.
|
I still like the classic "You are not expected to understand this." best :D
I have a sweatshirt that quotes that (along with the code). (this has many subtle implications)
|
The camera adds a thousand barrels. - Steven Colbert
|
|
|
Raph
Developers
Posts: 1472
Title delayed while we "find the fun."
|
I need a shill, so I don't feel like one posting about updates here. But anyway, many of your biz type q's are answered in today's blog post.
|
|
|
|
Salamok
Terracotta Army
Posts: 2803
|
I need a shill, so I don't feel like one posting about updates here. But anyway, many of your biz type q's are answered in today's blog post.
I'll be your shill in exchange for alpha access.
|
|
|
|
|
 |