Sign in to follow this  
ontheheap

New game and a question on 2d "mario" games

Recommended Posts

Somewhat... I'm off to a good start on my third game. Basically, you drive a truck on a two lane road and you have to catch Ninjas dropped from ufo. If you miss the ninja it goes "splat" on the road. Miss too many ninjas per level and you lose! It's not 100% finished yet. I still want to add traffic, and dual ufos to make it more difficult in the later levels.It uses SDL, SDL_mixer, and SDL_Font. Here are some screenies: Ninja.tar.gz - linux executable and media files I don't have windows set up to compile SDL yet, but I'll probably do it some time today. And now, I _do_ have a question seeing as how this is a beginner forum ;) I now want to create a 2d platform game (similiar to super mario). What's the best way to go about doing this? Should I create a simple level editor, or just hard code the levels into my source? I've been reading a bit on Lua lately, and I'm itching to give it a try. Would using an a scripting language be overkill , ie something to save for my _next_ next project (a top down rpg)? Also, I'm wondering what are some of the problems I'm likely to run into (and should give thought to beforehand) when creating this type of game? - heap

Share this post


Link to post
Share on other sites
Definatly make a level editor. When I made a level editor for my side scroller it took about 2-3 days. (it was a crappy one however.)

Sorry I dont know much about scripting languages.

Share this post


Link to post
Share on other sites
First of all, congrats for having a (nearly) finished game!

I would strongly recommend a map-editor for a Super Mario-style game. Hardcoding the levels will become very hard as they get larger and especially if you add enemies and animations.

There are a few pre-built editors that you can use, so you don't have to create your own. You can use Mappy for example.

Even though Lua is a very nice and powerful scripting language, I'd suggest not using it. You don't need scripting and integrating Lua can get somewhat complicated. For your RPG, Lua is a very good choice, but a Jump'n Run doesn't need it.

Good luck,
Pat.

Share this post


Link to post
Share on other sites
Thanks for the replies!

When I firsted started learning I wanted to create everything myself (and I still do) but now I realize that _baby_ steps are the key to getting anywhere. I hadn't thought of using a pre-built level-editor but it's something I'm going to consider. I've never used a level editor before, and I would have no clue what would need to be implemented in one. I think using a pre-made editor will further my understanding of what they are and how they work.

Hopefully within the next couple of months I'll a fairly good side scroller to post, and then I'll start working on my rpg project.

- heap

Share this post


Link to post
Share on other sites
Nice....... what happened to asteroids[grin]?

Btw,if one does not want to use an array to keep track of the map, what are the other options available?

Also any ideas about eliminating unecessary searches?

Any useful links?



(heap,I too am in a similar situation )
oh, you will need a real ninja and some advanced ninjas for bonuses and stuff like that ;).

Here's a link
http://www.sheepsheet.com/_gaming/ninjasprites/ninjasprites.htm

Share this post


Link to post
Share on other sites
That is awesome! Gave me a cool idea too. If the player lets too many ninja's die, the ninja leader comes out and beats down the truck.

Asteroids... meh. I'm still going to do it but I'm saving it for my first ogl game...

Share this post


Link to post
Share on other sites
Quote:
Original post by FireNet
Btw,if one does not want to use an array to keep track of the map, what are the other options available?

vectors (the c++ kind not the math kind) becase then you can have your map any size you want instead of using an array where you always have to use the same map size.

Share this post


Link to post
Share on other sites
hi heap,

first of all, i would strongly recommend making your own level editor. it might seem difficult in theory, but i can tell you it is NOT. if you can make the game, the editor is much easier. in fact, you can cut and paste the game code into a new project, change a few things, and poof, you have a functioning level editor. theres only a few differences

1)theres no enemies or anything (DUH!)
2)when the user clicks on the screen, you change the tile he clicked on to whatever the "Currently selected tile" is. IE, you find out where he clicked on, convert it to tile coordinates, then do something like map[clickedy][clickedx] = currently_selected_tile. thats it! add scrolling abilities to the map (like in the game) and you are good to go. then you can set-up a way for the user to add tiles, and scroll through the list of tiles (where you can cycle your "currently selected tile" through your pool of tiles ) you can add more functionality over time. you would want to build the game as you build the level editor anyway. there will be new features you add to the game that will effect the editor.

secondly, i definetly recommend trying out Lua. if theres one thing i have learned, its that doing things earlier, on smaller projects, will greatly help you when you want to use the same thing on a larger project. for example, making my map editor for my pacman clone, and using time based movement in my pong clone, had helped me ALOT when i started making my 2d RPG. if i hadnt done those things in earlier games, it would have just made my life harder.

lastly, i have some advice for you. making a side scroller is not an easy task that you can just throw togeather real quick. it (should) take you at least couple of months to make. i was in a similar situation as you about 6 months ago. i had finished my pacman type clone and wanted to make a side scroller, so i could move up to an RPG. i started work on the sidescroller, and i realized that it was a lot more work then i thought. i said "screw it", and turned my source into an RPG. 6 months later i have a pretty nice engine, with layers, map changing, scriptable NPC's, enemies, pathfinding, particle effects, etc., and im working on the netcode as we speak. im not saying you should say "screw it" too, but you might want to think about just diving into the RPG. you might just be ready for it.

by the way, you can find my old pacman type game (donkey punch adventure) at my website click on the "DPA" page. it comes with the source and a linux version as well. check out the level editor, it will give you an idea on how simple a level editor can be. be carefull though, that code was done when i was very new, and is probably sloppy, but it should give you an idea on what im talking about.

good luck!

Share this post


Link to post
Share on other sites
Thanks graveyard filla, that's awesome! Yea I don't know what I'm gonna do yet. I want to add a couple of finishing touches on to "ninja splat" first. Making my own editor looks kind of fun, actually. I built dkp and it runs great.

Share this post


Link to post
Share on other sites
i must say i completely agree with graveyard filla. making a level editor is quite easy and because you know how all the tiles are drawn (ie. you program the order they are drawn and where), it is like graveyard filla said: "you can cut and paste the game code" or the opposite: you could cut and paste the editor's code for you games. even better would be to create a set of classes/functions that handle all the information that your editor puts out for easy use when using the levels in a game(s). that way it can be used again and again without having to cut and paste every time (and its much easier ;) ). im currently making my own iso world editor and have been thinking along these lines the whole time and i can tell you (this is after my first game) that it is very easy to implement a world editor, and even easier to manipulate a map after its done :)

hope that gives you something else to think about :)
the_moo

edit: sorry i forgot to mention 1 more thing: if you make the level editor yourself, you know the file format which eliminates some problems you might have using another editor's file(s). its also heaps easier to make the functions/classes when you know what goes into them ;) c ya!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this