Script

For all things Churrera. ¿Estás haciendo un juego? ¿quieres proponer un cambio? ¿tienes alguna duda? ¡Cuéntanoslo!

Moderador: na_th_an

renegade
Mensajes: 63
Registrado: Sab, 15 Feb 2014, 19:13

Script

Mensajepor renegade » Dom, 02 Mar 2014, 04:29

Buenas,al activar la directiva ACTIVATE_SCRIPTING para añadir tiles extra para adornar mas mis mapas mediante script .spt compilo y se resetea este es mi .spt de prueva.

$this->bbcode_second_pass_code('', '# androide
# CopySoft 2014 MontyDesing soft.
# Churrera 3.1

# Decoración
ENTERING SCREEN 9
IF TRUE
THEN
SET TILE (7, 2) = 25
SET TILE (8, 2) = 26
END
END
')

Este es mi make.bat.

$this->bbcode_second_pass_code('', '@echo off
rem Cambia "%1" por el nombre de tu güego.
echo ### COMPILANDO SCRIPT ###
cd ..script
msc androide.spt msc.h 24
copy *.h ..dev
rem no olvides cambiar NPANT por el nº de pantallas
msc androide.spt msc.h 24
copy *.h ..\dev
cd ..\dev
echo -------------------------------------------------------------------------------
echo ### REGENERANDO MAPA ###
cd ..\map
rem cambia ANCHO y ALTO por los valores de tu mapa:
..\utils\mapcnv mapa.map ANCHO ALTO 15 10 15 packed
copy mapa.h ..\dev
cd ..\dev
echo -------------------------------------------------------------------------------
echo ### COMPILANDO GUEGO ###
zcc +zx -vn androide.c -o androide.bin -lndos -lsplib2 -zorg=24200
echo -------------------------------------------------------------------------------
echo ### CONSTRUYENDO CINTA ###
rem cambia LOADER por el nombre que quieres que salga en Program:
..\utils\bas2tap -a10 -sANDROIDE loader.bas loader.tap
..\utils\bin2tap -o screen.tap -a 16384 loading.bin
..\utils\bin2tap -o main.tap -a 24200 androide.bin
copy /b loader.tap + screen.tap + main.tap androide.tap
echo -------------------------------------------------------------------------------
echo ### LIMPIANDO ###
del loader.tap
del screen.tap
del main.tap
del androide.bin
echo -------------------------------------------------------------------------------
echo ### DONE ###')

meto en ...\dev\androide.spt y compilo y al cargar el .tap carga el loading pero al llegar al title se cuelga y se resetea,sabeis porque puede ser?.

Un saludo y si necesitais mas datos decirme ;)
renegade
Mensajes: 63
Registrado: Sab, 15 Feb 2014, 19:13

Re: Script

Mensajepor renegade » Dom, 02 Mar 2014, 06:52

Este es mi config.h

$this->bbcode_second_pass_code('', '// Config.h
// Churrera v.4
// Copyleft 2010, 2011 The Mojon Twins

// ============================================================================
// I. General configuration
// ============================================================================

//#define MODE_128K // Experimental!

// In this section we define map dimmensions, initial and authomatic ending conditions, etc.

#define MAP_W 8 //
#define MAP_H 3 // Map dimmensions in screens
#define SCR_INICIO 8 // Initial screen
#define PLAYER_INI_X 2 //
#define PLAYER_INI_Y 7 // Initial tile coordinates
#define SCR_FIN 16 // Last screen. 99 = deactivated.
#define PLAYER_FIN_X 7 //
#define PLAYER_FIN_Y 2 // Player tile coordinates to finish game
#define PLAYER_NUM_OBJETOS 20 // Objects to get to finish game
#define PLAYER_LIFE 50 // Max and starting life gauge.
#define PLAYER_REFILL 25 // Life recharge
//#define COMPRESSED_LEVELS // use levels.h instead of mapa.h and enems.h (!)
//#define MAX_LEVELS 4 // # of compressed levels
//#define REFILL_ME // If defined, refill player on each level

// ============================================================================
// II. Engine type
// ============================================================================

// This section is used to define the game engine behaviour. Many directives are related,
// and others are mutually exclusive. I think this will be pretty obvious when you look at them.

// Right now the shooting engine is only compatible with the side-view engine.

// Bounding box size
// -----------------
// Comment both for normal 16x16 bounding box
#define BOUNDING_BOX_8_BOTTOM // 8x8 aligned to bottom center in 16x16
//#define BOUNDING_BOX_8_CENTERED // 8x8 aligned to center in 16x16
//define SMALL_COLLISION // 8x8 centered collision instead of 12x12

// General directives:
// -------------------

#define PLAYER_AUTO_CHANGE_SCREEN // Player changes screen automaticly (no need to press direction)
//#define PLAYER_CHECK_MAP_BOUNDARIES // If defined, you can't exit the map.
//#define DIRECT_TO_PLAY // If defined, title screen is also the game frame.
//#define DEACTIVATE_KEYS // If defined, keys are not present.
//#define DEACTIVATE_OBJECTS // If defined, objects are not present.
//#define ONLY_ONE_OBJECT // If defined, only one object can be carried at a time.
#define OBJECT_COUNT 1 // Defines which FLAG will be used to store the object count.
//#define DEACTIVATE_EVIL_TILE // If defined, no killing tiles (behaviour 1) are detected.
#define FULL_BOUNCE // If defined, evil tile bounces equal MAX_VX, otherwise v/2
//#define PLAYER_BOUNCES // If defined, collisions make player bounce
//#define SLOW_DRAIN // Works with bounces. Drain is 4 times slower
//#define PLAYER_FLICKERS // If defined, collisions make player flicker instead.
//#define MAP_BOTTOM_KILLS // If defined, exiting the map bottomwise kills.
#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary
//#define EVERYTHING_IS_A_WALL // If defined, any tile <> type 0 is a wall, otherwise just 8.
//#define ENABLE_PURSUERS // If defined, type 7 enemies are active
//#define DEATH_COUNT_EXPRESSION 20+(rand()&15)
//#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always #
//#define TYPE_6_FIXED_SPRITE 2 // Sprite used - 1.
//#define SIGHT_DISTANCE 104 // Used in our type 6 enemies.
//#define USE_TWO_BUTTONS // Alternate keyboard scheme for two-buttons games
#define USE_HOTSPOTS_TYPE_3 // Alternate logic for recharges.

// Pushable tile
// -------------

#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable. Must be type 10.
//#define FIRE_TO_PUSH // If defined, you have to press FIRE+direction to push.
//#define ENABLE_PUSHED_SCRIPTING // If defined, nice goodies (below) are activated:
//#define MOVED_TILE_FLAG 1 // Current tile "overwritten" with block is stored here.
//#define MOVED_X_FLAG 2 // X after pushing is stored here.
//#define MOVED_Y_FLAG 3 // Y after pushing is stored here.
//#define PUSHING_ACTION // If defined, pushing a tile runs PRESS_FIRE script

// Shooting behaviour
// ------------------

#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled.
#define PLAYER_BULLET_SPEED 8 // Pixels/frame.
#define MAX_BULLETS 3 // Max number of bullets on screen. Be careful!.
#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top.
#define PLAYER_BULLET_X_OFFSET 0 // vertical offset from the player's left/right.
#define ENEMIES_LIFE_GAUGE 1 // Amount of shots needed to kill enemies.
#define RESPAWN_ON_ENTER // Enemies respawn when entering screen
#define FIRE_MIN_KILLABLE 1 // If defined, only enemies >= N can be killed.
#define CAN_FIRE_UP // If defined, player can fire upwards and diagonal.
#define MAX_AMMO 99 // If defined, ammo is not infinite!
#define AMMO_REFILL 99 // ammo refill, using tile 20 (hotspot #4)
#define INITIAL_AMMO 50 // If defined, ammo = X when entering game.

//#define BREAKABLE_WALLS // Breakable walls
//#define BREAKABLE_WALLS_LIFE 3 // Amount of hits to break wall

//#define ENABLE_RANDOM_RESPAWN // If defined, automatic flying enemies spawn on killed enemies
#define FANTY_MAX_V 256 // Flying enemies max speed (also for custom type 6 if you want)
#define FANTY_A 16 // Flying enemies acceleration.
//#define FANTIES_LIFE_GAUGE 10 // Amount of shots needed to kill flying enemies.

// Scripting
// ---------

#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff.
//#define SCRIPTING_DOWN // Use DOWN as the action key.
//#define SCRIPTING_KEY_M // Use M as the action key instead.
//#define SCRIPTING_KEY_FIRE // User FIRE as the action key instead.
//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n
#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE"

// Timer
// -----

//#define TIMER_ENABLE // Enable timer
//#define TIMER_INITIAL 99 // For unscripted games, initial value.
//#define TIMER_REFILL 30 // Timer refill, using tile 21 (hotspot #5)
//#define TIMER_LAPSE 32 // # of frames between decrements
//#define TIMER_START // If defined, start timer from the beginning
//#define TIMER_SCRIPT_0 // If defined, timer = 0 runs "ON_TIMER_OFF" in the script
//#define TIMER_GAMEOVER_0 // If defined, timer = 0 causes "game over"
//#define TIMER_KILL_0 // If defined, timer = 0 causes "one life less".
//#define TIMER_WARP_TO 0 // If defined, warp to screen X after "one life less".
//#define TIMER_WARP_TO_X 1 //
//#define TIMER_WARP_TO_Y 1 // "warp to" coordinates.
//#define TIMER_AUTO_RESET // If defined, timer resets after "one life less"
//#define SHOW_TIMER_OVER // If defined, "TIME OVER" shows when time is up.

// Top view:
// ---------

//#define PLAYER_MOGGY_STYLE // Enable top view.
//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT

// Side view:
// ----------

#define PLAYER_HAS_JUMP // If defined, player is able to jump.
//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac
#define PLAYER_KILLS_ENEMIES // If defined, stepping on enemies kills them
//#define PLAYER_MIN_KILLABLE 3 // Only kill enemies with id >= PLAYER_MIN_KILLABLE
//#define PLAYER_BOOTEE // Always jumping engine. Don't forget to disable "HAS_JUMP" and "HAS_JETPAC"!!!
//#define PLAYER_STEP_SOUND // Sound while walking. No effect in the BOOTEE engine.
#define PLAYER_BOUNCE_WITH_WALLS // Bounce when hitting a wall. Only really useful in MOGGY_STYLE mode
//#define PLAYER_CUMULATIVE_JUMP // Keep pressing JUMP to JUMP higher in several bounces

// ============================================================================
// III. Screen configuration
// ============================================================================

// This sections defines how stuff is rendered, where to show counters, etcetera

#define VIEWPORT_X 1 //
#define VIEWPORT_Y 3 // Viewport character coordinates
#define LIFE_X 4 //
#define LIFE_Y 1 // Life gauge counter character coordinates
#define OBJECTS_X 9 //
#define OBJECTS_Y 1 // Objects counter character coordinates
#define OBJECTS_ICON_X 99 //
#define OBJECTS_ICON_Y 99 // Objects icon character coordinates (use with ONLY_ONE_OBJECT)
#define KEYS_X 14 //
#define KEYS_Y 1 // Keys counter character coordinates
#define KILLED_X 16 //
#define KILLED_Y 1 // Kills counter character coordinates
//#define PLAYER_SHOW_KILLS // If defined, show kill counter.
#define AMMO_X 18 //
#define AMMO_Y 1 // Ammo counter character coordinates
#define TIMER_X 99 //
#define TIMER_Y 99 // Timer counter coordinates
//#define PLAYER_SHOW_TIMER // If defined, show timer counter

// Text
#define LINE_OF_TEXT 1 // If defined, scripts can show text @ Y = #
#define LINE_OF_TEXT_X 1 // X coordinate.
#define LINE_OF_TEXT_ATTR 71 // Attribute

// Graphic FX, uncomment which applies...

//#define USE_AUTO_SHADOWS // Automatic shadows made of darker attributes
//#define USE_AUTO_TILE_SHADOWS // Automatic shadows using specially defined tiles 32-47.
//#define UNPACKED_MAP // Full, uncompressed maps. Shadows settings are ignored.
//#define NO_MASKS // Sprites are rendered using OR instead of masks.
//#define PLAYER_ALTERNATE_ANIMATION // If defined, animation is 1,2,3,1,2,3...
//#define MASKED_BULLETS // If needed
//#define ENABLE_TILANIMS 32 // If defined, animated tiles are enabled.
// the value especifies firt animated tile pair.
#define PAUSE_ABORT // Add h=PAUSE, y=ABORT
//#define GET_X_MORE // Shows "get X more" when getting an object

// ============================================================================
// IV. Player movement configuration
// ============================================================================

// This section is used to define which constants are used in the gravity/acceleration engine.
// If a side-view engine is configured, we have to define vertical and horizontal constants
// separately. If a top-view engine is configured instead, the horizontal values are also
// applied to the vertical component, vertical values are ignored.

// IV.1. Vertical movement. Only for side-view.

#define PLAYER_MAX_VY_CAYENDO 356 // Max falling speed (512/64 = 8 pixels/frame)
#define PLAYER_G 36 // Gravity acceleration (32/64 = 0.5 píxeles/frame^2)

#define PLAYER_VY_INICIAL_SALTO 120 // Initial junp velocity (64/64 = 1 píxel/frame)
#define PLAYER_MAX_VY_SALTANDO 320 // Max jump velocity (320/64 = 5 píxels/frame)
#define PLAYER_INCR_SALTO 44 // acceleration while JUMP is pressed (48/64 = 0.75 píxeles/frame^2)

//#define PLAYER_INCR_JETPAC 32 // Vertical jetpac gauge
//#define PLAYER_MAX_VY_JETPAC 256 // Max vertical jetpac speed

// IV.2. Horizontal (side view) or general (top view) movement.

#define PLAYER_MAX_VX 256 // Max velocity (192/64 = 3 píxels/frame)
#define PLAYER_AX 56 // Acceleration (24/64 = 0,375 píxels/frame^2)
#define PLAYER_RX 36 // Friction (32/64 = 0,5 píxels/frame^2)

// ============================================================================
// V. Tile behaviour
// ============================================================================

// Defines the behaviour for each tile. Remember that if keys are activated, tile #15 is a bolt
// and, therefore, it should be made a full obstacle!

// 0 = Walkable (no action)
// 1 = Walkable and kills.
// 2 = Walkable and hides.
// 4 = Platform (only stops player if falling on it)
// 8 = Full obstacle (blocks player from all directions)
// 10 = special obstacle (pushing blocks OR locks!)
// 16 = Breakable (#ifdef BREAKABLE_WALLS)
// You can add the numbers to get combined behaviours
// Save for 10 (special), but that's obvious, innit?
#ifndef COMPRESSED_LEVELS
unsigned char comportamiento_tiles [] = {
0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 8, 8, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
#endif')
Avatar de Usuario
son_link
Mensajes: 467
Registrado: Mar, 01 Oct 2013, 11:49
Ubicación: Atlantis, Galaxia Pegaso
Contactar:

Re: Script

Mensajepor son_link » Dom, 02 Mar 2014, 11:17

Borra esta lineas del make.bat, aparte de que están mal, estan repetidas (son las mismas que van después del rem:
$this->bbcode_second_pass_code('', '
cd ..script
copy *.h ..dev
')

y asegurate de que has cambiado el 24 por el numero total de pantallas de tu juego
$this->bbcode_second_pass_code('', '
rem no olvides cambiar NPANT por el nº de pantallas
msc androide.spt msc.h 24
')
Y en config.h tienes que descomentar una de estas lineas para definir que tecla se usara como el botón de acción:
$this->bbcode_second_pass_code('', '
//#define SCRIPTING_DOWN // Use DOWN as the action key.
//#define SCRIPTING_KEY_M
')

Por lo demás no veo nada raro de momento
LOAD TAPE ERROR
Image
Avatar de Usuario
na_th_an
Mensajes: 26413
Registrado: Vie, 09 Ene 2009, 12:18

Re: Script

Mensajepor na_th_an » Dom, 02 Mar 2014, 12:24

Comprueba también el tamaño del binario. A lo mejor te estás pasando de 36455 bytes y por eso se te resetea. Si usas spectaculator, puedes abrir el tape browser y mirar cuánto ocupa el último binario del tap cuando lo cargues.
Como diría Rorshach: "Urm..."
renegade
Mensajes: 63
Registrado: Sab, 15 Feb 2014, 19:13

Re: Script

Mensajepor renegade » Dom, 02 Mar 2014, 15:27

Perfecto ya no me tira pero ahora al activar el scripting en el marcador me pasa lo siguiente.

Image Subido en subir imagenes

es como si una tira de tiles negros taparan un poco los iconos del marcador tras los numeros del mismo.

Un saludo y muchas gracias por la ayuda ;)
Avatar de Usuario
na_th_an
Mensajes: 26413
Registrado: Vie, 09 Ene 2009, 12:18

Re: Script

Mensajepor na_th_an » Dom, 02 Mar 2014, 15:58

Échale un vistazo al capítulo 7. Esa tira es la tira de textos para el scripting, para desactivarla comenta la linea LINE_OF_TEXT en config.h
Como diría Rorshach: "Urm..."
renegade
Mensajes: 63
Registrado: Sab, 15 Feb 2014, 19:13

Re: Script

Mensajepor renegade » Dom, 02 Mar 2014, 16:42

Muchas gracias se me habia pasado ese fragmento del tuto sorry :D siguen sin aparecerme los tiles extra :brasas:
renegade
Mensajes: 63
Registrado: Sab, 15 Feb 2014, 19:13

Re: Script

Mensajepor renegade » Lun, 03 Mar 2014, 06:26

Lo tengo ya todo correctamente y siguen sin salirme los tiles extras,pongo a continuacion como lo tengo todo:

Config.h:

$this->bbcode_second_pass_code('', '// Config.h
// Churrera v.4
// Copyleft 2010, 2011 The Mojon Twins

// ============================================================================
// I. General configuration
// ============================================================================

//#define MODE_128K // Experimental!

// In this section we define map dimmensions, initial and authomatic ending conditions, etc.

#define MAP_W 8 //
#define MAP_H 3 // Map dimmensions in screens
#define SCR_INICIO 8 // Initial screen
#define PLAYER_INI_X 2 //
#define PLAYER_INI_Y 7 // Initial tile coordinates
#define SCR_FIN 16 // Last screen. 99 = deactivated.
#define PLAYER_FIN_X 7 //
#define PLAYER_FIN_Y 3 // Player tile coordinates to finish game
#define PLAYER_NUM_OBJETOS 15 // Objects to get to finish game
#define PLAYER_LIFE 99 // Max and starting life gauge.
#define PLAYER_REFILL 50 // Life recharge
//#define COMPRESSED_LEVELS // use levels.h instead of mapa.h and enems.h (!)
//#define MAX_LEVELS 4 // # of compressed levels
//#define REFILL_ME // If defined, refill player on each level

// ============================================================================
// II. Engine type
// ============================================================================

// This section is used to define the game engine behaviour. Many directives are related,
// and others are mutually exclusive. I think this will be pretty obvious when you look at them.

// Right now the shooting engine is only compatible with the side-view engine.

// Bounding box size
// -----------------
// Comment both for normal 16x16 bounding box
#define BOUNDING_BOX_8_BOTTOM // 8x8 aligned to bottom center in 16x16
//#define BOUNDING_BOX_8_CENTERED // 8x8 aligned to center in 16x16
//define SMALL_COLLISION // 8x8 centered collision instead of 12x12

// General directives:
// -------------------

#define PLAYER_AUTO_CHANGE_SCREEN // Player changes screen automaticly (no need to press direction)
//#define PLAYER_CHECK_MAP_BOUNDARIES // If defined, you can't exit the map.
//#define DIRECT_TO_PLAY // If defined, title screen is also the game frame.
//#define DEACTIVATE_KEYS // If defined, keys are not present.
//#define DEACTIVATE_OBJECTS // If defined, objects are not present.
//#define ONLY_ONE_OBJECT // If defined, only one object can be carried at a time.
#define OBJECT_COUNT 1 // Defines which FLAG will be used to store the object count.
//#define DEACTIVATE_EVIL_TILE // If defined, no killing tiles (behaviour 1) are detected.
#define FULL_BOUNCE // If defined, evil tile bounces equal MAX_VX, otherwise v/2
//#define PLAYER_BOUNCES // If defined, collisions make player bounce
//#define SLOW_DRAIN // Works with bounces. Drain is 4 times slower
//#define PLAYER_FLICKERS // If defined, collisions make player flicker instead.
//#define MAP_BOTTOM_KILLS // If defined, exiting the map bottomwise kills.
#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary
//#define EVERYTHING_IS_A_WALL // If defined, any tile <> type 0 is a wall, otherwise just 8.
//#define ENABLE_PURSUERS // If defined, type 7 enemies are active
//#define DEATH_COUNT_EXPRESSION 20+(rand()&15)
//#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always #
//#define TYPE_6_FIXED_SPRITE 2 // Sprite used - 1.
//#define SIGHT_DISTANCE 104 // Used in our type 6 enemies.
//#define USE_TWO_BUTTONS // Alternate keyboard scheme for two-buttons games
#define USE_HOTSPOTS_TYPE_3 // Alternate logic for recharges.

// Pushable tile
// -------------

#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable. Must be type 10.
//#define FIRE_TO_PUSH // If defined, you have to press FIRE+direction to push.
//#define ENABLE_PUSHED_SCRIPTING // If defined, nice goodies (below) are activated:
//#define MOVED_TILE_FLAG 1 // Current tile "overwritten" with block is stored here.
//#define MOVED_X_FLAG 2 // X after pushing is stored here.
//#define MOVED_Y_FLAG 3 // Y after pushing is stored here.
//#define PUSHING_ACTION // If defined, pushing a tile runs PRESS_FIRE script

// Shooting behaviour
// ------------------

#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled.
#define PLAYER_BULLET_SPEED 8 // Pixels/frame.
#define MAX_BULLETS 3 // Max number of bullets on screen. Be careful!.
#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top.
#define PLAYER_BULLET_X_OFFSET 0 // vertical offset from the player's left/right.
#define ENEMIES_LIFE_GAUGE 1 // Amount of shots needed to kill enemies.
#define RESPAWN_ON_ENTER // Enemies respawn when entering screen
#define FIRE_MIN_KILLABLE 1 // If defined, only enemies >= N can be killed.
#define CAN_FIRE_UP // If defined, player can fire upwards and diagonal.
#define MAX_AMMO 99 // If defined, ammo is not infinite!
#define AMMO_REFILL 10 // ammo refill, using tile 20 (hotspot #4)
#define INITIAL_AMMO 99 // If defined, ammo = X when entering game.

//#define BREAKABLE_WALLS // Breakable walls
//#define BREAKABLE_WALLS_LIFE 3 // Amount of hits to break wall

//#define ENABLE_RANDOM_RESPAWN // If defined, automatic flying enemies spawn on killed enemies
//#define FANTY_MAX_V 256 // Flying enemies max speed (also for custom type 6 if you want)
//#define FANTY_A 16 // Flying enemies acceleration.
//#define FANTIES_LIFE_GAUGE 10 // Amount of shots needed to kill flying enemies.

// Scripting
// ---------

#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff.
#define SCRIPTING_DOWN // Use DOWN as the action key.
//#define SCRIPTING_KEY_M // Use M as the action key instead.
//#define SCRIPTING_KEY_FIRE // User FIRE as the action key instead.
//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n
#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE"

// Timer
// -----

//#define TIMER_ENABLE // Enable timer
//#define TIMER_INITIAL 99 // For unscripted games, initial value.
//#define TIMER_REFILL 30 // Timer refill, using tile 21 (hotspot #5)
//#define TIMER_LAPSE 32 // # of frames between decrements
//#define TIMER_START // If defined, start timer from the beginning
//#define TIMER_SCRIPT_0 // If defined, timer = 0 runs "ON_TIMER_OFF" in the script
//#define TIMER_GAMEOVER_0 // If defined, timer = 0 causes "game over"
//#define TIMER_KILL_0 // If defined, timer = 0 causes "one life less".
//#define TIMER_WARP_TO 0 // If defined, warp to screen X after "one life less".
//#define TIMER_WARP_TO_X 1 //
//#define TIMER_WARP_TO_Y 1 // "warp to" coordinates.
//#define TIMER_AUTO_RESET // If defined, timer resets after "one life less"
//#define SHOW_TIMER_OVER // If defined, "TIME OVER" shows when time is up.

// Top view:
// ---------

//#define PLAYER_MOGGY_STYLE // Enable top view.
//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT

// Side view:
// ----------

#define PLAYER_HAS_JUMP // If defined, player is able to jump.
//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac
#define PLAYER_KILLS_ENEMIES // If defined, stepping on enemies kills them
//#define PLAYER_MIN_KILLABLE 3 // Only kill enemies with id >= PLAYER_MIN_KILLABLE
//#define PLAYER_BOOTEE // Always jumping engine. Don't forget to disable "HAS_JUMP" and "HAS_JETPAC"!!!
//#define PLAYER_STEP_SOUND // Sound while walking. No effect in the BOOTEE engine.
#define PLAYER_BOUNCE_WITH_WALLS // Bounce when hitting a wall. Only really useful in MOGGY_STYLE mode
//#define PLAYER_CUMULATIVE_JUMP // Keep pressing JUMP to JUMP higher in several bounces

// ============================================================================
// III. Screen configuration
// ============================================================================

// This sections defines how stuff is rendered, where to show counters, etcetera

#define VIEWPORT_X 1 //
#define VIEWPORT_Y 3 // Viewport character coordinates
#define LIFE_X 4 //
#define LIFE_Y 1 // Life gauge counter character coordinates
#define OBJECTS_X 9 //
#define OBJECTS_Y 1 // Objects counter character coordinates
#define OBJECTS_ICON_X 99 //
#define OBJECTS_ICON_Y 99 // Objects icon character coordinates (use with ONLY_ONE_OBJECT)
#define KEYS_X 14 //
#define KEYS_Y 1 // Keys counter character coordinates
#define KILLED_X 16 //
#define KILLED_Y 1 // Kills counter character coordinates
//#define PLAYER_SHOW_KILLS // If defined, show kill counter.
#define AMMO_X 19 //
#define AMMO_Y 1 // Ammo counter character coordinates
#define TIMER_X 99 //
#define TIMER_Y 99 // Timer counter coordinates
//#define PLAYER_SHOW_TIMER // If defined, show timer counter

// Text
//#define LINE_OF_TEXT 1 // If defined, scripts can show text @ Y = #
#define LINE_OF_TEXT_X 1 // X coordinate.
#define LINE_OF_TEXT_ATTR 71 // Attribute

// Graphic FX, uncomment which applies...

//#define USE_AUTO_SHADOWS // Automatic shadows made of darker attributes
//#define USE_AUTO_TILE_SHADOWS // Automatic shadows using specially defined tiles 32-47.
//#define UNPACKED_MAP // Full, uncompressed maps. Shadows settings are ignored.
//#define NO_MASKS // Sprites are rendered using OR instead of masks.
//#define PLAYER_ALTERNATE_ANIMATION // If defined, animation is 1,2,3,1,2,3...
//#define MASKED_BULLETS // If needed
//#define ENABLE_TILANIMS 32 // If defined, animated tiles are enabled.
// the value especifies firt animated tile pair.
#define PAUSE_ABORT // Add h=PAUSE, y=ABORT
//#define GET_X_MORE // Shows "get X more" when getting an object

// ============================================================================
// IV. Player movement configuration
// ============================================================================

// This section is used to define which constants are used in the gravity/acceleration engine.
// If a side-view engine is configured, we have to define vertical and horizontal constants
// separately. If a top-view engine is configured instead, the horizontal values are also
// applied to the vertical component, vertical values are ignored.

// IV.1. Vertical movement. Only for side-view.

#define PLAYER_MAX_VY_CAYENDO 356 // Max falling speed (512/64 = 8 pixels/frame)
#define PLAYER_G 36 // Gravity acceleration (32/64 = 0.5 píxeles/frame^2)

#define PLAYER_VY_INICIAL_SALTO 120 // Initial junp velocity (64/64 = 1 píxel/frame)
#define PLAYER_MAX_VY_SALTANDO 320 // Max jump velocity (320/64 = 5 píxels/frame)
#define PLAYER_INCR_SALTO 44 // acceleration while JUMP is pressed (48/64 = 0.75 píxeles/frame^2)

//#define PLAYER_INCR_JETPAC 32 // Vertical jetpac gauge
//#define PLAYER_MAX_VY_JETPAC 256 // Max vertical jetpac speed

// IV.2. Horizontal (side view) or general (top view) movement.

#define PLAYER_MAX_VX 256 // Max velocity (192/64 = 3 píxels/frame)
#define PLAYER_AX 56 // Acceleration (24/64 = 0,375 píxels/frame^2)
#define PLAYER_RX 36 // Friction (32/64 = 0,5 píxels/frame^2)

// ============================================================================
// V. Tile behaviour
// ============================================================================

// Defines the behaviour for each tile. Remember that if keys are activated, tile #15 is a bolt
// and, therefore, it should be made a full obstacle!

// 0 = Walkable (no action)
// 1 = Walkable and kills.
// 2 = Walkable and hides.
// 4 = Platform (only stops player if falling on it)
// 8 = Full obstacle (blocks player from all directions)
// 10 = special obstacle (pushing blocks OR locks!)
// 16 = Breakable (#ifdef BREAKABLE_WALLS)
// You can add the numbers to get combined behaviours
// Save for 10 (special), but that's obvious, innit?
#ifndef COMPRESSED_LEVELS
unsigned char comportamiento_tiles [] = {
0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 8, 8, 10, 10,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
#endif
')

androide.spt

$this->bbcode_second_pass_code('', '# Androide zx spectrum 48k
# Copyleft 2014 Montydesing.
# Churrera 3.99.3

# Decoracion
ENTERING SCREEN 8
IF TRUE
THEN
# decoracion tiles extra
SET TILE (3, 7) = 24
SET TILE (4, 7) = 22
SET TILE (4, 6) = 23
END
END
')

Si necesitais algo mas pedirmelo,solo me queda esto para darle unos detalles y estara terminado,gracias de antemano. ;)
renegade
Mensajes: 63
Registrado: Sab, 15 Feb 2014, 19:13

Re: Script

Mensajepor renegade » Lun, 03 Mar 2014, 07:07

El bloque pesa 35393k asi que hasta 36455k me gustaria meter los que me entren ;) y si tubiera que hacer sitio con las pantallas fijas lo hare encantado ;)
Última edición por renegade el Lun, 03 Mar 2014, 07:19, editado 1 vez en total.
Avatar de Usuario
son_link
Mensajes: 467
Registrado: Mar, 01 Oct 2013, 11:49
Ubicación: Atlantis, Galaxia Pegaso
Contactar:

Re: Script

Mensajepor son_link » Lun, 03 Mar 2014, 07:07

En config.h descomenta la siguiente linea:
$this->bbcode_second_pass_code('', '#define UNPACKED_MAP')
Si se van a usar mas de 18 tiles (salvo para sombras) tienes que descomentar esa linea
LOAD TAPE ERROR
Image

Volver a “La Churrera”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 2 invitados