Making a sidescroller

BlitzPlus Forums/BlitzPlus Programming/Making a sidescroller

B_Paulie(Posted 2006) [#1]
Im new to programming, i've only been programming for 5 months. Can someone teach me how to make a sidescroller?


WolRon(Posted 2006) [#2]
Have you seen my 2D platformer example code at my programming tutorial?


QuickSilva(Posted 2006) [#3]
B_Paulie, sidescrollers are not the easiest of games to make, trust me. Maybe you should try making a single screen platformer first and then evolve it to a sidescroller once you`ve picked up the knowlegde to do so.

Jason.


CS_TBL(Posted 2006) [#4]
Learning to make decent programs takes years, learning to make complex games -like shooters- takes even more years..
.. not 5 months ..

sorry :P but you really mustn't rush things. Keep in mind also that your game needs editors (map-editors, enemy-placement-editors etc.). You gotta need that.. so you need to know at least how to work with maps, perhaps you're lucky and you could use a generic map-editor from somewhere, but if you're not lucky, you need to make your own.

Space Invaders would be a better start for beginners than Gradius VI ^_^


B_Paulie(Posted 2006) [#5]
thx all. i thought it would be much easier : )


Grey Alien(Posted 2006) [#6]
Yeah start simple and build up. Make a map file which contrains data for the screen which you will draw out of tiles say 32x32 pixels each. Make all tiles in a paint package and read them in to your game. Read the map in and then draw the correct tile on the screen based on the map coordinate. When this all works, make the map wider than the screen. Then you can code your game to scroll through the map by having a ScrollX coordinate start at 0 and incrementing it by 1 each frame. You need to workout out that when ScrollX = 1 your first tile's X coord should be -1 and so on until ScrollX = 32 and then the first tile is off the left side of the screen and you then need to draw the 2nd tile at X coord 0 and so on. Hope this makes sense.


aab(Posted 2006) [#7]
Its easier to start off with a game style that doesnt include the kind of collisions of a side scroller.

After/during (which can make you feel unusual..or at least did so to me) you make an entire program you learn through your own practice how much more easily, structurally and efficiently you could have done it. (Especially in learning to program in an object-orientated or (in blitzplus) 'object based' way), so its better to start with a simple program, and then make another, fresh, with what youve learned applied to practice on the design and implementation of the new program.
You could start off with something as simple as to have eg: No collision objects: player confined to be within a rectangular area, top down view (say like 2d Zelda games view).
Or just work up to a few dozen simplified retro-style games


Regular K(Posted 2006) [#8]
Start by making pong, then add an unqiue feature to it, and then add another unique feature, and after a month your game wont even look like pong and guess what! You should learn a lot of coding from it.

Worth a shot? :P


Pineapple(Posted 2006) [#9]
When you do figure it out, maybe this might help:-

http://tilemap.co.uk/mappy.php

Dabz


B_Paulie(Posted 2006) [#10]
thx everybody. i actually built off of a tutorial in a book i read about using input to move something. i made it a game. i also made a game where your inside a ship and you click on an enemy. i dont know where to go to learn the next step, im not sure sidescrolling is the very next step.


CS_TBL(Posted 2006) [#11]
The next step is a valid choice if you can reproduce the first step without the book, all from the head :)
A shooter requires planning, look ahead, perhaps you can try to work out a funcional program-flow/design on paper, or apps like Visio perhaps.
Try to learn how to create modular code.


Buggy(Posted 2006) [#12]
I like the Pong idea. Paulie, that's what I did! I made Pong. Then I added extra balls, basic enemy intelligence, and simple powerups. I even made it 2-player, and me and my friends had a blast!

By the way, everyone, I'm trying to get the hang of a sidescroller's differences by making one now, and I have to ask:

Is it more efficient/better to do sidescroller collisions via an array or block\x and such. Currently I do the latter, because I can think of no way to do the former without moving 50 pixels at a time (my blocks are 50 x 50). Scratch that; an idea is forming, but can someone tell me (in words, not code), how to do an array check just to see if I'm on the right track?