Game Development : Harder than you think.

We need better and cheaper middleware and libraries (for the latter: Java does a good job). And we need better project planning, also more efficient software engineering and much more intensive quality assurance. (I hate to play today’s PCs games when it’s neccessary to apply the 3rd patch in order to continue.)

Oftenly a good middleware is very expensive. So the project planners judge: “Can we afford it? Won’t we be able to do the same in shorter time etc”.

[quote]what would BASIC speed up in contrast to Java?
[/quote]
Nothing inherently of itself. The problem is that Java, the language, is standardized, and it’s standardized in a way that makes it suitable for C++ programmers to do a very general set of tasks. There are no built in language constructs to help and there won’t be any, because you can’t touch Java syntax without confusing the hell out of everyone. What is needed is a game programming language, integrated into a game programming IDE.

Take a look at Blitz3D to see how to do it. You can produce top-rate AAA games in Blitz if you want.

Cas :slight_smile:

Its pretty easy to look at the blits feature list and see it really doesn’t give you anything more than gfx control (input and some sound to be fair). Its pretty obvious from the article (and everyones experience I’ll wager) that gfx are less than 25% of a game. Blits won’t help you with ai, an event system, game architecture, object management etc… You still have to do all that yourself.

I think you’ve touched on an interesting topic though. What language constructs would be useful in a gaming specific language?

[quote]…ultimately the syntax is still nasty and can’t be read aloud in English…
[/quote]
“Not true” and “Who cares?” I don’t want to write a novel, I want to write a game. Just as when you are writing out equations you don’t spell it out like you would when reading e.g. “ten plus two divided by seven” vs. “(10+2)/7”. It just doesn’t make sense, symbols aren’t just used for the machine’s benefit - it is more efficient for people as well… to a degree.

[quote]and there are no high-level language constructs designed to make games programming easier.
[/quote]
What do you suggest?
How would it be different in terms of simply providing an API/Framework IN Java?
I don’t think this is a significant issue.

[quote]“Not true” and “Who cares?” I don’t want to write a novel, I want to write a game. Just as when you are writing out equations you don’t spell it out like you would when reading e.g. “ten plus two divided by seven” vs. “(10+2)/7”. It just doesn’t make sense, symbols aren’t just used for the machine’s benefit - it is more efficient for people as well… to a degree.
[/quote]
I agree :slight_smile:

There’s often the core engine written in C++, and then some scripting language that’s supposed to be able to easily create the game itself. The scripting could be done in basic or something but I think basic lacks in some areas; it’s easy to begin with but difficult on the long run (I am dealing with objects in games, so I want a good OO language!).
You have unrealscript which is a heck of a lot like java and has some nice game specific features but when you want to get to the bones for whatever reason or want your script to do something very fast, you also often stumble on the wall between the engine and the scripting and then you need C++ anyway (unreal has something a bit like JNI to do that).
Now java has come to a point where it became suitable for both scripting (it can be simple) and engine (it has the performance and flexibility), now isn’t that really great?
I think this is one of the points why I think java has become a great step in the right direction of development of large game projects (what’s so great about having multiple languages in such a project?).
The current need for scripting languages next to C++ is just a workaround for C++ IMHO.

I want an unreal engine written in java + UnrealEd + java for scripting for doing FPS games. ;D
Not some black box with a limited scripting language that’s just supposed to be easy.

My 2 cts (maybe it was 3 ;))

Erik

I keep saying there’s no reason why you can’t have OO in BASIC…


class Alien extends Entity

procedure kill(String cause) overrides Entity.kill
for i = 1 to 10
println "Killed it!" + cause
next
end proc

end class

etc. I find Java syntax hard to explain and difficult to read. I find curly brackets to be difficult to match up and distinguish from normal brackets. I find some of the neato ways of expressing things in a single line to merely make code harder to understand and read. I want the boundary between Java and scripting languages crossed, and BASIC is the way to do it.

Programming shouldn’t be hard, and I find it really hard these days. I used to be able to program things that worked really fast, and now it takes me days, and hundreds of lines more code, and much head scratching and confusion. Maybe I’m just getting old but for some reason programming has not got any easier in the last decade despite us using 2000x more powerful computers and hugely complex OO languages in massive IDEs. What gives? Clearly something is amiss.

Cas :slight_smile:


public class Alien extends Entity {
 
public void kill(String cause) {
  for (int i = 1; i < 10; i++) { 
    System.out.println("Killed it!" + cause);
  } 
} 
 
}

Is that really so much harder to read? (I hope I don’t start another ‘curly brackets on the end of a line sucks’-thread now ;D)

When I compare for example VB to java, I don’t think VB is that much easier especially on the long run. Having just 1 language in a project makes the project easier to manage I think. You could use a basic compiler for the JVM or even a Pascal one or whatever, but personally I don’t see any benefit of adding another language because of syntactic preferences.
Hasn’t programming just gotten harder because you program more complex systems than in the old days, and not because of a difficult syntax?

Erik

quote
Programming shouldn’t be hard, and I find it really hard these days. I used to be able to program things that worked really fast, and now it takes me days, and hundreds of lines more code, and much head scratching and confusion. Maybe I’m just getting old but for some reason programming has not got any easier in the last decade despite us using 2000x more powerful computers and hugely complex OO languages in massive IDEs. What gives? Clearly something is amiss.
[/quote]
Really you mean the same what Jeff said… :-)[quote]
Which is why two things will become increasingly important:
(1) Coding tools designed to help manage complexity (eg Java.)
(2) Middelware that offloads some of the hariest coding tasks.
Complexity has reached the point where it stands as a barrier to imagination and innvoation. That can’t possibly continue and have the industry remain healthy.
[/quote]
That’s it.
Programming these days is much harder than it’s been on the nice homecomputers (*). It’s true, but we can’t do anything - except what Jeff said. Actually I understand you pretty well. In former times (8 bit) you needed less time to reach your goal: write games. For example the same time I needed to finish a complete Amstrad CPC game (including drawing the sprites), I today need to just learn the basics of Xith3d (one of those mentioned middlewares)… (but then, I’m going to use it for more than one game, hehe).

Fairly enough in former times the computer and their OS have been much simpler - and less powerful. No mice, no GUI, no event listeners, no stereo sound, no 3D graphics (which let explode the complexity of your two-dimensional game, 2d in short: it adds an entire new dimension, the 3rd one).

Still, there’s no way back. Let’s use comprehensive libraries likes Java’s one and middleware! With just a dozen lines of code you can display your entire 3d scenegraph in textual form inside a JTree. How long would it take you to write such on a C64? You see my point?

(*) I regularly sorrow today’s computer newcomers when it comes to programming: on a 8-bit home-computer you needed some hours to let your first sprites fly around the screen and in one week you did pacman. Today… you need months to open just a GUI window with mouse listener, etc etc.

Hurrah, a sympathiser!

Erik - I have the strongest suspicion that I have a feminised brain. I have very different language processing capabilities compared to most men. I think in words, not spatial relationships (I can’t read maps and I’m crap at FPS games). When I read code, I read it aloud in my head. How do you pronounce }?

Here’s another little example of just how opaque Java can be, obscuring meaning with crazy syntactical construct:

Here, in CasBASIC, I want to achieve something: can you guess what it is?


window CasWindow
      on event mouseclicked
            close
      end event

      title="My Window"
      size 640, 480
end

Let’s look at the Java code:


public class CasWindow extends Window {
      public CasWindow() {
            super("My Window");
            setSize(640, 480);
            addMouseListener(new MouseAdapter() {
                  public void mouseClicked(MouseEvent event) {
                        dispose();
                  }
            });
      }
}

Totally spurious example syntax of course but you can see what I’m driving at. Less squiggles, less code, more meaning. This is why for example I still go on about structs despite them being technically possible without altering the language or the VM in any way - they’re just 100x harder to do in Java than in C. How’s that for a step backwards in usability for a task?

Cas :slight_smile:

Cas :slight_smile:

This observation has been the basis for my current project; a game creation system using rhino/javascript that provides the user with feature that would have been found on a typical 16 bit system; 3 layered tile maps, x number of sprites, and input. The user provides one image that is cut up into 32x32 tiles, another image of 64x64 sprites.

The game is implemented in the javascript using these basic building blocks much like a typical snes or sega game only with javascript instead of assembler. The application will include a map editor, script editor, and the game display.

Although not anywhere near finished, this thing consist of very little code; rhino was done by others, a syntax highlighting editor component was done by others. All I’ve done is the applet and the map editor and integrating them together. To me thats the real miracle of game programming today. If your willing to use other peoples work then you can accomplish alot quickly.

So one comment Cas. I’ve written a lot of scripting languages in my day. Its actually something i enjoy.

Within a limited domain space yes a high level scripting language can be VERY effective. However the “spurious syntax” you pointed to in Java IMO becomes VITAL syntax when you try to do arbitrarily complex things.

What Java gives IMO that scripting languages don’t and can’t is a way to better manage the complexity of general purpose programming.

For programs of a small size and narrow scope, ofcourse the scripting language will always be easier because it is designed to just do that one thing and do it well.

After all the EASIEST language to script your game in would have one, very high level command

DoThisParticularGameNow()

:slight_smile: :slight_smile: :slight_smile: :slight_smile:

Unfortunately its domain is rather limited :wink:

I’ve never said that I wanted a language that was less general purpose than Java - I want a language that’s easier to read and write and understand and that hides all the unnecessarily complex syntax away under higher level constructs. I’d rather see

for i = 1 to 10 step 2

than

for (int i = 0; i < 10; i += 2)

f’rinstance. Because the code can be read aloud and actually makes sense in English.

Cas :slight_smile:

But that is less general-purpose, as that form will only work for that particular usage of a for construct. BASIC-style for loops are only good for one thing - iterating one value over a specific range of numbers by means of simple addition or subtraction. The moment you deviate, you have to resort to a while loop with a load of book-keeping code to make it work, and readability goes right out the window.

Edit: Oh, and FWIW I find for-loops very easy to read - I just automatically tag in a couple of extra words in my head, and it makes perfect sense: int i equals 0, while i is-less-than 10, i plus-equals 2.

Edit: typo ::slight_smile:

To some degree this is the Wirthian/Ritchian religous debate.

I happen to be a Wirthian myself but I accept with resignation that the Ritchian syntax approach has won. Had Java had a Wirthian syntax (eg pascal, modula2) history shows its adoption curve would have been a lot slower.