Check out Amazon.com!

BlitzCoder Code Archives PageMain Codes Page
Listing: Platform/Side-Scroller Code (21 Entries)
Title: 2D Fast Fade Code Submitted By:
- waroffice

I made a file to fade out my levels in my RPG and found it could be usefull to others.

Any problems PM me
 
Title: 2D Scrolling demo Code Submitted By:
- msw
Works for Topdown and Sidescrolling games. Demo features multiple controlable players that users can switch between. Ability to turn gravity on/off. Camera automaticly follows the selected player around. Coded for BlitzPlus but I think it should work as is for Blitz3D.
 
Title: Alternating Tiles Code Submitted By:
- radiumgames

Changes the style of the tile designated when creating a map every time the game is loaded to change the scenery a bit. Also changes locations of trees
 
Title: Destructable outlined terrain Code Submitted By:
- darkeagle

destroy the terrain, and it gets outlined :)

numbers 1-4 choose size of the hole to create.

*DEFINATELY* not optimised... anyone gonna help me speed it up?? :)

enjoy!
 
Title: Fat Functions Code Submitted By:
- andy_a

Add line thickness to Lines, Rects, Ovals, Stars, & Circles.
Rects & Ovals can be rotated in near real time (depending on thickness).
All without artifacts (holes) in the thick lines. Commented and has usage examples.

Updated. Now includes fatSuperEllipse() function. Check it out!
 
Title: Function scrollXY Code Submitted By:
- 86it
Scroll background using a joypad in x,y cords
 
Title: Heat-seaking rocket Code Submitted By:
- the-mike

When the right mouse button is pressed, this will spawn random rockets (add a "rocket.bmp", a rocket faced like this: -->) of random speed and turning rate which will track the mouse. Useful in many 2D game engines!
 
Title: Mappy and Nsprite at same time Code Submitted By:
- gustav

You can make a tilemap and work with fast sprites with some coding problems. I prefer to use pre-made libs and tools like Mappy an Nsprite, after all they're COMPATIBLE xD
 
Title: Platformer Springs Code Submitted By:
- nebula
Single screen platformer with springs.
 
Title: Platformer lifts Code Submitted By:
- nebula
Single screen platformer with horizontal and vertical lifts.
 
Title: Platformer with Ice Code Submitted By:
- nebula
Single screen platformer with Ice tiles
 
Title: Platformer with disolving tiles Code Submitted By:
- nebula
Single screen platformer with disolving/desintegrating tiles.
 
Title: Platformer with jetpack Code Submitted By:
- nebula
Scrolling platform code with scrolling and jetpack
 
Title: Platformer with ladders Code Submitted By:
- nebula
Single screen platformer with ladders
 
Title: Platformer with lasers Code Submitted By:
- nebula
Single screen platformer with Lasers
 
Title: Random Dirt Generator Code Submitted By:
- oracle
Here is a random dirt generator for games like Worms or Scorched Earth!
##Needs to be optimized for proper use!##
 
Title: Replaying user input using a collection of Types Code Submitted By:
- matt_sephton
23/24 June 2002, version 0.10, tracks user controlled element
26/27 June 2002, version 0.20, tracks multiple computer controlled elements

to do: enable early quit of replay to go back to game

*** feel free to use this method as long as you give me credit

this method can be used to replay user input. this simple demo records the player control of a dot. we choose to do the correct branch of the main loop (moving or drawing) depending on if we are recording (game) or replaying (watching). this could be extended to keep track of multiple items, such as computer/AI controlled characters.

:) matt
 
Title: Scrolling background Code Submitted By:
- crazy_gaz_2001
OK pretty obvious but to do a scrolling background you need to make it move the opposite direction from your character.
 
Title: Super mario 2 tm example map collision example. Code Submitted By:
- wingsoffury
Support unlimited of blocks. and no speed slow downs !
smooth camera movemnt in 2d.
good collision rutine. that can check anny spot withing an integer.
in source map. for simple edit
use left,right,upp on keyboard.
 
Title: perfect collisions!! (Best collision for stopping an object when it collides with another) *updated!!* Code Submitted By:
- grim_1_2_3

The reason I say this is the best collision code for making an object stop next to the object being collidied with, Is simply because it works regardless of how many pixels at a time you are moving the object across the screen, And it STILL detects even 1 pixel!!! Anywayz, You will need to replace the 2 images in the code with you're own to see how it works. Change the variable for 'dspeed' to however fast(number of pixels) you want the object to move across the screen when you use the keys to move it.

Note: You can now use floats for the dspeed also :)
 
Title: position 3d sprites with 2d co-ords Code Submitted By:
- darkeagle

lets you say "i want bloke A at screen co-ords 400,218. but i want alpha and real time scaling/rotating aswell!.
 
Add Your Code!
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.

Code software created by Krylar's Kreations