Hobnob

Joined: May 15, 06

My games

My libraries

 

 

Bunch of Lightweights

Chatters has been on a Minecraft kick recently, and from that I discovered LWJGL, the Lightweight Java Game Library. This provides a Java program easy access to a bunch of useful stuff for games programming, including OpenGL.

Now I've tried using OpenGL in Java before, and found it a right pain. LWJGL however is pretty transparent, and about as easy as you could make an OpenGL interface while retaining full functionality.

Playing around with it produced this, which should look at least slightly familiar to some people:



Probably nothing will come of it, but it's a fun project to try while (re-)learning OpenGL. One thing I've found is that I desperately need a more modern book on the subject, since the reference I have are massively outdated.

One interesting thing is that this is a "real" 3D display, rather than the fixed-viewpoint of a traditional sprite-based isometric display. This means it can be spun and viewed from any direction, rather like the game Dungeon Keeper. Actually something like this would probably be necessary if it were ever a real game, since otherwise things get hidden by walls too easily.

Also the networking aspect might be fun to try, since LWJGL lets you run the client as a browser applet, connected to a server on the backend. That is a seriously neat and useful way of doing things, since everything necessary is downloaded by the player automatically.

Don't you wish BYOND could do this stuff easily? Maybe one day.

Posted by Hobnob on Wednesday, September 02, 2009 11:24AM - 4 comments / Members say: yea +0, nay -0

Spacewar!

The Dream Makers article on vectors I mentioned in the previous post is almost finished. All that's left to do is finish off the sections on describing how the example demos use vectors, which shouldn't take very long. As another teaser, here is the third and final demo, and the only one of them that could be described as a full game: It's a version of Spacewar!

If you've never heard of it, this was one of the very first computer games ever written, and as such it's an important part of gaming history. It's a two player game in the old-fashioned sense - both players sharing the same keyboard.

Full source for all the demos will be available when the article is finished, which should be within a few days if I can manage it.

Edit: The source for all three demos has now been release - see the Demos box to the left. The article is finished, and just needs some formatting and proof reading before I will submit it.

Posted by Hobnob on Saturday, July 25, 2009 01:22PM - 3 comments / Members say: yea +2, nay -0
(Edited on Friday, August 21, 2009 01:53PM)

Ima chargin' my lazors

I'm currently writing an article for Dream Makers giving an introduction to vectors and the jt_vectors library. As part of it, I'm writing a few demos to show how to use them.

Here's a little taste of the first one that's ready. For sure it's not going to win any prizes for graphics or sound design, but it's reasonably fun to play with. See if you can shoot all 25 targets!

Posted by Hobnob on Thursday, July 16, 2009 01:08PM - 6 comments / Members say: yea +4, nay -0

Get Something Done: Railroad Tycoon as an inspiration

So as I said in the previous post, the Something that I am resolving to Get Done will be inspired by Railroad Tycoon. If you've never played that game, I will give a brief recap as many aspects of my game will be based on it. RT was a business simulation in which you built a railway across a map (various regions were playable, such as the UK, Europe, Eastern US etc.). To make money, you ran trains which picked up and delivered cargoes, such as mail and passengers between towns and cities, and materials and goods between industries and ports. It cost you money to build new track, stations and trains, and you had to pay maintenance on what you already had.

Playing against you were (up to three) computer-controlled opponents, theoretically doing the same thing as you (though one of the major annoyances of RT was that the AI followed very different rules than the player, joining cities to cities with straight-line track and obviously operating some kind of statistical simulation of profit rather than actual trains and cargoes). You couldn't cross an opponent's track with your own, so it was pretty easy to get boxed in by enemies, with the only way to expand being to initiate a "rate war" by running a track into an opponent's station. There were also various financial machinations where you could buy and sell stock in all the railroads to attempt to get a controlling interest and make more money.

As the game progressed, newer locomotives would be introduced - for instance, in the UK scenario starting in 1830, you start with only the rather low powered Planet class engine, which can barely pull one wagon, and as time goes on get newer and better steam engines which can pull heavier loads and do so faster, and eventually diesel and electric locomotives which can pull large trains at high speed. The more cargo you deliver and the faster you deliver it, the more money you earn, so upgrading the engines is a must.

One slightly odd aspect of the game is that the economic simulation runs at a different rate than the train simulation. Thus though you see trains moving from city to city pulling their loads, they might take a year or more of game time to make a single trip (with a year corresponding to about 10 minutes of real time). The official explanation of this is that a single day of train operations is expanded to a two-year fiscal period, with each day representing the average performance of the train over the whole period. This is a bit hard to graps at first, but actually works quite well, giving you a feel for the movement and efficiency of the trains, but allowing time to progress fast enough that building new tracks and introducing new engines makes sense. It's a scheme that I will probably be following with my game.

So that was Railroad Tycoon, but as I said before although my game will be inspired by it, I don't intend to make a slavish copy of it. I want the game to be more like a virtual train set - you will control trains individually, for instance (though a certain amount of automation with signals and an "automatic driver" will be possible), unlike RT where trains moved from station to station without human intervention. Another major difference will be the much closer scale - stations won't be a single-tile object, but spread over a number of tiles, with platforms and buildings that can be placed next to the track. Wagons won't magically appear when needed (as in RT), but will need to be built and stored at sidings and shunted to the right locations. This will make my game a rather more micro-managed sim than RT, but hopefully by good design can be kept fun. More details of these aspects in later posts, plus how things will work as a multiplayer game, but for the moment I want to talk about the graphics.

Railroad Tycoon was a strictly 2D, top-down experience, and looks rather dated even compared to many BYOND games nowadays. The series didn't end there though - RT2 introduced isometric graphics, and RT3 was a full-3D environment with a free camera. I'd like to upgrade the graphics somewhat over RT's top-down look, and isometric is the obvious way to go. But there are complications as I'll explain.

Most "isometric" game don't use a true isometric projection, instead opting for a so-called 1:2 isometric which looks better when applied to pixel art. Technically, a cube drawn in true isometric would have it's top and bottom edges at 30° to the horizontal, but in 1:2 isometric they are instead at 26.6° (= atan(0.5)). In BYOND, though, even pseudo-isometric is tricky to do. We are stuck with a uniform 2D grid which imposes a lot of work on a programmer trying to adapt it to the non-uniform vertical scale of isometric projection. Instead, I'm going for a compromise, called military projection, where the cube's edges are 45° to the horizontal. Although this looks a little distorted, it emphasises a top-down view over the side view, and there is no need to fight the standard BYOND grid at every stage. Another benefit of the near-top-down view is that fewer objects will overlap those behind them - always a problem in isometric systems, since you are looking more to the side. The few remaining cases (e.g. tall buildings or structures) can be handled by careful use of the object layers.

More details, and perhaps some placeholder art to show the "look" of the game, in the next update. So far the game doesn't have a finalized name - for a while, I was using Railway Tycoon, currently I'm thinking Age of Steam, though that's also a misnomer since I fully intend to cover diesel and electric locomotives as well. Perhaps a name will suggest itself as the game progresses.

Posted by Hobnob on Thursday, May 07, 2009 02:17PM - 5 comments / Members say: yea +2, nay -0

Slow ones, they don't get nothin' done son.

So as you can see, I haven't got anywhere with my Naval RTS game Warspite, partly because of lack of free time, and partly because of lack of motivation. Most of this demotivation is because the tech demos quickly showed how badly the pixel movement worked over a network. Even over a LAN, gameplay was jerky and annoying, and attempts to play with a remote server and any kind of real lag were awful. Since the RTS was always envisioned as multiplayer, this is a big problem.

I hope to resurrect the game eventually, either as a single player game (which would remove the movement problems but require a lot of work developing an AI to be worthwhile), or perhaps just finish it as the intended multiplayer game and hope that it would be playable enough, and the jerky feel could be improved eventually (possibly by improvements to BYOND itself). However, for the moment it is on permanent hiatus.

Recently, IainPeregrine's Get Something Done caught my attention. Since I've been failing to Get Anything Done for a while now, it's possible an external framework might help with my motivation a bit. I have about four ideas percolating, none of which have got any further than paper (apart from a few small test programs for various systems). The common feature of all the ideas is that they basically follow BYOND's traditional tile-based layout, which should help development immensely.

My current favourite is inspired by the old ST/Amiga/PC favourite Railroad Tycoon, though rather modified from that game (there's little point in making a straight copy, since the original is available to download for free). For one thing, it's intended to be multiplayer rather than single player, and for another, I want it to be rather smaller scale than RT was, with more emphasis on control and movement of the trains, and less on financial manipulation of stocks etc. In many ways, it'll be a virtual train set with a game bolted on to provide some competitive interest. More details in my next update.

Posted by Hobnob on Tuesday, May 05, 2009 01:08PM - 2 comments / Members say: yea +4, nay -0

 

 

Blog Calendar

September 2009
Su Mo Tu We Th Fr Sa
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
 
«Jul  

My hosted files

(32.6 KB)
(118.3 KB)