Sign in to follow this  
Adam14

What to do.

Recommended Posts

Ok, I have ran out of ideas on what to program, so I can get experience in C++, I have no knowledge of graphics, and basic C++ programming skills, any suggestions on what I should program?

Share this post


Link to post
Share on other sites
Well, that depends; what kind of projects have you done before? What sort of things are you trying to learn? If you want to get into AI, for example, then writing a 3D graphics demo would probably not be the best place to start, but a text-mode simulation of ants finding their way through a maze would be great. It depends a bit on what you're interested in doing in the long run.

Share this post


Link to post
Share on other sites
You could always go for a text based RPG, or if you're feeling a bit daring you could learn SDL and code a 2D game. SDL is pretty easy to understand and I find that creating something graphical is better because people who don't know how to code will appreciate it more and will give you more encouragement.

Share this post


Link to post
Share on other sites
SDL would be a good place to start, as would the Windows GDI. Both are fairly easy to get going with and have plenty of examples to look at. I'd suggest something like this:


  • Do a simple point-and-click graphical TicTacToe game (2 player or with AI if you like)
  • Make a simple 2-player checkers game, and again if you like you can add a basic AI
  • Try something with animation (a simple arcade-style scroller, a side-shot fighting game, etc.)
  • When you are comfortable with 2D, start learning a graphics API (OpenGL or DirectX). Begin by doing "2D in 3D" to get a feel for working with textures, polygons, and so forth.
  • Move into 3D


Of course this will take a bit of time and a lot of patience; there's really no need to totally finish every single step or make all of them perfect, but the way to get experience is to do a lot of projects, so the more you can do, the better.

Share this post


Link to post
Share on other sites
Quote:
Original post by Adam14
Well, in the future I would like to write 3D games, and as I said, I have no knowledge of graphics in C++ yet... So learn SDL?


You said that making 3D games is what you ultimately want to do. Therefore, just start learning to program 3D generating apps because there's really nothing to loose.

Programming graphics in CPP is like anything else you do in the language. Take the C++ standard library for instance. This "interface" allows you to manipulate strings, integers, etc. with ease. Thus, once you have learned C++ with it's procedural programming, object oriented programming, and generic programming features it's just a matter of learning the conventions/concepts that the coder(s) utilized to make a Graphics API such a DirectX.

Bottom line, if you're sick of learning the idiosyncrasies of CPP and want to get to your original goal of making a 3D game then dive right into it and live the journey. What else can you really do?
:)

Share this post


Link to post
Share on other sites
Quote:
Original post by Adam14
I will, as everyone else does, It just looks really intimidating to me right now... very scary, about what C++ looked like the first day I came here.


I tell yah, graphics are scarey. So are games. I'm a fellow newb. I'm on the DirectX 9 path at the momment. So far I can initialize, draw triangles, move things around on the screen, fire another triangle at a square (two triangles together) and make the square disappear if it collides with the square. It took 4 weeks to do that. lol.. Just keep telling yourself that you want to learn this stuff. As intimidating as it may be, everything is just a learning curve. Once you go around that curve, the lightbulb will come on, and you will wonder why you didn't understand it before.

-Dan joseph

Share this post


Link to post
Share on other sites
I think I posted this in some of your threads already.
;)
You can look at the tutorial there:
Breaktris

It is pretty simple, just not complete.

But if you follow it and look stuff you don't understand up there
http://cplusplus.com/doc/tutorial/
you might learn a thing or two. I think it is pretty easy to understand if you ignore my horrible english explanations and read the source code.

Share this post


Link to post
Share on other sites
Quote:
Original post by Adam14
That is what I'd like to do, but looking at OpenGL code snippets, and DirectX snippets, They look scarier then SDL..


Well do you want to eat baby food for the rest of your life or do you want to tackle that scary piece of steak?

Aside from the analogy, here are the steps needed to become a DX master:

(1) Download the DirectX SDK.
(2) Buy a book that covers DirectX 9.
(3) Upon finishing the book, read the entire Documentation and follow the given tutorials.
(4) Create a game engine that encompasses the entire DirectX API.
(5) Use the newly created engine for the use of game creation.

I (currently) stopped at about step three and have begun looking at options that will allow me to skip the technical details for the most part and allow me to get on with the creation of my game.

Things like


HRESULT CMyD3DApplication::RestoreDeviceObjects()
{
// TODO: setup render states
HRESULT hr;

// Setup a material
D3DMATERIAL9 mtrl;
D3DUtil_InitMaterial( mtrl, 1.0f, 0.0f, 0.0f );
m_pd3dDevice->SetMaterial( &mtrl );

// Set up the textures
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_MODULATE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );

// Set miscellaneous render states
m_pd3dDevice->SetRenderState( D3DRS_DITHERENABLE, FALSE );
m_pd3dDevice->SetRenderState( D3DRS_SPECULARENABLE, FALSE );
m_pd3dDevice->SetRenderState( D3DRS_ZENABLE, TRUE );
m_pd3dDevice->SetRenderState( D3DRS_AMBIENT, 0x000F0F0F );

// Set the world matrix
D3DXMATRIX matIdentity;
D3DXMatrixIdentity( &matIdentity );
m_pd3dDevice->SetTransform( D3DTS_WORLD, &matIdentity );

// Set up our view matrix. A view matrix can be defined given an eye point,
// a point to lookat, and a direction for which way is up. Here, we set the
// eye five units back along the z-axis and up three units, look at the
// origin, and define "up" to be in the y-direction.
D3DXMATRIX matView;
D3DXVECTOR3 vFromPt = D3DXVECTOR3( 0.0f, 0.0f, -5.0f );
D3DXVECTOR3 vLookatPt = D3DXVECTOR3( 0.0f, 0.0f, 0.0f );
D3DXVECTOR3 vUpVec = D3DXVECTOR3( 0.0f, 1.0f, 0.0f );
D3DXMatrixLookAtLH( &matView, &vFromPt, &vLookatPt, &vUpVec );
m_pd3dDevice->SetTransform( D3DTS_VIEW, &matView );

// Set the projection matrix
D3DXMATRIX matProj;
FLOAT fAspect = ((FLOAT)m_d3dsdBackBuffer.Width) / m_d3dsdBackBuffer.Height;
D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, fAspect, 1.0f, 100.0f );
m_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj );

// Set up lighting states
D3DLIGHT9 light;
D3DUtil_InitLight( light, D3DLIGHT_DIRECTIONAL, -1.0f, -1.0f, 2.0f );
m_pd3dDevice->SetLight( 0, &light );
m_pd3dDevice->LightEnable( 0, TRUE );
m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, TRUE );

// Restore the font
m_pFont->RestoreDeviceObjects();

if( !m_bWindowed )
{
// Create a surface for configuring DInput devices
if( FAILED( hr = m_pd3dDevice->CreateOffscreenPlainSurface( 640, 480,
m_d3dsdBackBuffer.Format, D3DPOOL_DEFAULT,
&m_pDIConfigSurface, NULL ) ) )
return DXTRACE_ERR( "CreateOffscreenPlainSurface", hr );
}

return S_OK;
}


tend to look scary for awhile but only until you master the conventions/concepts does it really start to come natural.

Share this post


Link to post
Share on other sites
How bout making console programs that solve simple engineering problems like P=IE (Power = Amps * Voltage), well maybe something a little more complex? It would possibly teach you the math skills required to do 3D, but I wouldn't know that since I'm also in the beginner stages of C++.

Basically that's why I'm learning C++, for help with engineering, while the games are just a hobby.

--Dmitriy

Share this post


Link to post
Share on other sites
Quote:
Original post by cutthepeace
How bout making console programs that solve simple engineering problems like P=IE (Power = Amps * Voltage), well maybe something a little more complex?


I did that too until I had a collection of apps that helped me solve my college algebra and trig homework problems. I learned C++ faster, my math faster, and had fun doing it. A good all around experience for the most part.

Share this post


Link to post
Share on other sites
Quote:
Original post by Adam14
I tried to make a program to calculate 2D rotations, but got discouraged, being only 14, and not knowing much trig...


Were you using Rect or Polar coordinates? I find polar cords easier to work with when dealing with rotations.

Share this post


Link to post
Share on other sites
Quote:
Original post by Adam14
I tried to make a program to calculate 2D rotations, but got discouraged, being only 14, and not knowing much trig...

I'd highly recommend SDL. It seems daunting at first, but they have a strong userbase, good tutorials and it's really quite simple once you've applied yourself to the basics. I think it's a good stepping stone that allows you to get graphics on the screen right away, while encouraging you to explore your understanding of C++ at the same time. (In fact, there is a bitmap rotation library :p)

Share this post


Link to post
Share on other sites
I am a fellow noob so here what I would recommend: get a good book on the DirectX Game Programming (look in the Books section at gamedev for one with good reviews) that has a sample game and also one on C++. Get the C++ basics down and read the DirectX book. Then modify and change things in the sample game. I also found it dauting to make my own game so this approach worked well for me. Then once you get a working feel of how the sample program works you can move on to more advanced things. As someone else pointed out, what worked for me might not work for others.

Anyway, good luck!

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