Jump to content
  • Advertisement
Sign in to follow this  
appel

A resonable project for a beginner

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

Hey, I read an article here that recommended starting small, something I already agreed with before I read it. But to my surprise it recommended a 2D game like Tetris as a first project. Alright! I'm fine with that. But where and with what do I start? Remember, I don't know anything. I do know programming, but I don't know where to start regarding games. Do I use Direct3D to create a 2D application? OpenGL? C++, C#. Just tell me the setup I need for a productive enviroment :)

Share this post


Link to post
Share on other sites
Advertisement
First you'll need a good IDE, which you probably already have. Then you're going to want to get yourself a 2D API (DirectX and OpenGL are alittle advanced for a beginner). Head over to www.allegro.cc. Paired with allegro and the Loomsoft tutorials, you can get started in making 2D games no problem.

-IV

Share this post


Link to post
Share on other sites
Well you mention C++ so I'll assume you're happy to use that.

Get a library such as SDL or Allegro. These libraries contain functions to draw stuff to the screen, play sounds, get input etc, though Allegro has more base functionality than SDL (there are however a lot of addon libraries for SDL which can provide stuff SDL hasn't got and Allegro has). Read the documentation and some tutorials on your chosen library and then start making games. Pong is something nice and easy to start off with (as is Tetris).

Share this post


Link to post
Share on other sites
I'm using SDL - it's brilliant (haven't tried Allegro in years). Although you do need a hefty set of linker flags to make SDL work.

I'm currently fixing my knackered AI on an SDL Pong clone, and then my first finished SDL game will be officially complete. Then I'm moving onto SDL Tic-Tac-Toe (I've already got the logic worked out, just haven't done any coding yet). I'm still scared of the concept of Tetris, I don't know where to start at all.

In short, SDL is easy and great for a C++ beginner to get into game development. And it can be used with OpenGL, which is a step up in itself.

Share this post


Link to post
Share on other sites
Ok, I have got Dev-C++ up and running with the MinGW.

Now I need to figure out how to get the SDL to work with it. I don't have a clue. I downloaded the "SDL-devel-1.2.8-mingw32" file, and it doesn't contain any hints on how to get it to work.

:\ :/ :|

ps. I'm on windows.

Share this post


Link to post
Share on other sites
Here's My Little Tutorial on using SDL with Dev C++:

If you downloaded SDL using the Dev C++ inbuilt Package Manager, you'll be fine.

If you downloaded it manually off a website or such like, don't bother with it.

Download it again using the Packages Download. Dev C++ will install it all for you and set it up. To download Packages, go to Tools -> Check for Updates/Packages. Then choose either "Dev C++ primary devpak server" or "devpaks.org Community devpaks", and hit "Check for updates". Then tick the boxes of the stuff you want (it's sorted alphabetically) and hit "Download selected". Dev C++ will then download, install and set it up for you.

That feature is what makes Dev C++ great - it's got so many packages, you can code virtually anything with it.

Once you've done that, read below:

When you're using SDL, you need to add certain things to the linker.

In Dev C++, create your new project with all your source code files etc.

Go to Tools -> Compiler Options, and you'll see a white textbox with "Add these commands to the linker command line" above it. Tick the box, and type this into it:


-lmingw32 -lSDLmain -lSDL





That's a lower case L before mingw32, SDLmain and SDL, not a 1 or anything else.

I've got mine set up like this:


-lmingw32 -lSDLmain -lSDL -lSDL_ttf -lSDL_mixer -lglu32 -lopengl32





but you shouldn't need that unless you want to use the SDL TrueType Font libraries, SDL_Mixer (for audio) or use OpenGL with it.

That'll solve any "unresolved external" (with SDL-function names) errors you get.

I hope that solves any problems you currently have. Please ask again if you're stuck.

ukdeveloper.


EDIT: ignore the Anonymous troll below. Use SDL if you want to, because it's a damn-sight easier than OpenGL/DirectX when you're just starting out.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
No sdl. At all. Please.

There is no reason in learning a 2d api in these times. Use opengl and textured quads. Almost the same thing, and gets you comfortable with opengl when you are ready for 3d programming.

To reiterate, go to nehe, ditch sdl/

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
No sdl. At all. Please.

There is no reason in learning a 2d api in these times. Use opengl and textured quads. Almost the same thing, and gets you comfortable with opengl when you are ready for 3d programming.

To reiterate, go to nehe, ditch sdl/


And in a couple of years OpenGL, DirectX and other 3d api's will be abandoned for some new technology, so why not just wait until it gets available??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Becuase he should get comfortable working in 3d.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Becuase he should get comfortable working in 3d.


WHY?????
He specifically asked for a 2d API in his post. 3d may be the next step, but you have to start small, like his post said. Maybe you learned that way, but then I tend not to respect ANONYMOUS POSTER anyway, seeing that they have no name behind tham and tend to contain very opinionated material instead of anything based on fact.

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!