Vista normal Vista MARC Vista ISBD

GameMaker game programming with GML

por DeLucas, Matthew
Publicado por : : Packt Publishing (Birgimingham ) Detalles físicos: IX, 328 p. ; 24 cm ISBN:9781783559442. Año : 2014
Tipo de ítem Ubicación actual Colección Signatura Estado Fecha de vencimiento Código de barras
Libros recomendados Libros recomendados U-Tad Biblioteca
General Stacks
Non-fiction 004.42 GameMaker DEL (Navegar estantería) Disponible 0001677

Índice

1. Getting Started – An Introduction to GML
Creating GML scripts
Creating GML scripts within an event
Creating scripts as resources
Scripting a room's creation code
Understanding parts of GML scripts
Programs
snake_case
Variables
Variable prefixes
Variable scope
Built-in variables
Creating custom constants
Functions and accessing script resources
Arguments
Expressions
Expression symbols
Conditional statements
If, else, and switch
repeat, while, do, and for
break, continue, and return
Arrays
Two-dimensional arrays
Commenting
Errors
Pushing your buttons
Creating the project
Gathering resources
Sprites – spr_button
Objects – obj_button
Room – rm_main
The events of obj_button
The Create event
The Left Button event
The Left Pressed event
The Mouse Enter event
The Mouse Leave event
The Global left release event
The Draw GUI event
Scripts – scr_create_button
scr_random_position
Creating buttons using scripts
Scripting room creation code
Creating scr_random_position
Exporting and importing the button
Summary
2. Random Organization – Creating a Puzzle Game
Understanding sprite variables and functions
Positioning and origin
Layering with depth
Rotating
Scaling
Working with frames and color
Setting up the puzzle game
Sprites – spr_grid
spr_pieces
Objects – obj_grid_manager
obj_grid_block and obj_puzzle_piece
Room – rm_gameplay
Scripts
Aligning the pieces of the puzzle game to a grid
The Create event of obj_grid_manager
scr_create_in_grid
Understanding and utilizing randomization
Random functions
Randomizing the board
Checking pieces
scr_get_puzzle_piece
scr_check_adjacent
scr_check_board
Running it all together
Summary
3. So How Do I Play? – Adding Player Interaction
Designing player interaction
Reading input with the mouse
Understanding mouse variables and functions
Working with touch devices
Creating resources to integrate mouse input into the puzzle game
Adding new events to obj_grid_manager
The Create event
Updating spr_grid and obj_grid_block
Adding new frames to spr_grid
Implementing the Mouse events for obj_grid_block
Entering the grid with the mouse
Pressing the left mouse button
Releasing the left mouse button globally
The Mouse Leave event
Swapping pieces
obj_puzzle_piece
scr_swap_pieces
Updating scr_check_board
Updating organization with scr_reorganize_board
Integrating keyboard input
Introducing keyboard functions, variables, and events
Integrating the Keyboard event updates
Utilizing the press event
Implementing the release event
Summary
4. Juicy Feedback – Aural and Visual Effects
Introducing alarms
Arming the puzzle game's alarms
Setting up the first alarm
Are pieces shifting?
Applying is_shifting_pieces
Determining where pieces should move
Setting the Alarm 0 event of obj_puzzle_piece
Making pieces fall with Alarm 1 in obj_puzzle_piece
Setting the alarms
Updating scr_swap_pieces
Updating scr_check_board
Updating scr_reorganize_board
Hiding the pin drop – adding audio
Creating sound resources
Gathering audio resources
Introducing audio functions
Playing puzzling sounds
Swapping sounds in scr_swap_pieces
Playing the pop sound in scr_reorganize_board
Fading in the music with obj_grid_manager
Visualizing effects with particles
Managing a particle system
Emitting particles
Shaping and distributing within emitters
Creating different particle types
Shaping particle types
Particle-specific functions
Integrating particles
obj_particle_manager
The Create event
The Destroy event
Placing obj_particle_manager
Creating bursts within scr_reorganize_board
Summary
5. Solving the Puzzle – Finishing Touches to the Puzzle Game
Drawing and graphical user interface
Understanding draw functions
Drawing rectangles
Setting color and alpha
Drawing circles and ellipses
Setting a circle's precision
Drawing points, lines, and arrows
Drawing text
Setting font and text alignment
Drawing sprites
Tiling sprites
Establishing the drawing order
Gathering resources for creating the main menu
Creating obj_main_menu
Building a new room – rm_main_menu
Creating fonts – fnt_title and fnt_main
Creating the fonts
Scripting obj_main_menu
The Create event
Utilizing div and mod
Drawing the menu
The Global Left Button event
The press event
The Global Left Release event
The release event
event_perform
scr_on_menu_button_pressed
Changing obj_grid_manager
Integrating score and time
Scoring and combos
The Create event of obj_grid_manager
Earning points in scr_reorganize_board
Drawing UI in obj_grid_manager
Timing and game over
Adding new variables to the Create event of obj_grid_manager
Using Alarm 1 and Alarm 2 in obj_grid_manager
Alarm 1
Alarm 2
Drawing the timer
Summary
6. Finite State Machines – Starting the 2D Platformer
Introducing finite state machines
Gathering resources for the platformer
Establishing Lil' Vlad's sprites
The standing sprite – spr_vlad_idle
The walking sprite – spr_vlad_walk
The jumping sprite – spr_vlad_jump
Jumping with sound – snd_jump
Creating a new object resource – obj_vlad
Utilizing the User defined events
Placing Vlad in a room – rm_level1
Defining Vlad's state constants
Starting Vlad's events and scripts – walking
The Create event
The Step event
Standing still – the User Defined 0 event
Walk this way – the User Defined 1 event
Adding new variables for jumping
Using up to jump – the Step event update
Falling state – the User Defined 2 event
Looping the jump – the Animation End event
Summary
7. It's in the Name – Platforms and Collisions
Collision – a crash course
Creating masks for collision
Working with placement and movement functions
Testing placement
Movement functions
Gathering resources to build platforms
Sprites – spr_basic_platform and spr_solid_platform
Objects – obj_basic_platform and obj_solid_platform
Solidifying objects
Populating the room
Working with Collision events
Updating the Create event of obj_vlad
The Collision events of obj_vlad
Creating the script resource scr_test_collision
Updating the Step event
Moving platforms with paths
Creating path resources
Utilizing the path_start function
Gathering resources for the path creation
The spr_moving_platform sprite
obj_moving_platform
pth_horizontal and pth_vertical_ellipse
Integrating the moving platforms
Creating instances of obj_moving_platform
Interacting with obj_moving_platform
Creating a new variable – current_platform
Updating to the User Defined 2 event
scr_test_collision and current_platform
Using the Step End event
Drawing a path
Preventing Vlad from leaving
Defining global.room_left and global.room_right
Updating the End Step event
Knowing the design ahead of time (when possible)
Summary
8. Setting the Stage – Views, Backgrounds, and Tiles
Expanding the room – views
Setting the view
Adjusting view parameters
Preparing the game for obj_camera
The Create event
The End Step event
Adding the camera with Creation Code
Setting the environment – backgrounds
Introducing background variables
Creating background resources
Preparing the game for background resources
Building an atmosphere with bg_main
Utilizing the background
Setting a background index with bg_index
Scripting scr_inverse_lerp
Moving the background in the End Step event of obj_camera
Introducing tiles
Creating tiles
Building resources for tiles
Tiling with bg_tiles_main
Applying tiles
Utilizing tile_add and other tile functions
Placing tiles with scripts – scr_define_tiles
Using scr_define_tiles
Drawing tiles in obj_moving_platform
Summary
9. Breaking Vlad – Pickups, Hazards, and Enemies
Tracking health with Draw and Draw GUI
Displaying UI with the Draw and Draw GUI events
Creating a new font – fnt_score_text
Setting up the Draw GUI event
Displaying health with the Draw event
Updating the Create event
Arming the Alarm 0 event in obj_vlad
Working with pickups
Gathering resources to create pickups
Initializing sprite resources for pickups
Pickup object resources
Script resource – scr_collect_pickup
Colliding with obj_vlad
Dying from hazards
Establishing a death state
Setting up two new events – User Defined 3 and Alarm 1
Gathering resources for hazards
Creating the sprite and object resources
Scripting scr_damage_vlad
Falling off the screen into the abyss
Fighting the player with enemies
Enemy 1 – mutant garlic
Gathering resources for garlic
Sprite resource – spr_enemy_garlic
Object resource – obj_enemy_garlic
Scripting the Create event of obj_enemy_garlic
Making garlic move with the Step event
Reacting upon collision with scr_collide_enemy
Colliding with the player – the Collision event of obj_vlad
Enemy 2 – the flying book
Gathering resources to create the flying book
The sprite resource – spr_enemy_book
The object resource – obj_enemy_book
Initializing the Create event of obj_enemy_book
Anthropomorphizing the book in the Step event
Summary
10. GOAL – Timelines and Feedback Review
GOAL!
Gathering resources for creating the goal
Sprite resource – spr_goal_door
Object resource – obj_goal_door
Introducing timelines
Using timelines
Gathering resources for integrating the timeline
Font resource – fnt_large_text
Creating and updating events for obj_goal_door
Using the Animation End event
Drawing congratulatory text with the Draw GUI event
Deactivating objects with scr_deactive_instances and the Draw event
Freezing instances with scr_deactivate_instances
Drawing deactivated instances
Creating and applying the timeline
Step 0
Step 15
Step 90
Applying tm_finish_level
Reviewing polish, feedback, and juiciness
Gathering resources to play sounds
Playing music with scr_play_music
Reviewing the obj_particle_manager object
Giving feedback with pickups
Providing feedback when Vlad is damaged
Extending the enemy death sequence
Updating scr_collide_enemy and Step events for enemies
Creating tm_enemy_death

No hay comentarios para este ítem.

Ingresar a su cuenta para colocar un comentario.