how to make a basic side scroller game ? (the side scrolling part)

Started by
13 comments, last by graveyard filla 20 years ago
you could easily create a scroll box. Just have different buttons that that will let you scroll in different ways. but using the arrow key would be a better way of doing it. The trick is to have the level editor show you what part of the level you are on but that could be harder to implement.

[edited by - QzarBaron on April 6, 2004 8:05:05 PM]
"Go on get out last words are for fools who have not said enough already." -- Karl Marx
Advertisement
If you have Visual Studio, you have VB. I''d recommand giving it a look because it not only allows you to rapidly developpe Win32 apps, it allows you to avoid the Win32 API quite a bit more than if you''d use C++. Although MFC can do that too if you''re willing to learn it. I''d say VB is easier for a starting project, though.

Personally, when I write a game, I''ll organize a folder structure somewhat like this...

Projects
+Prophecy of the Alien Seaweed Camels III
|+Dev
||+Editors
||+Misc. Source
||+Notes
|+Res
||+Background
||+Data
||+Music
||+Sprites
||+Sound
||+Tiles

I keep track of all of my ideas in notes. Particularly file formats I''m creating, for instance, or quick drafts of what the tools I''ll be writing will involve. I might keep some example source in misc. source that I plan on using in my engine (classes I''ve used in other games, for instance).

In editors, I''ll have whatever editors I write. All of them are in VB: performance isn''t an issue since I''m the only one using the editor (and if I decide to bundle them with the game later on, I can just tweak the interface a bit) and I can usually write up something that works pretty darn fast.

What you should do is similare. Write editors for your project. Don''t do this by hand; I used to and I regret it because I''ve wasted a lot of time. My first 2D sidescroller, Cat''s Paw, was done like this. My maps were in ascii and were hard to edit ("Uh... I should add a tree here... oh crap, what''s this "145,146,146,146,147" set?"), but not so hard as to be untamperable by users. I usually limited myself to small maps because big ones were too hard to do. Now, I just have a map tool with which I can click on tiles and put ''em down, wham bam thank you m''mam.

The production time for an editor generally pays for itself in terms of time and effort. Plus, as a bonus with your purchase, you get...

- FREE code you can tweak to fit into your game that''ll allow you to display the map (Since if the editor you wrote can do it, then why reinvent the wheel? Especially if you''ve already invented it yourself?)
- FREE tools you can use for your next project.
- FREE bragging rights ("Yeah, I had to write this really complex tool to work with the map format!")

What are you waiting for? Reach for that keyboard and dial- er, code now! Our compilers are open 24/7!
lol.... i allready have made an editor for my pacman like game...i figure it wont be hard to make the other one with SDL... im not gunna bother with another language if i can do it with SDL......yes it would be a good learning experiance, but so is making it in SDL
FTA, my 2D futuristic action MMORPG
It would definitely be. However, don''t overestimate these kinds of tools.

The advantage to your idea is obvious: you''ll have code you can practically copy-paste right out of the box into your project. Once it''s done, it''s done.

The disadvantage, other than complexity, is the time you''ll most likely end up spending on the actual tool. After all, what you want out of this is just a quick little app to edit maps and, most important of all, to save you production time.

Well, I don''t have any experience in writing a GUI with SDL, though I wish you luck. Be bloody sure to post screenshots for those of us whom are curious!!
welll... thinking about it, i guess im going to have to make the map-editor before i even start coding the game. well, maybe not. but it is going to be awkward to make a [19][400] array by hand. i mean, thats 400 lines in each column. imagine if i had to make 400 rows? what a nightmare to make that would be... maybe ill start out by hard-coding this huge array, get down the basics of it, then make the map editor? its gunna be hard for me as it is to make the basic gist of the game, and it would be even harder to make it from reverse.. you know, cuz basically a map-editor is the reverse version of your game. instead of reading in a map and using the values, you change the values and write the map to a file. i think it will be too hard to start out at first making the editor.

also, for my first map editor i made, it was easy. all i did was use the mouse to scroll through the currently selected tile. then i just drew my game map to the screen, and had a spot to the side where i drew my "selected" tile. it was easy to make maps and even though i just through it togeather, it worked good. i just need to finish this game and show you all my work and then i can get started on this side scroller....
FTA, my 2D futuristic action MMORPG

This topic is closed to new replies.

Advertisement