Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 09 Dec 2005
Offline Last Active Jul 23 2016 06:37 AM

#5301720 How To Start Game Programming With C++

Posted by on 21 July 2016 - 05:05 AM

Have a look at my website www.MarekKnows.com there I've posted step by step video tutorials showing how to program in c++ and OpenGL to create games.

#5271825 C++

Posted by on 19 January 2016 - 06:10 AM

Scott Meyers "Effective" books are great http://www.aristeia.com/books.html

Also have a look at Modern c++ design https://books.google.ca/books?id=GPL1r8rQU6wC&printsec=frontcover&dq=c%2B%2B+programming+book&hl=en&sa=X&ved=0ahUKEwii0NiH67XKAhUDu4MKHVRrCJEQ6AEIXjAJ#v=onepage&q=c%2B%2B%20programming%20book&f=false

#5264520 Game engine lessons

Posted by on 01 December 2015 - 07:15 PM

3dbuzz offers good game development video tutorials using C#: http://www.3dbuzz.com/training/topic/c-sharp?resetFilters=True

#5260778 Best place to learn C++

Posted by on 06 November 2015 - 08:04 AM

To be a good C++ programming you need to understand constructors, destructors, inheritance and pointers (as a bare minimum).  Once you know how those things work then start coding.  Start small and simple like creating text based games.  ie build choose your own adventure type games where text is displayed on the screen and you need to make a choice with the keyboard to decide which path to take.  Planing and executing on a full game (even a simple one like this) can be a big task and it will teach you how to structure code so that you can reuse parts.


Once you are comfortable working with char's, int's, std::strings start to investigate the other parts of the standard template library.  vectors, maps, queues, lists etc.  Then try building a 2d text based game like tick-tac-toe or connect 4.  This will teach you how to program things that uses arrays.


Now you can start looking at graphics, to improve upon the previous games that you have under your belt.

#5260566 Save FreeType bitmap to file

Posted by on 04 November 2015 - 07:48 PM

I wrote an application (http://www.marekknows.com/phpBB3/viewtopic.php?t=862) that exports FreeType data out to a RAW file format, and also an internal file format used by my game engine.


To save a raw file you can just write out each pixel directly from the glyph->bitmap.buffer.  Give the file name a .raw extension and then open it in Photoshop.  Photoshop will ask you for the dimensions of the file so that it can organize the pixels correctly.  Give it a try!

#5258995 OpenGL, Still relevant?

Posted by on 25 October 2015 - 01:59 PM

I found that I was doing a lot of contract work for different companies who wanted 3D visualization in their software.  After a while I noticed that I was always having to code very similar functionality in C++ for each project that is why I ended up packaging up this common functionality into what I called an "Engine".  Now when I want to create something from scratch, I just pull out my engine and add in the new pieces that I need and just reuse the stable code that I have tested many times already inside the engine.


You'll find the same thing happens when creating games.  After you make a hand full of games, there is common functionality that you always need.  If you can abstract those parts out so that they can be reused it will make your life easier in the future.  I'm still using OpenGL in my engine but since it is all inside the engine, I don't necessarily write function calls to gl directly, I let my engine do that for me, and I just code at a higher level in C++.

#5258450 GL 4.0 book/tutorials

Posted by on 21 October 2015 - 07:18 PM

The following is a pretty good site: http://learnopengl.com/


It discusses OpenGL v3.3 in detail.  You'll find that jumping from 3.3 to 4.0 is much easier than 2.0 to 3.3.

#5251147 Popular languages for networking for games

Posted by on 08 September 2015 - 06:49 AM

This is a great site that summarizes things you need to consider when adding network support to your games: http://gafferongames.com/networking-for-game-programmers/

#5238204 How to recreate Dragon's Lair/Space Ace type game for mobile devices

Posted by on 03 July 2015 - 10:13 AM

If Dragon's Lair would have been made today it would be 3D based and rendered using a cartoon shader for the characters if that was the desired look. Video simply takes too much storage space.


Face slap.  Of course!  I don't know why I didn't think of using a cartoon shader, that will be much easier than what I had in mind.  Thanks

#5238153 How to recreate Dragon's Lair/Space Ace type game for mobile devices

Posted by on 03 July 2015 - 04:44 AM

Dragon's Lair and Space Ace are games that were made in the 80's.  Basically you had full screen cartoon movie playing back while the player made choices to progress in the game by moving a joystick or pressing a button.  The input events would then trigger different movie clips to play back.


I'd like to create a full screen cartoon action game like those that would run on a mobile device.  I was wondering if Dragon's Lair was remade today, would full motion video playback still be the best option?  Or should I try to make the game entirely sprite based? 



#5238095 How do I choose right function for moving sound in 3D?

Posted by on 02 July 2015 - 06:50 PM

moving left and right looks fine.  You will hear more in one speaker vs the other with what you have.


Distance (z) needs to drop off based on a logarithmic scale.  See the following link for formulas: http://www.sengpielaudio.com/calculator-distance.htm


Also have a look here: http://www.schoolphysics.co.uk/age16-19/Sound/text/Sound_levels_and_distance/index.html

#5237459 best way and source for learning openGL and DirectX

Posted by on 29 June 2015 - 04:40 AM

A number of years ago I started learning DirectX just like you since I was only interested in developing for Windows. A few years after that I decided to also learn OpenGL just out of curiosity sake. Today I only use OpenGL because it means I only need to keep one code base but I am not limited to Windows. WebGL, mobile development, and other platforms like Linux and OSX all use OpenGL. Being able to quickly switch platforms and device targets has really helped me grow and impress clients when they ask me things like... Well can you convert this code to run on a mobile device?

If you are just starting, I would definitely suggest learning both because each has its strengths and you will learn more by being able to compare how one api does things slightly differently from the other.

#5236591 OpenAL sound dependent on object

Posted by on 24 June 2015 - 12:25 PM

replace your while(true) loop with the following:

float x=1.0,z=0.0;

// Set for sourceid parameter position with x,0,z

// Set for sourceid parameter looping sound continuously looping
std::cout << "x: " << x << " z: " << z << std::endl;

int iState;
alGetSourcei( sourceid, AL_SOURCE_STATE, &iState );

while( iState == AL_PLAYING ) {
  //sound is still playing

#5236374 OpenAL sound dependent on object

Posted by on 23 June 2015 - 10:46 AM

In OpenAL you have sound sources and listeners.  You can move either one, or both if you want.  You say you have figured out how to move a sound source using the arrow keys, so I don't understand what you are having difficulties with.  Can you give an example of what you need to do?

#5233169 Re-getting into C++ again

Posted by on 06 June 2015 - 11:01 AM

If you are starting from scratch, start by making simple ascii art games. Things like tic-tac-toe or word games. This way you won't get bogged down with how to render graphics. Once you understand how to program in c++ then you can start investigating different graphic api or game engines.