2013/06/16

SAMPLE : PITMAN


PITMAN ; X-BASIC for iOS



Introduction


This game is for iPad Portrait screen only because of screen size.

How to play


The goal of this game is get all gold in the map by manipulate the PITMAN.
Here are characters and its feature.
Ladder PITMAN can move to up/down/left/right.
  Gold Can get left or right side only.
If under goes blank, gold will fall.
  Soil Can dig from left or right side.
If you dig, it becomes blank and it does not return to the original.
  Rock Can push from left or right side.
It falls as same as gold.
  Wall Can't move and push. And don't fall.
  PITMAN Hero of this game.
You fall when below is space. You can jump when upside is space.
(There is some maps using this jump.)

Operation in play mode



Operate by touch key and function keys as shown in the figure below:

Move PITMAN
 
[Giveup] Retry this map by reducing one PITMAN.
Please press when you are trapped.
[Edit] Enter the edit mode (see below).
[Next] Go to next map by reducing one PITMAN.
You can not go when the one PITMAN remaining.
[Prev] Go to previous map (PITMAN does not decrement).
[Exit] Exit the game.

Operation in edit mode



The edit mode is the mode that edit map data.
Operate by touch key and function keys as shown in the figure below:

Move cursor

[Flag] Erase clear flags.
[Exchange] Exchange this map and selected map.
[Erase] Clear this map.
[Save] Save map data and clear flags. You can set 0 to 3 maps.
[Load] Load map data and clear flags.
[Select] Select map
[Next] Go to next map
[Prev] Go to previous map
[Restore] Discard the edited contents and restore this map data.
[Play] Play from this map.
The following, select the data to be placed in the map.
[Space]
[Ladder]
[Gold]
[Soil]
[Rock]
[Wall]
[PITMAN]
Don't put two or more PITMAN in a map.
It also does not check the map data of whether no problem. You can also make the map data that can not be solved absolutely. Please be careful.

Operation in selection mode


If you push [Select] or [Exchange] in edit mode, you can select a map from list.

Operate by touch key and function keys as shown in the figure below.
Or you can select map directly with touching of map.

Move cursor

[Determine]Determine map
[+10] Display next 10 maps.
[-10] Display previous 10 maps.
[ESC] Escape from selection.

Such as convention


  1. Reproduction is prohibited.
  2. Any problem was caused by using this program, I do not care.
  3. This sample has been not-high dare perfection. Please improve in everyone by all means. For example it will be full touch operation. If you done, please send me.
  4. Please send me your impressions.
Porting from Oh!MZ 1985/11(PIT-MAN2000)
Original Oh!MZ 1985/8

Zip File :XBpit.zip

Bug information:
2013/06/22
Edited map and clear information file was not written correctly.
I am up a modified version, but only rewrite fopen(~, "w") to "c".

Development status of the next version "X-BASIC for iOS" (V2.2)

This is the development status of the next version of "X-BASIC for iOS" v2.2.

If you have reporting or requirements, please put a comment in this post.

Change in V2.2

Up:Screen drawing is 60% speed up.

Add:picHeader()/cutHeader()/jpegHeader()/pngHeader()/gifHeader()/bmpHeader()
Add:magHeader()/magLoader()
Add:Display control code (DISP_CTRL_CLEAR_EOS) ; Clear cursor position to end of screen
Add:sBackgroundAlpha()/sBorder()
Add:tBackgroundColor()/gBackgroundColor()/sBackgroundColor()
Add:bitmapPattern()/getBitmapSize()
Add:Argument fNoBitmapClose add to picLoader()/cutLoader()/magLoader()
Add:hexstrToArray()
Add:separator in hexchr$()
Add:possible to specify with composite RGB in setTouchArea()/setTouchAreaWithText()
Add:devicePlatform()
Add:gFileStatus()

Change:YES/true/NO/false are changed from system variable to enum constant.
Change:locate() ; return value and behavior when you give a coordinate out of screen
Change:picLoader()/cutLoader()/bitmapImageFile();When image size is over the display width or height, it views fully by reducing.
Change:input statement's default keybord type is KeyboardTypeNumbersAndPunctuation.
Change:a_setPlayData() was expanded to 64 audio files  that can be registered at the same time.
Change:getWidth() can also ommit wx.

Fix:tBackgroundAlpha()/gBackgroundAlpha()/kBackgroundAlpha() is not effective immediately.
Fix:vpriority() is not effective.
Fix:When you exit the BASIC program after using gTransform() with valid transformation argument , the screen size is wrong the next time it runs.
Fix:The frame of the input were hiding in keyboard(enbug in V2.1)
Fix:Hung up if you give the filename to "" (some functions).
Fix:print "string" including control code.
Fix:Display result of print using "+%%" is illegal.
Fix:minor bug/Sample bug/manual mistake