Return to Home Page
Greg Santo's Game Programming Portfolio
   
The TWIGZ SDK


Program Description

The TWIGZ SDK (Software Development Kit) was designed to allow users to easily create their own adventure games for The TWIGZ Engine. The TWIGZ SDK provides all of the necessary tools to create Level Files, Costume Files, Scripts, and Dialogue Files.

Programming Challenges

The programming challenge I was faced with when creating The TWIGZ SDK was creating a user friendly point & click interface which supported many features all contained within one 320x200 pixel screen. The solution for this problem was to create a button interface which allowed the user to select which task he would like to work on at the current moment. Once the appropriate task was selected a separate program for that specific task could be loaded into memory. This solution provided a nice development environment for The TWIGZ Engine but also allowed users to use the specialized programs outside of the development environment if necessary.


Features
For more detailed information about The TWIGZ SDK please visit ShatteredRealmProductions.com

  • Easy to use point & click interface
  • Detailed step-by-step tutorial included
  • Use the custom tools as part of the Integrated Development Environment (IDE) or separately


Screenshots



Drawing the walking boxes
Drawing the walking boxes for a map from Monkey Island 2: LeChuck's Revenge


Code Sample
The SaveObjectImage subroutine saves all object information including the object's images into the main level (*.lvl) file. The subroutine first writes the header for the object followed by the bitmap for each image that makes up the object. Objects in The TWIGZ Engine can have multiple images that are changed based on the value of global variables. For example, a door object may have two images (i.e. an open image and a closed image) which will be changed based on the value of the global variable for that object. So, for example, if the player has left a door open in a room, any time the player returns to that room the door will still be open.

SUB SaveObjectImage

 

'Save Object Image Header

FOR i = 1 TO NumberOfObjects

 WRITE #1, "OBHD"

 WRITE #1, Object(i).ID

 WRITE #1, Object(i).BinVar

 WRITE #1, Object(i).BVStatus

 WRITE #1, Object(i).ExitType

 WRITE #1, Object(i).TotalImages

 WRITE #1, Object(i).X

 WRITE #1, Object(i).Y

 WRITE #1, Object(i).ImageWidth

 WRITE #1, Object(i).ImageHeight

 WRITE #1, Object(i).StartOffset

           TempOffset = Object(i).StartOffset

 WRITE #1, Object(i).WalkToX, Object(i).WalkToY

 WRITE #1, ObjectName$(i)

 

'Save Object Images

FOR X = 0 TO Object(i).TotalImages - 1

 

CLS

 

'Write the Object Image Header

IF X < 10 THEN WRITE #1, "IM0" + MID$(STR$(X), 2) ELSE WRITE #1, "IM" + MID$(STR$(X), 2)

 

 Bytes = (Object(i).ImageWidth * Object(i).ImageHeight) + 5

 TwigzMoveFromXMS VARSEG(SaveTile(0)), VARPTR(SaveTile(0)), XMSObjects&, TempOffset, Bytes

 

DEF SEG = VARSEG(SaveTile(0))

 FOR A = 0 TO Bytes

  WRITE #1, PEEK(VARPTR(SaveTile(0)) + A)

 NEXT

DEF SEG

 

 TempOffset = TempOffset + Bytes

NEXT

 

NEXT

END SUB


Downloads
WARNING: The TWIGZ SDK requires EMS and XMS memory which may not be supported on modern systems. If you cannot get The TWIGZ SDK to run, please download Setup.zip, a program which will verify that your system supports EMS and XMS memory.

The TWIGZ SDK.zip - This download includes The TWIGZ SDK and a detailed step-by-step tutorial.

The TWIGZ SDK.exe - This is a self-extracting version of the above file.
   
Copyright © 2006 Greg Santo