14 Replies - 20539 Views - Last Post: 05 February 2010 - 03:39 PM Rate Topic: -----

#1 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

C++ tutioral for tetris

Posted 02 January 2010 - 08:29 AM

Does anyone know where i can find a good tutioral for making a tetris game? I found one but after so many lines of code i am not sure it is going to work. So any help would be appreciated.


thanks
Is This A Good Question/Topic? 0
  • +

Replies To: C++ tutioral for tetris

#2 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: C++ tutioral for tetris

Posted 02 January 2010 - 09:39 AM

You can find some source code to take a look here: http://www.google.co...+lang%3Ac%2B%2B
Was This Post Helpful? 0
  • +
  • -

#3 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 02 January 2010 - 02:38 PM

that's good but is there anything else? that can help a beginner at game programming?
Was This Post Helpful? 0
  • +
  • -

#4 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: C++ tutioral for tetris

Posted 02 January 2010 - 02:50 PM

Try this one: http://gametuto.com/...er-independent/.
Was This Post Helpful? 0
  • +
  • -

#5 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 02 January 2010 - 03:03 PM

i had looked at that one but it is for sdl and i am trying to learn how to use opengl so i don't think that one is going to work for me exactly
Was This Post Helpful? 0
  • +
  • -

#6 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: C++ tutioral for tetris

Posted 02 January 2010 - 03:45 PM

Maybe you should split your goal.

Instead of looking for a way to learn how to make a Tetris game using OpenGL first learn OpenGL, then learn about Tetris, then mix the knowledges and work in a game.

But the best is learning a programming language and OpenGL and do the game logic by yourself.
Was This Post Helpful? 0
  • +
  • -

#7 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 02 January 2010 - 07:12 PM

Well i think i have learned quite a bit of c++ but couldn't discribe it.
Was This Post Helpful? 0
  • +
  • -

#8 GenHornet18  Icon User is offline

  • Darken the Radar

Reputation: 36
  • View blog
  • Posts: 629
  • Joined: 19-October 09

Re: C++ tutioral for tetris

Posted 02 January 2010 - 07:35 PM

Yes I agree with [anonymouscodder], you should focus your attention on learning either a graphics library or native API commands that can do the graphics for you. This way you learn more about the language (and programming) yourself and the result is all the more sweet. Tutorials don't teach you creativity.
Was This Post Helpful? 0
  • +
  • -

#9 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 02 January 2010 - 07:40 PM

i have already decided to learn opengl but can't find alot of tutiorals on it. Alot of the things i find are for some other graphic library which is my problem one i found on gamedev gives me 25 errors when i try to run it and can't find out what's wrong, since it is on another computer and don't have it with me to find out.
Was This Post Helpful? 0
  • +
  • -

#10 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 942
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: C++ tutioral for tetris

Posted 03 January 2010 - 10:46 AM

Perhaps you might want to visit the OpenGL web site. This page of the web site has sample code and tutorials. You might also want to think about looking up the OpenGL Red Book. There is an online version of the Red Book on this page.
Was This Post Helpful? 1
  • +
  • -

#11 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 05 January 2010 - 12:16 PM

Thanks for that, i don't know when i will have time since school has started back here. also here is the link to the tetris clone i tried using but did not work: http://www.gamedev.n...topic_id=192483

This post has been edited by milleja46: 05 January 2010 - 12:33 PM

Was This Post Helpful? 0
  • +
  • -

#12 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 06 January 2010 - 02:45 PM

For what it does not work and gives 25 errors in ms vs c++ express 2008
Was This Post Helpful? 0
  • +
  • -

#13 Bartuc  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 19-April 09

Re: C++ tutioral for tetris

Posted 23 January 2010 - 01:53 PM

View Postmilleja46, on 6 Jan, 2010 - 01:45 PM, said:

For what it does not work and gives 25 errors in ms vs c++ express 2008


Well I may be wrong but if the OpenGL program uses anything from the MSDN libraries it will not work. The express edition of visual C++ does not come with the msdn libraries and things like #include<windows.h> will cause an error. The express edition is just for learning the language and doesn't come with any of the larger libraries. You may have to purchase Visual Studios 2008 or 2010.
Was This Post Helpful? 0
  • +
  • -

#14 milleja46  Icon User is offline

  • D.I.C Regular

Reputation: 3
  • View blog
  • Posts: 272
  • Joined: 17-December 09

Re: C++ tutioral for tetris

Posted 05 February 2010 - 03:15 PM

View PostBartuc, on 23 January 2010 - 01:53 PM, said:

View Postmilleja46, on 6 Jan, 2010 - 01:45 PM, said:

For what it does not work and gives 25 errors in ms vs c++ express 2008


Well I may be wrong but if the OpenGL program uses anything from the MSDN libraries it will not work. The express edition of visual C++ does not come with the msdn libraries and things like #include<windows.h> will cause an error. The express edition is just for learning the language and doesn't come with any of the larger libraries. You may have to purchase Visual Studios 2008 or 2010.


Yeah and xoax said is that i had to add them in, for a opengl program to work since they used the same thing for most of their tutiorals
Was This Post Helpful? 0
  • +
  • -

#15 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 942
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: C++ tutioral for tetris

Posted 05 February 2010 - 03:39 PM

View PostBartuc, on 23 January 2010 - 03:53 PM, said:

View Postmilleja46, on 6 Jan, 2010 - 01:45 PM, said:

For what it does not work and gives 25 errors in ms vs c++ express 2008


Well I may be wrong but if the OpenGL program uses anything from the MSDN libraries it will not work. The express edition of visual C++ does not come with the msdn libraries and things like #include<windows.h> will cause an error. The express edition is just for learning the language and doesn't come with any of the larger libraries. You may have to purchase Visual Studios 2008 or 2010.


Actually, you are incorrect there. VSC++ 2005 Express didn't come with the ability to create native window applications. You could only create console and CLR projects. There was a way to download the SDK needed for developing native windows applications but it was a real pain in the you know where. VSC++ 2008 Express does come with the Windows SDK. You can create native windows programs with it. You just have to choose the right project template for doing it when you are creating a new application. You can create the same applications with the express edition as you can with the full version. The limitations are the you can not create MFC applications or ATL. If you want to create a native windows application just select New Project from the file menu, select Win32 and then Win32 project.

@OP:
If you are still interested in using OpenGL for your game development, look into using GLUT. GLUT is good for setting up and running an OpenGL game in a window. You do not need to create a native Win32 application for it. You can just make a console application to run OpenGL programs.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1