Upgrading my test game

Ayuda sobre MT Engine MK2.

Moderador: na_th_an

andydansby
Mensajes: 14
Registrado: Vie, 16 Dic 2016, 04:00

Upgrading my test game

Mensajepor andydansby » Sab, 18 Feb 2017, 13:38

Hello:

I started to make a game using the source code of Goku Mal which is using version FORK 3.99.2.128 preliminary. I got it to compile and can walk from screen to screen as a playable demo. There were a few things that I could not get to work, so I wanted to convert to the MT Engine MK2 v0.88. On compiling I am getting errors

sccz80:"librarian.h" L:21 Warning:#2:Too many arguments in function call
sccz80:"engine/flickscreen.h" L:88 Error:#48:Invalid expression
sccz80:"engine/flickscreen.h" L:89 Warning:#17:Expected ';'
:bronca:
It's driving me crazy. As I see nothing wrong in flickscreen.h or librarian.h.

I am using compressed levels.

Any Ideas?

Otherwise, is there a simplified 128k MK2 example I may follow. Goku Mal seemed to work ok, but I started running into errors while trying to WARP_TO.... The map was resized and I could not go into all of the map. The game is a top down view.


I can upload my code for the 3.99.2.128 if anyone wants to view my walking around the screen test if it would help.

Thanks
Andy Dansby
andydansby
Mensajes: 14
Registrado: Vie, 16 Dic 2016, 04:00

Re: Upgrading my test game

Mensajepor andydansby » Mar, 28 Feb 2017, 11:30

I have taken the advice of Cthonian Godkiller and have started from scratch using the MK2 0.89 (I used the one posted on the forum). When I run my make.bat I am getting this:

Código: Seleccionar todo

make
----------------------------
   BUILDING xelda
----------------------------
### BUILDING LEVELS
BUILDING LEVELS!
================
LEVEL 1
..\utils\buildlevel.exe ..\map\mapa0.map 4 5 99 ..\gfx\font.png ..\gfx\work0.png ..\gfx\sprites0.png ..\enems\enems0.ene 14 3 8 99 2 behs0.txt level0.bin

output filename = level0.bin

writing header...
    map_w = 4, map_h = 5
    ini @ 14 (3,8)
    max_objs = 99
    enems life gauge = 2

reading map...
    map filename = ..\map\mapa0.map
    width in tiles = 60
    height in tiles = 50
    total bytes read = 3000
    packed map detected (16 tiles).
    0 bolts found.
writing map...
    1500 bytes written.
No bolts will be output (you said 99!)
    0 bytes written.

reading font
    font filename = ..\gfx\font.png
    converted 64 chars
reading 16x16 tiles
    tileset filename = ..\gfx\work0.png
    converted 192 chars
writing tileset
    2304 bytes written

reading spriteset
    spriteset filename = ..\gfx\sprites0.png
converting & writing spriteset
    2320 bytes written in 16 frames

reading enems file
    enems filename = ..\enems\enems0.ene
    reading 60 enemies
    written 60 enemies
    720 bytes written.
    reading 20 hotspots
    60 bytes written.

reading behaviours
    Behaviours file = behs0.txt
    00 00 08 08 08 08 08 00 00 08 08 08 08 08 0A 0A
    00 00 0A 00 08 08 08 08 08 00 01 08 08 01 00 00
    00 10 00 00 01 01 00 10 00 08 08 08 00 00 00 00
    48 bytes written.

Level is 6968 bytes.
PODEWWWR!!!
..\utils\apack.exe level0.bin ..\bin\level0c.bin
===============================================================================
aPLib example                   Copyright (c) 1998-2004 by Joergen Ibsen / Jibz
   All Rights Reserved
   http://www.ibsensoftware.com/
===============================================================================

compressed 6968 -> 2639 bytes (37%) in 0.00 seconds
DONE!
reading spriteset
    spriteset filename = ..\gfx\drop.png
converting & writing spriteset
    576 bytes written in 4 frames

reading spriteset
    spriteset filename = ..\gfx\arrow.png
converting & writing spriteset
    288 bytes written in 2 frames

### MAKING TEXTS ###
..\utils\textstuffer.exe texts.txt texts.bin 24
        1 file(s) copied.
### MAKING SCRIPT ###
..\utils\msc3.exe xelda.spt 20 rampage
Parsing xelda.spt
END_OF_LEVEL reached.
Scripts for 1 levels read and compiled into scripts.bin
Generating parser
DONE!

copy msc.h ..\dev
        1 file(s) moved.
copy msc-config.h ..\dev
        1 file(s) moved.
copy /b ..\texts\texts.bin + ..\script\scripts.bin ..\bin\preload3.bin..\texts\texts.bin
..\script\scripts.bin                                                         1 file(s) copied.
### MAKING FIXED SCREENS ###
..\utils\png2scr.exe ..\gfx\title.png ..\gfx\title.scr
Reading input png
    input filename = ..\gfx\title.png
Reading colour pairs
Examining and reordering bitmap
Adding attribute file
Writing output
    output filename = ..\gfx\title.scr
    6912 bytes written
..\utils\apack.exe ..\gfx\title.scr ..\bin\title.bin
===============================================================================
aPLib example                   Copyright (c) 1998-2004 by Joergen Ibsen / Jibz
All Rights Reserved
http://www.ibsensoftware.com/
===============================================================================
compressed 6912 -> 2644 bytes (38%) in 0.00 seconds
..\utils\png2scr.exe ..\gfx\ending.png ..\gfx\ending.scr
Reading input png
    input filename = ..\gfx\ending.png
Reading colour pairs
Examining and reordering bitmap
Adding attribute file
Writing output
    output filename = ..\gfx\ending.scr
    6912 bytes written
..\utils\apack.exe ..\gfx\ending.scr ..\bin\ending.bin
===============================================================================
aPLib example                   Copyright (c) 1998-2004 by Joergen Ibsen / Jibz
All Rights Reserved
http://www.ibsensoftware.com/
===============================================================================

compressed 6912 -> 2684 bytes (38%) in 0.00 seconds
### MAKING LOADING ###
..\utils\png2scr.exe ..\gfx\loading.png loading.bin
Reading input png
    input filename = ..\gfx\loading.png
Reading colour pairs
Examining and reordering bitmap
Adding attribute file
Writing output
    output filename = loading.bin
    6912 bytes written
### BUILDING RAMS ###
THE LIBRARIAN

Processing list.txt
 + File title.bin               2644
 + File marco.bin               0
 + File ending.bin              2684
 + File level0c.bin             2639
Writing RAM3.bin
Writing RAM4.bin
Writing RAM6.bin
Writing RAM7.bin
RAM3.bin
RAM4.bin
RAM6.bin
RAM7.bin
        4 file(s) copied.
        1 file(s) copied.
### COMPILING WYZ PLAYER ###
..\utils\pasmo WYZproPlay47aZX.ASM ram1.bin
copy ram1.bin ..\dev
        1 file(s) copied.
echo -------------------------
### COMPILING ###
        1 file(s) copied.
        1 file(s) copied.
sccz80:"msc-config.h" L:26 Error:#26:Illegal Function or Declaration
### MAKING TAPS ###

BAS2TAP v2.5 by Martijn van der Heide of ThunderWare Research Center

Creating output file loader.tap
Done! Listing contains 1 line.
Input file open failed!
loader.tap
loading.tap
reubica.tap
ram1.tap
ram3.tap
        1 file(s) copied.
### LIMPIANDO ###
Could Not Find C:\z88dk10\MK2 0.89 xelda\dev\main.tap
Could Not Find C:\z88dk10\MK2 0.89 xelda\dev\xelda.bin
### DONE ###


At the end I get "sccz80:"msc-config.h" L:26 Error:#26:Illegal Function or Declaration".

Where should I start to trouble shoot? This is using compressed levels, I am trying to build one level at a time, but this is just the level 0.


my make.bat in the ../dev folder is

Código: Seleccionar todo

@echo off

rem set here the game name (used in filenames)

SET game=xelda

echo ----------------------------
echo    BUILDING %game%
echo ----------------------------

rem ###########################
rem ## LEVELS
rem ###########################

rem we will delegate on makelevels.bat - if your game supports several levels,etc
echo ### BUILDING LEVELS
cd ..\levels
call buildlevels.bat
cd ..\dev

rem pause

rem but for 48K/single level games...
rem echo ### MAKING MAPS ###

rem the "Force" parameter is to force 16 tiles maps even if the actual map data
rem has more tan 16 tiles. Extra tiles are written to extra.spt. Me have to move
rem that file to the script folder.

REM this was commented out before
rem ..\utils\map2bin.exe ..\map\mapa.map 4 4 99 map.bin bolts.bin force
rem move map.bin.spt ..\script

REM this was commented out before
REM echo ### MAKING ENEMS ###
REM ..\utils\ene2bin.exe 4 4 1 ..\enems\enems.ene enems.bin hotspots.bin

REM this was commented out before
REM echo ### MAKING TILESET ###
REM ..\utils\ts2bin.exe ..\gfx\font.png ..\gfx\work.png ts.bin

REM this was commented out before
REM echo ### MAKING SPRITESET ###
REM ..\utils\sprcnv.exe ..\gfx\sprites.png sprites.h

rem If you use arrows and/or drops this will make the sprites binary:

..\utils\spg2bin.exe ..\gfx\drop.png spdrop.bin
..\utils\spg2bin.exe ..\gfx\arrow.png sparrow.bin


rem ###########################
rem ## GAME TEXT
rem ###########################

rem Each line in text.txt contains a text string for the game.
rem textstuffer.exe will compress and pack all text strings in
rem a binary file called texts.bin. The parameter "24" define how
rem many chars per line. Word wrapping is automatic.

echo ### MAKING TEXTS ###
cd ..\texts
echo ..\utils\textstuffer.exe texts.txt texts.bin 24
..\utils\textstuffer.exe texts.txt texts.bin 24
copy texts.bin ..\bin
REM pause

rem ###########################
rem ## GAME SCRIPT
rem ###########################

rem The game script is compiled by msc3.exe. For 128K games use "rampage" at
rem the end so the script compiler generates code to stuff everything in
rem extra pages; the second parameter is the # of screens in your game.
rem i.e. "msc3.exe ninjajar.spt 21 rampage

echo ### MAKING SCRIPT ###
cd ..\script
echo ..\utils\msc3.exe %game%.spt 20 rampage
..\utils\msc3.exe %game%.spt 20 rampage
pause

rem If scripts and texts are going to share the same RAM page, use this line
rem (for 128K games)
rem This calculates an offset for the scripts binary automaticly.
echo ..\utils\sizeof.exe ..\bin\texts.bin 49152 "#define SCRIPT_INIT" >> msc-config.h
..\utils\sizeof.exe ..\bin\texts.bin 49152 "#define SCRIPT_INIT" >> msc-config.h
REM pause

echo copy msc.h ..\dev
move msc.h ..\dev
rem copy msc.h ..\dev

echo copy msc-config.h ..\dev
move msc-config.h ..\dev
REM copy msc-config.h ..\dev
rem copy scripts.bin ..\dev
cd ..\dev
REM pause

rem For 128K games with text + script sharing the same page, use this to
rem bundle both binaries...
rem echo ### BUNDLING TEXT + SCRIPT ###
echo copy /b ..\texts\texts.bin + ..\script\scripts.bin ..\bin\preload3.bin
copy /b ..\texts\texts.bin + ..\script\scripts.bin ..\bin\preload3.bin

rem ###########################
rem ## FIXED SCREENS
rem ###########################

echo ### MAKING FIXED SCREENS ###
echo ..\utils\png2scr.exe ..\gfx\title.png ..\gfx\title.scr
..\utils\png2scr.exe ..\gfx\title.png ..\gfx\title.scr

echo ..\utils\apack.exe ..\gfx\title.scr ..\bin\title.bin
..\utils\apack.exe ..\gfx\title.scr ..\bin\title.bin

echo ..\utils\png2scr.exe ..\gfx\ending.png ..\gfx\ending.scr
..\utils\png2scr.exe ..\gfx\ending.png ..\gfx\ending.scr

echo ..\utils\apack.exe ..\gfx\ending.scr ..\bin\ending.bin
..\utils\apack.exe ..\gfx\ending.scr ..\bin\ending.bin

del ..\gfx\*.scr
REM pause

echo ### MAKING LOADING ###
echo ..\utils\png2scr.exe ..\gfx\loading.png loading.bin
..\utils\png2scr.exe ..\gfx\loading.png loading.bin
REM pause

rem ###########################
rem ## LIBRARIAN
rem ###########################
echo ### BUILDING RAMS ###
cd ..\bin
..\utils\librarian.exe
copy ram?.bin ..\dev
copy librarian.h ..\dev
cd ..\dev
REM pause

rem ###########################
rem ## MUSIC
rem ###########################
REM echo ### BUILDING ARKOS ###
REM cd ..\mus
REM if [%1]==[nomus] goto :nomus
REM ..\utils\build_mus_bin.exe ram1.bin
REM :nomus
REM copy ram1.bin ..\dev
REM copy arkos-addresses.h ..\dev\sound
REM cd ..\dev

echo ### COMPILING WYZ PLAYER ###
cd ..\mus
echo ..\utils\pasmo WYZproPlay47aZX.ASM ram1.bin
REM ..\utils\pasmo WYZproPlay47aZX.ASM ram1.bin
pasmo WYZproPlay47aZX.ASM ram1.bin
REM pause

echo copy ram1.bin ..\dev
copy ram1.bin ..\dev
cd ..\dev
echo echo -------------------------
REM pause

rem ##################################
rem ## COMPILATION AND TAPE BUILDING
rem ##################################

echo ### COMPILING ###
zcc +zx -vn %game%.c -o %game%.bin -lsplib2 -zorg=24200

echo ### MAKING TAPS ###
..\utils\bas2tap -a10 -sFINAL loader\loader.bas loader.tap
..\utils\bin2tap -o loading.tap -a 16384 loading.bin
..\utils\bin2tap -o reubica.tap -a 25000 loader\reubica.bin
..\utils\bin2tap -o ram1.tap -a 32768 ram1.bin
..\utils\bin2tap -o ram3.tap -a 32768 ram3.bin
..\utils\bin2tap -o main.tap -a 24200 %game%.bin
copy /b loader.tap + loading.tap + reubica.tap + ram1.tap + ram3.tap + main.tap %game%.tap

echo ### LIMPIANDO ###
del loader.tap
del main.tap
del loading.tap
del %game%.bin
del ram1.tap
del ram1.bin
del ram3.tap
del ram3.bin
del ram4.bin
del ram6.bin
del ram7.bin
del sparrow.bin
del spdrop.bin
del reubica.tap
echo ### DONE ###



and finally my buildlevels.bat is

Código: Seleccionar todo

@echo off
echo BUILDING LEVELS!
echo ================
echo LEVEL 1

REM ..\utils\buildlevel.exe ..\map\mapa1.map 4 5 99 ..\gfx\font.png ..\gfx\work1.png ..\gfx\sprites1.png ..\enems\enems1.ene 14 3 8 99 2 behs1.txt level1.bin decorations1.spt
echo ..\utils\buildlevel.exe ..\map\mapa0.map 4 5 99 ..\gfx\font.png ..\gfx\work0.png ..\gfx\sprites0.png ..\enems\enems0.ene 14 3 8 99 2 behs0.txt level0.bin
     ..\utils\buildlevel.exe ..\map\mapa0.map 4 5 99 ..\gfx\font.png ..\gfx\work0.png ..\gfx\sprites0.png ..\enems\enems0.ene 14 3 8 99 2 behs0.txt level0.bin

echo ..\utils\apack.exe level0.bin ..\bin\level0c.bin
..\utils\apack.exe level0.bin ..\bin\level0c.bin

rem pause
REM echo move decorations0.spt ..\script
REM move decorations0.spt ..\script

echo DONE!
REM pause

REM $ buildlevel mapa.map map_w map_h lock font.png work.png spriteset.png enems.ene scr_ini x_ini y_ini max_objs enems_life behs.txt level.bin [decorations.spt]

REM where:
REM   * mapa.map is your map from mappy .map
REM   * map_w, map_h are map dimmensions in screens
REM   * lock is 15 to autodetect lock, 99 otherwise
REM     [Use 99 if you #define DEACTIVATE_KEYS]
REM   * font.png is a 256x16 file with 64 chars ascii 32-95
REM   * work.png is a 256x48 file with your 16x16 tiles
REM   * spriteset.png is a 256x32 file with your spriteset
REM   * enems.ene enems/hotspots directly from colocador.exe
REM   * scr_ini, scr_x, scr_y, max_objs, enems_life general level data header
REM   * behs.txt is a tile behaviours file
REM   * level.bin is the output filename.
REM   * decorations.spt if specified, maps are forced to 16 tiles + decorations



Any Help would be appreciated

Thanks

Andy Dansby
andydansby
Mensajes: 14
Registrado: Vie, 16 Dic 2016, 04:00

Re: Upgrading my test game

Mensajepor andydansby » Mié, 01 Mar 2017, 01:20

My own goofy error caused the problem. In the make.bat, there seemed to be some oddball error with my echo. Once I removed it, I was able to compile. Now I can start playing with the engine.

Andy Dansby

Volver a “MK2”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado