Jump to content
  • Advertisement
Sign in to follow this  

Looking for Some Sidescroller Engine Feedback

This topic is 1186 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all,


I originally posted this in the "For Beginners" section, but didn't get any luck. Maybe here is a better bet.


As part of a school project for the summer, I programmed a 2D sidescroller engine and tile map editor. One of the requirements is that I get some feedback on my work, and apparently forums can satisfy that requirement.


Over the last year I learned the basics of C++ and SDL2, and wanted to try my hand at game programming. Since this was my first attempt at game programming, I tried to keep it as simple as possible (I really just made a Megaman rip off without music). I also wanted to try figuring out as many problems as possible on my own instead of consulting books or forums. It was a good learning experience, but I suppose I could have saved some time by talking to the pros.


Anyway, I'm asking you guys for some feedback on the logic behind this engine. Tell me if I got stuff right, if I got stuff wrong, if there's improvements I could make, anything. If anyone wants to see the source code, we could make that happen somehow.


I'm including a word doc that summarizes what's going on with the engine. I tried to keep it as brief as possible, but feel free to ask more questions. If you think I left something out that should be explained, let me know!

Share this post

Link to post
Share on other sites

I'm curious why you chose to put an x,y coordinate on the tile itself.  Doesn't that kind of bloat your tilesize, when it can be inferred by its position in the array that stores it?

Share this post

Link to post
Share on other sites

The way I set up rendering, Tile contains its own rendering function which is called when the background and map are rendered. I figured it would be easier to store x and y coordinates instead of pass more arguments to the render function each cycle. But you're right, I could do it based on array position. At this point, though, I don't know quite enough to be worried about wasting memory :)

Share this post

Link to post
Share on other sites
It would have been nice if you started with a global description of the game, and a description of its behavior in words.
Right now you immediately dive into the details of the game, where design decisions are being explained without knowing what you aim to achieve (I don't know Megaman).
When describing data (like your Tile class), be visual. Humans are visual beings, exploit it. A simple UML "Tile" rectangle with the data fields listed, a bullit item list, or even
class Tile {
    Image *image;
    int value;
    int x_coordinate;
    int y_coordinate;
breaks the wall of text, and visually shows what's in a tile.

It's good to know I am my own enemy (given that I was derived from Enemy tongue.png ).
Some suggestions for class renaming: Perhaps use "Character" as baseclass name, with "Enemy" and "GameCharacter" or "Player" ?

While reading the Available/Active Enemies, I wondered about
- Do enemies wander while being off screen? (eg patrol an area)
- How do enemies drop from the Active Enemies list other than by dying? Ie I move real quickly through some area and don't kill some enemy in the screen. Does it stay in the Active list until I return to that screen?

Similarly with projectiles, when do they stop flying?

What if the side of the map is missing an "obstacle"? Can it fly off-map then?
(Would the player be able to jump to off-map?)

How many lives does the player have? I wonder about the other screens too (intro screen, option dialogue, high score)

In collision, you start talking about the "hundred-thousand's place" suddenly. It took a while before I realized you are talking about the 6th digit in the number.
Since apparently, digits are relevant, you may want to add a description of how to read such a number, which digits belong together, and what do they mean.

You may want to move that to the map description, since that is where the numbers are introduced in the system.
You can also adapt the tile data, and split the number into several smaller values while loading the map.
Again, visual lists are much better readable than a "1 means this, 2 means that, and 3 means something else" line of text
In this case a picture of a tile with numbered sides would help.
I bet you also have a picture in your mind smile.png

In the introduction of Weapon, you speak of firing rates. I don't see that coming back in "fire weapon".

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!