Jump to content
  • Advertisement
Sign in to follow this  
lebenski

A Lemmings clone..a reasonable goal for a newbie? Help with planning.

This topic is 3923 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

Hi everyone, This is my first post on these forums, however I have been reading and digesting the information on here for a few days now. I am new to Game Programming, not programming in general however. I have a degree in computer science and studied Java in particular. Although not strictly a game, you can see some of my efforts here: www.spheric.eu - A Java Swing based Juggling Simulator and Pattern Creator. I have ordered the book "Game Programming All In One: Third Edition" after spending much time deciding, this one seemed a good introduction to 2D game programming. I plan to work through this book and build the sample games. I'm hoping this will give me a solid grounding for my first game idea, a clone of the classic game Lemmings! Firstly i'd like to hear from anyone who has experience with this book as I havent read it yet. I'm worried that programming in C will get me into bad habits with its non-object oriented nature. I've not programmed C before. Do you think this is a reasonably goal for someone with decent programming (but no game/C) experience? I've had a look at the source for another Lemmings clone "Pingus" (worth a google). This is the kind of standard i'm working for, and its been in on-off development for 9 years, a daunting prospect! How can I get off to the best start to hopefully see my project through to completion in a year (or several!) time? I've started by writing down some of my ideas for gameplay/graphics etc, but feel like I need more of a solid plan. Can anyone give any good advice from experience about planning and design? I feel that art is certainly my week point. Should I consider tackling this first? I've read lots of posts here, and they have provided ideas, but I'd like to hear about peoples experiences of being in the same position as me. What do I do next?? Thanks for your time.

Share this post


Link to post
Share on other sites
Advertisement
Well one thing to remember is the original lemmings game was released a long time ago and was perfectly servicable. Older typically means it was worked on by a much smaller team than a modern game, and on much older hardware. I'd suggest that you can make an engine for a lemmings type game without too much effort... What made lemmings a good game was not an amazing engine, but the huge range of levels and puzzles. One suggestion as far as media goes is if you aren't (or don't have access to) a great artist... don't try and make the game's graphics "good" in a generic sense, rather pick a very simple and stylised look within your graphics skill and be consistent. Games can have very simple graphics and still look good if they are consistent, what makes a lot of amateur games look a mess is inconsistency... lots of time spent on some things and not enough on others. This makes the whole game look rather "cobbled together." If the game has simple and consistent graphics it'll look like that was your intention. As with any software design you should carry out some design, but if you haven't done much game programming before... don't get *too* caught up with it. Often until you start making an actual product the ideal structure won't become apparent to you (especially if you are inexperienced). Aim for extensibility in terms of scenery types and lemming types. If you follow all the usual good practise guidelines (which as a CS student I'd hope were drilled into you) you won't go too far wrong. I always favour getting runnable code as early as possible... that's to say build your engine alongside a game rather than in isolation. Building an engine without a game has the same pitfalls as over designing up front. Also think about your game's user experience upfront... will there eventually be in game and startup menus? These can be hard to hack in after the fact and lead to a lot of code rewriting. It can help to make stubs for things like this that basically do nothing for now but you'll make properly later.
Hope it works out for you,

Dan

Share this post


Link to post
Share on other sites
Sure,
IMO, the one of the hardest parts of programming is when you first learn any programming language and are trying to understand how programming works in general. Since it sounds like you have already done this, it wouldn't be too terribly difficult to learn C and use it to make games.

A game similar to Lemmings might be a bit much for someone new to game programming, but that varies from person to person, so for you that may not be true.
My only suggestion would be to make sure you design and plan out your code and how it all fits together before you actually start coding, especially for programs any more than a couple hundred lines of code. It's great that you are writing down your ideas, but also try to write out some pseudocode before your actually code something. It is a great way to step through the process you are working on and catch any problems associated with it ahead of time.

I didn't do this when I was beginning, and I didn't finish any of my original games. As soon as I started planning and designing things, it went much smoother.

Lastly, I have the second edition of the book you ordered, but I haven't read the whole thing. If I remember right, he uses C, not C++, and therefore does not take advantage of object oriented programming. This could make things more difficult for you, since games nowadays are not programmed procedurally because it is harder to follow than an object oriented design.

I hope that all made sense, and please realize that although I have been programming games for a few years myself, I still consider myself a beginner. These are all just my thoughts based on my experiences, and someone around here with more credibility than I is likely to give you better help than I can offer.

Anyways, Welcome to GameDev!
Svenjamin

Share this post


Link to post
Share on other sites
Even if you wish to program proceduraly for some reason, there are still lots of advantages to C++ over C that do not relate directly to using object-oriented techniques.

For example, stronger type checking, function overloading, less unweildy syntax for instatiating structures, function templates.

You can also use standard library classes to make your life a lot easier (I'm thinking of std::string and std::vector in particular) without really needing to know or think about OO at all.

C++ supports OO techniques (many would argue not particularly well compared to other languages) but that does not mean that C++ programs have to be object oriented.

Plus to write something like Lemmings in C, I reckon you'll probably have to reinvent and reimplement a lot of features that are built into C++ anyway.


struct Lemming_s
{
float X,Y;
};

typedef struct Lemming_s Lemming;

void Lemming_walk(Lemming *L){ /* .. */ }


or


class Lemming
{
public:
float X,Y;

void Walk(){ /* .. */ }
};

Share this post


Link to post
Share on other sites
Thanks for your suggestions!

Coming from a Java background an OOP approach is certainly a lot more appealing to me. I've looked at endless number of books and reviews here and on amazon, and am feeling quite numb to it now. Can anyone recommend me a good C++ game programming book or online resource? I'd like to work through the examples to help get a better idea of how to structure my code effectively.

One thing that did appeal to me from the "Game Programming All In One" book is the use of Allegro. I like that this seems to provide a relatively simple interface based on some directX stuff. It seems like a good place to start. A book that combined C++ and Allegro would be ideal.

I still feel like I have a million and one questions!

Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by lebenski
Although not strictly a game, you can see some of my efforts here: www.spheric.eu - A Java Swing based Juggling Simulator and Pattern Creator.


That's great! Very interesting little program, there. As a juggler, I really enjoyed playing around with it. As a programmer, I was quite impressed at it's functionality.

Share this post


Link to post
Share on other sites
Quote:
Original post by lebenski[...] use of Allegro. I like that this seems to provide a relatively simple interface based on some directX stuff. It seems like a good place to start. A book that combined C++ and Allegro would be ideal.


As far as I know , Allegro is based on OpenGL - feel free to correct me on that.
Allegro has some very good documentation and is quite easy to learn and implement with C++ even without having a book to fall back on. There's also a ton of basic tutorials out there on the net on using Allegro with C++.

Share this post


Link to post
Share on other sites
What's wrong with Java?

Since you mention you have CS degree, then you should be above the language wars, and use something that will get your job done fastest everything considered. Learning a new language included.

For a game of Lemmings type, there is no advantage in using a particular language. Java2D should be completely sufficient, since rendering will be done mostly using sprites.

If, for whatever reason you should want slightly more specialized approach, then using one of OpenGL bindings would do. But it's mostly redundant, due to Java2D being mostly OGL driven already.

As a plus, you get applet/webstart/cross-platform out of box.

Quote:
its been in on-off development for 9 years, a daunting prospect!
Apart from it being a hobby project, there's other reason for that. Being written in C is one of them.

C and C++ are very unproductive languages, even for the gurus. It's not simply picking up syntax, and since Java is only language you mention, you're in a world of hurt if you're unfamiliar with manual memory management, and portability/compatibility issues.

Quote:
How can I get off to the best start to hopefully see my project through to completion in a year (or several!) time


Not counting art, this is a single-term (3-6 months) difficulty project, start to finish. It should be doable in 2-4 weeks for someone with experience (all considering Java). Basic engine structure is only 2-4 days' work. This is just as an impression - you can polish then for another decade, but since Lemmings clones are dime-a-dozen, there isn't much of a reason to, unless you provide some really radical ideas. In which case you'd need a dedicated artist and sound/music author.

But for purposes of cloning the game, it's not that difficult project.

Share this post


Link to post
Share on other sites
I have certainly considered doing this in Java, but part of the reason is not purely to build a game, but to expand my horizons and make me more employable in the games market. I've spent a lot of time looking into it and the industry standard nowadays is C/C++ by far.

As for the game itself, it wouldn't be a straight clone, i've certainly got some ideas for improvements in areas where Lemmings can be frustrating. For example, some times when playing a level, it becomes random chance whether or not you select a lemming in a large group that is moving in the right direction to become a builder. Ok so this wouldnt facilitate a great change to the engine, but I have a whole list of points like this.

I've decided on a graphical theme that I think will suit the game well. In a similar fashion to that of another Lemmings clone "Pingus". I'm thinking of perhaps using photography for the sprites. Do you think this is a good idea?

I haven't yet figured out how to use the Quote feature, but thanks to Ezbez for your kind words on Spheric.

Share this post


Link to post
Share on other sites
Quote:
Original post by lebenski
I have certainly considered doing this in Java, but part of the reason is not purely to build a game, but to expand my horizons and make me more employable in the games market. I've spent a lot of time looking into it and the industry standard nowadays is C/C++ by far.

As for the game itself, it wouldn't be a straight clone, i've certainly got some ideas for improvements in areas where Lemmings can be frustrating. For example, some times when playing a level, it becomes random chance whether or not you select a lemming in a large group that is moving in the right direction to become a builder. Ok so this wouldnt facilitate a great change to the engine, but I have a whole list of points like this.


Neither of these are particularly related to employment.

Employers value people who get things done. Sure, there's language preference, and you'll need to get that out of the way. But Lemmings, while a good tutorial project, doesn't need C++. AAA 3D industry however, is built on top of considerably different technologies which make it possible in the first place. Yep, C++ is in there somewhere, but it's not what makes it possible.

C++ is industry standard in AAA industry. Otherwise, Flash is probably the most dominant language, with fair representation of others as well.

As for experimentation with design and features, the higher the language, the easier to experiment. Would you rather spend 10 hours tinkering with gameplay, or spend half of that time tracking obscure memory leak, which occurred after you have to pass an extra reference to your object from a differently managed system, thereby requiring fixes to allocation strategy, ......

There's nothing wrong with learning other languages. But you'll need to decide whether you're a programmer or game designer. Doing both for demonstration purposes will likely be an overwhelming task.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!