Lachlan's misadventures in games programming

Monday, 9 January 2012

Moving Platforms!

1/09/2012 12:59:00 am Posted by Lachlan , , , No comments

Three pieces of news for Jack:

1) I have a memory leak the size of the titanic. Specifically, in the editor, probably in the gui stuff. I'll have to fun around with some duct tape to fix it later. And quickly. The editor has always gone blank after a little while. Thought it was a little bug. Until I checked the task-manager to find my little game had "borrowed" more then half of my RAM, and I was completely out. Really needs fixing.

I can type a little string in, and a platform will follow the orders. For instance:
W 5 M 100 0 50 0 X 3 R 0 0 -50 0 X 4 R 100 0 50 0

  • Wait five second
  • Move to (100, 0) at a velocity of (50, 0)
  • Wait 3 seconds, then put another wait 3 seconds at the end of the queue
  • Move to (0, 0) at a velocity of (-50, 0), and put an identical move at the end of the queue
  • Wait 4 second , then put another wait 4 seconds at the end of the queue  
  • Move to (100, 0) at a velocity of (50, 0) , and put an identical move at the end of the queue
  • Wait 3 seconds...
Its a really simple script. The idea is that there are really 4 commands: Wait (w) , Move (m) , Wait and Repeat (x) and Move and Repeat (r). Wait and Move commands just disappear after running. The repeating versions add themselves to the end of the queue. So - if I wanted a platform to move between two platforms, then move back and repeat, I would use 2 move and repeat commands, and they would just keep moving.

In absolute fairness, they are not entirely coded. I need to now code the behaviour of the actors attached to the platforms (or touching them) so it is predictable.

I'm considering setting a release date for an Alpha - giving me an absolute definitive time goal. I'm considering either the end of January, or midway through February. Problem is, whilst code is reaching completion (or at least approaching it slowly. I find it difficult to judge...), nothing else is - save for most of the design of the levels. And I'm really not sure how long it will take to use my crappy level editing tools to make my designed levels a reality. And I have no sound or music (or programming for such). And haven't programmed graphics beyond coded rectangles. May not need much work on graphics though - as I have done most of it (I think) in a blueprint style that will look similar to my last post, with a dock on the bottom with large, multicoloured, vector drawn, half top down buttons.

Current code stats:

Files 75
Lines 6072
Statements 3549
% Branches 23
% Comments 3.1
Class Defs 34
Methods/Class 9.71
Avg Stmts/Method 6.6
Max Complexity 46
Max Depth 9+
Avg Depth 1.93
Avg Complexity 2.9
Functions 12

* I don't think it's really news. Hence not counted.


Post a Comment