******************************************************************** Pascal Sprite Engine Users Guide v.1.0 by Chris Bryant (AtariJag64@hotmail.com) http://www.angelfire.com/ga2/cdsoft/ http://members.tripod.com/~PSE_Project/ ******************************************************************** Table of Contents: -Introduction to PSE -Introduction to PIX Draw -Getting Started -Advanced PSE Use -Game Concepts -Special Thanks ******************************************************************** Introduction to PSE ******************************************************************** -So what is the Pascal Sprite Engine? Red Ant Production's Pascal Sprite Engine was designed to make it quick and easy to create sprite-based programs using Turbo Pascal. This is exactly what PSE can do! Basically a sprite is a movable image onscreen, for example, Mario on Super Mario Bros. These sprites are movable in real-time, which brings your game or program to life. -What are the tech specs of PSE? Mode13h Graphics: 320x200x256 Virtual Screen Buffering Four Layers of Paralax Two Palette Fading Buffers Double Buffering TMode and Point of Origin Sprites 250 Sprites onscreen at once -So whats all this mean? Basically with the Pascal Sprite Engine and a little knowledge of Turbo Pascal, you can start designing and developing your very own game quickly and easily. ********************************************************************** Introduction to PIX Draw ********************************************************************** -What exactly is PIX Draw? PIX Draw allows you to draw, save, and import sprites. PIX is the file format used for sprites by PSE. With PIX Draw you can import your own pictures (in PCX form) and convert them to PIX for your program. PIX Draw also has the capability of saving and loading a color palette. -What is a color palette? A color palette is basically the number of colors you can have on screen at one time. When converting an image that is more than 256 colors, you will notice a downgrade in the image quality. This is causes by a limited color palette. One of the most important factors in making your game look realistic is a good palette. Basically its best to try to come up with a picture that has a LARGE variety of colors, then import it into a drawing program and optimize it to 256 colors. Save this image as a pcx file then import it into PIX Draw and save it as a pal file. *********************************************************************** Getting Started *********************************************************************** Major Command List: Init_PSE; - Starts up PSE ShutDown_PSE; - Shuts down PSE and clears the memory of Sprites Add_Sprite; - Loads a sprite into a "byte" type from a pix file Remove_Sprite; - Removes the sprite from memory Move_Sprite; - Moves the sprite to a designated x and y coordinate Hide_Sprite; - Temporarily makes the sprite invisible Show_Sprite; - Makes the invisible sprite visible Update_Screen; - Updates the screen with any changes that have been made SetMCGA; - Sets to Mode13h graphics SetText; - Sets to Text Mode PutPixel; - Places a pixel at a given x and y coordinate Fadeto; - Specifies a given color that the screen will fade to Start_Fade; - Begins the fading process Stop_Fade; - Stops a fade Load_Palette; - Loads a pal file into a type Set_Palette; - Sets the palette to the pal file assigned earlier Save_Palette; - Saves the current palette -Ok, so those are the commmands, now how do I use them? Program PSEtest; Uses PSE, crt; {Uses PSE and CRT} Var Sprite1:byte; {Variable type for a sprite} key:char; x, y:integer; Begin Init_PSE; {Starts up PSE} SetMCGA; {Initiates Mode13h} Enable_Background; {Enables double buffering} Sprite1:= Add_Sprite('filename.pix',100,100,3,true); {Loads the pix file into sprite} repeat repeat {puts the program into a constant loop until keypressed} x:= x + 1; y:= y + 1; if x > 200 then x:= 0; if y > 200 then y:= 0; {Sprite movement variables} Move_Sprite(Sprite1, x, y); Update_Screen; {Updates screen to show sprite movement} if key = 'h' then Hide_Sprite(Sprite1); {Hides sprite if h is pressed} if key = 's' then Show_Sprite(Sprite1); {Shows sprite if s is pressed} until keypressed; key:= readkey; until key = 'q'; {repeats the sprite movement until q is pressed} ShutDown_PSE; {Shuts down PSE after use} end; ************************************************************************* Advanced PSE Use ************************************************************************* -Ok, thats great, I have a little sprite that goes around the screen, now what? Now you can use your imagination to come up with different ideas. For example, think about animation. In animation things seem to be moving; however, they are really displaying images in a pattern. To create animation you can create the different frames, or sprites, then hide the sprites you're not using and display them when needed. -Ok, I know how to make stuff animated but what if I run out of memory? You have to remember to free up memory whenever you are able. Use the Remove_Sprite command if a sprite is no longer needed in a game. Also, if there is a change in background or major characters, go ahead and use ShutDown_PSE then reinitiate it. This will flush out all of the wasted memory. -So what other effects can be done with PSE? Particle effects have proven to be quite popular in many games, and they can be done very easily with PSE's PutPixel command. PutPixel can be used to create a star field, an explosion, or any other effect that you can think of. Fading, or transition effects, also add a certain "polished" look to a presentation or game. Use the fade commands to switch between backgrounds, screens, or even special effects, such as a fade to bright when when an explosion goes off. **************************************************************************** Game Concepts **************************************************************************** -Well, now that I have a decent understanding of PSE, what can I make? Basically the best thing to do is drag out the old Nintendo if you have one, or take 10 bucks up to the local arcade. Try out a variety of games and pay attention to how the game plays, and what you like and don't like about the game. Try to figure out how you could recreate that game, and make it better for your personal self. My personal recommendation is to remake a game that has already been made for your first project. From this, you will have something to go by. From this you can also focus on the making of the game, rather than the concepts and ideas. A few games that are good to start with are Pong, Frogger, or even something as simple as Tic-Tac-Toe. -So what are the basic types of games out there? Shooter - flying a ship around destroying things Action - fighting, beat-em-up Adventure - discovering items and going on quests Puzzle - making combinations to complete a task -So what if none of these game types works for me? By all means, develop your own! The gaming industry needs more game ideas. Remember, you are making this game for YOU. Make something that you enjoy playing and something that you feel others will enjoy as well. -What factors go into a good game? Gameplay: The game must play very smooth and have a comfortable feel to it Play Mechanics: The game must have a definate objective or goal Graphics: The game should be rather pleasing to look at Interaction: The game should pull the players in Multiplayer: Everything's more fun with more players! *************************************************************************** Special Thanks *************************************************************************** I would like to thank Will, along with Ive Sze and the rest of the Red Ant Production staff for creating such a useful tool that has not only furthered my experience with Turbo Pascal, but also increased my enjoyment in video games. Without PSE I'd still be making games with those discusting ASCII Graphics! AHH!! =) Tempest of Red Ant Productions