Game Development Community

A Literal Programming Language

by Will Harrison · in General Discussion · 03/28/2005 (11:09 am) · 146 replies

I just had this random thought. I'm not much of a programmer, but wouldnt it be easier if there was a programming language that was basically readable English?


For example, instead of this:

if (John.apples = 5 && Sally.oranges < 3) {
Jason.pears == 7;
}


You would write:

If John has 5 apples and Sally has less than 3 oranges then give Jason 7 pears.



Or in this case:

for (count=1; count<11; count++)
{
steeringWheel.rotate();
}


You could write:

Rotate the steering wheel 10 times.


Object names (steeringWheel) would be case-insensitive and could contain spaces (so you could say "Steering wheel" or "steering Wheel" and they would mean the same thing).... and the definite article "the" (e.g. rotate "the" steering wheel) could be be ignored by compiler.
#81
04/19/2005 (12:22 pm)
Never mind. I was talking about easier languages to develop games with that are also quite capable and Blitz is one of them. If you want to twist whatever I say to make yoursef feel good thats up to you.

Maybe if you stepped back and looked at things without being so sceptical you might be surprised.

To say you can't develop games in torque is stupid, and I never said that. You can make games in any engine, some are going to work better for certain games than others. Just depends what your interested in doing.

I guess I should probably post some decent quality and properly edited footage of my racer at some point when I've finished the current pass on it.
#82
04/19/2005 (12:37 pm)
It's not twisting when you start implying that games made in TGE are all of some low quality. You pointed out the biggest TGE sellers and apparently were lumping them into some "silly cartoonish game" category. All I ever pointed out was that Blitz is a beginners tool. It's a great starting point, but it's not going to be used to make the next Half Life or Doom. TGE, on the other hand, could be used for that as could TSE. They give you full access to the source code which is the underlying engine.

We all have our tools of choice, but you make it sound like Blitz3D is way more full featured than TGE. Your posts have all been implications that TGE lacks something that Blitz gives you. The only thing is that Blitz is for starters and TGE is for devoted game developers. I had to make that same realization when I was saying "well, VB can do anything C++ can... and it's easier to do it." Then people showed me what I couldn't do... I fought and fought, and finally I realized that we all had our favorite tools and the best way to get along was to not slam someone else's tool of choice.

C++ can do things that VB can only dream of. TGE can do things that Blitz will never be able to do. But then again VB can whip an app out in much less time, and Blitz can make a game a lot quicker than TGE.

Just know that statements like:
Quote:I can't think of a single torque game that can't be done fairly easily in blitz.

are going to be challenged.

- Brett
#83
04/19/2005 (12:48 pm)
Heh, most of my compklaints with torque are mostly to do with the art pipeline. Otherwise its very capable. And were talking about indie games generaly. Which aren't AAA quality games.

I don't think either of us are decieved, just look at things from a different perspective. I'm sorry if I don't think too highly of torque games when I compare them to commercial games of today. To be honest I don't expect people to compete with those and I don't expect to compete with them myself.

I don't think any blitz or torque game can stand up to what is AAA today.

this thread was about
Quote:I'm not much of a programmer, but wouldnt it be easier if there was a programming language that was basically readable English?

I think blitz is the closest useable solution there is to that question. Particularly for someone thats more of an artist than coder and wants a good art pipeline to work with. plus the ability to compete with the latest Indie games on the same level on low spec hardware.

I'l just get into trouble if I start posting links and screenshots to blitz stuff, otherwise I would have allready
#84
04/19/2005 (12:51 pm)
@Joe
Quote:from a personal standpoint, I would love to have a 'tweaker' interface for tweaking game play in game, on the fly.. would I want to take the coders on my team away from what they are presently doing in order to do this? no.. not when they are doing hard work in order for the game to look great and get great framerates on pretty low end hardware.

I agree 100%... I don't think any indie developer has the time or inclination to make something like this because once you know how to do it in script, you may as well just make all your changes in script. You have been working in this industry alot longer than me, and you understand TGE better too... I don't... I'm looking at TGE as an observer with limited experience, and saying that new users would really benefit from having more "tweaker" interfaces so they can get results without pulling their hair out trying to understand scripting, searching through the docs, and trying to find tutorials.

I just recently went through the "crossbow.cs" file in the scripts for the TGE demo. I changed "isBallistic = false" to true... and changed some other things, like the "arming delay"... and was suprised to see the results (it was like I made the crossbow into a grenade launcher)... so that was pretty impressive, but I couldnt help wondering how a GUI for changing script properties, etc. would really open up the power of TGE to new users... and also help experienced users to make changes faster.

See if a really new user wanted to do something like this, let me take you through his process:

First, he would have to know where to dig throuh the folders to find this crossbow.cs file:
"C:\Torque\SDK\example\starter.fps\server\scripts"

Then he would have to make the .cs file open in a text editor. "cs" is not normally recognized as being a text type file... so he would have to make a file type association with notepad or whatever he chooses.

Now he would have to search through this file, scrolling down to "datablock ProjectileData(CrossbowProjectile)" where he would find some properties that look relevant to what he wants to do.

Now lets say he wanted to change the arming delay.... he would have to know that its value was in milliseconds and change it accordingly, otherwise he would just have to go through a process of trial-and-error before getting what he wanted... This means saving the script file, launching TGE, checking if it looks good, closing TGE, re-opening the script file, and so on...

Now compare doing all of that to simply having an interface in run-time where you could change these values on the fly and see the results. OMG, that would be 100x easier, and I'm sure you would agree. Remember, I'm talking about new users, but certainly this could benefit everyone as it makes everything faster.

@Bitcrafters,

"Maybe Will only dont have a math thinking"...lol, yeah I'm not good at math. :P
#85
04/19/2005 (12:56 pm)
@Adrian, I understood exactly what you were saying, and it didnt come across to me like you were "slamming" anything... you were just hilighting the benefits of Blitz... I think other people just came into this thread late and took it out of context or something.
#86
04/19/2005 (1:13 pm)
Nope.. I read the whole thread. I just got the distinct feeling that TGE was being knocked down a few pegs when compared to Blitz. And the two provide similar endpoints with different paths. One is simple, the other is complex. With complexity comes flexibility, that's the way I feel.

Now, what does all this have to do with simplifying languages?? Not a damn thing... However, Mark Mozynski pointed out that Dijkstra had already contemplated the complexities of creating such a beast. Further discussion of this is purely hypothetical.. None of us here are going to be able to make a good natural language parser for programming without many years of research, and limitless time to work on it.

- Brett
#87
04/19/2005 (1:23 pm)
Ok back to the topic of Natural programming languages.
The biggest stumbling block thus far, from my watching the AI community develop over the years, is just the fact that human languages, especially english are extremely context sensitive in some cases and not at all context sensitive in others, for instance, both are legal sentences, that mean exactly the same thing.

Quote:
Joe SixPack has a blue dog
Quote:
Joe SixPack's dog is blue

While in some instances switching a single word can make a sentence mean something completely different.
Quote:
Joe SixPack has two dogs
Quote:
Joe SixPack has dogs too

And synonyms, homonyms and a plethora of other "nyms" are yet one more example of why we can't program in a natural human language yet.
Quote:
Joe SixPack ate two dogs too
#88
04/19/2005 (1:32 pm)
My_boat is a new boat
   My_boat goes 25 knots
   My_boat is 5 tonnes
   
   The_marina is located south of The_grocery_store
   The_grocery_store is located on Main_street at the corner of Seventh_street and Hyde_park

   My_boat is located at The_marina
   if My_boat is in the water then The_player can drive it
   otherwise My_boat needs to be put into the water
   ...

Gah... I couldn't imagine writing a game using language like that. It would be too complex trying to figure out the implications of what everything meant. It just seems simpler when you see:

my_boat = new Boat() {
      speed = 25;
      tonnes = 5;
   }

   my_boat.setPosition(0,50,100);
   if (my_boat.cast_ray("0 0 -1", water_mask) == true)
      my_boat.isDrivable(true);
   else
      my_boat.launch();

   ...

- Brett
#89
04/19/2005 (1:36 pm)
>_< - !!!

If you change too with two, obviously it's going to change the meaning of the sentence, lol.

A computer can make that distinction just as easily as you and I can!
#90
04/19/2005 (1:46 pm)
@Brett, your code snippets are not even saying the same things.

In the first one you define where the boat is relative to the marina, relative to the grocery store, and where it is located on what street... and then in the other one, you dont even bother to do the same thing.

That is a poor attempt to make one look more complicated then the other. Shame on you. :P
#91
04/19/2005 (2:15 pm)
Sorry for hijacking your thread Will... just found some contradictions between what a Blitz 3D supporter said and even the Blitz 3D site, figured I'd at least state the official feature lists of Blitz 3D :)

Personally I think using grammer is asking for trouble... you'll get into specifics of using certain gramatical phrases just like syntax specifics
#92
04/19/2005 (2:33 pm)
Yeah and brett's code sample above is a lot like blitzbasic.

Anyway, I thought I'd post a clip from my racing game. 10mb wmv not edited at all so it's not as slick a bretts as I captured it just now, with no edits. It's a slower paced racing game that concentrates on multiplayer, racing against your buddies and pushing and shoving your way around the track.

Its still in early prototype stage, but it has fairly good AI plus ODE physics and up to 12 players over lan 4-8 with broadband no dedicated server.

s93153354.onlinehome.us/Movie_0005.wmv

bear in mind it's pretty early and not at all polished yet. About 60% coded and art for this track about the same. The cars try and avoid players when they can, and the driving model is set up so you can master them within your first lap of driving.

BTW Brett, what did you use to create the mpg. Only got windows movie maker and need something cross platform really.
#93
04/19/2005 (4:27 pm)
@Adrian: Sorry mate, but I prefer dRacer BIIIG Time, and not only because it was done in TGE and yours in Blitz, it just looks better to the eyes, and dRacer has only temporary/programmer art.
#94
04/19/2005 (4:29 pm)
Ah thats ok. I prefer mine to be honest, allthough mine needs a bit of finishing up, and I forgot to turn damage on. It's not the same kind of game, but it is a racing game.

the torque one looks like an earlier game Damien made a long time ago, called quad2. procedural generated track and terrain, don't much care for the way the vehicles move.
#95
04/19/2005 (4:40 pm)
Shockwave3d programming in Lingo comes from a literal programming backround and they've been trying to move away from it....

Plus you can make racing games.
www.shockwave.com/landing/landingIndex.jsp?id=rr2detonator&userchoice=accept

lots of racing games....
www.shockwave3d.com/index.cfm?category=racing&page=3
#96
04/19/2005 (5:11 pm)
Heh pretty cool link Mark, thanks
#97
04/19/2005 (5:31 pm)
I used TMpgEnc to make the mpegs from AVIs. And I use FRAPS to capture.

- Brett
#98
04/19/2005 (5:32 pm)
Thanks :D the quality is outstanding :) way better than what I ended up with.
#99
04/19/2005 (6:25 pm)
Thanks :D the quality is outstanding :) way better than what I ended up with.
#100
04/19/2005 (6:38 pm)
@Mark,

I like the idea behind shockwave, but I can't even run it on my computer for some reason. It tries to download the player and then I get an error. It seems to me it's not as well supported as the Flash player which is too bad.

@Adrian, your racing game looks really geat IMO. In particular, I notice the collision between the cars looks real and overall looks fun. If only the cars werent all Austen Minis, hehe.