Jump to content
  • Advertisement
Sign in to follow this  
Code_Black

C++ help

This topic is 580 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 guys. I really want to learn how to create games. I have a basic understanding of C++ and have tried to find good high quality tutorials online but there are so many it's difficult to break through the noise as well as they all have different programming styles. If anyone knows of good paid or free tutorials. It would be greatly appreciated. Thank you

Share this post


Link to post
Share on other sites
Advertisement

Hi @Code_Black,

There are a lot of game engines, each of them with determined supported languages. As you say you have a basic undertand of C++, I can recommended you Cocos2d-x (http://www.cocos2d-x.org/). If you like, there are books and many resources to learn it. I will only put two sites:
 
 
I hope this is helpfull for you,
 
Regards

Share this post


Link to post
Share on other sites

If you want some fun / more code based working for 3D stuff using DirectX a fair good book in my opinion is "Introduction to 3D Game Programming with DirectX 12" by Frank Luna. Back when I was in uni I read / worked through the DX9 version, Also do own the DX12 version but havnt had time to read though.

Good for like an intro to how direct x works and getting some basic stuff running without like the use of pre-built game engines etc

Share this post


Link to post
Share on other sites

https://www.amazon.com/C-Programming-Language-4th/dp/0321563840

SFML is really quite straightforward. If you find yourself getting lost in it then you're most likely encountering generic gamedev patterns that you're not familiar with. If you get stuck on something specific you can ask a question here on the forum, or if you're stuck on something general you may have better luck in the chat.

Share this post


Link to post
Share on other sites
Yes I was hoping someone could help me with some generic code. So I have a player with a x,y location and I'm trying to figure out how to rotate the weapon around the player so it's always on one side. Thanks

Share this post


Link to post
Share on other sites
I strongly recommend to have a look at the tutorial series "sparky game engine" from Cherno, on YouTube. It focuses more on creating a basic engine than creating a game itself. He also gives a good introduction to c++.

You can also give a look to "thin matrix", on you tube. He codes in Java though.

Share this post


Link to post
Share on other sites

Hi, for a 2D game, you can use sinf & cosf, multiply that by the distance, add this to your player coordinates,

now you have your rotated gun position,

 

You should learn about matrices, a matrix contains position and rotation, in DX9 there are functions to change & rotate stuff.

Edited by the incredible smoker

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!