3D graphics in C++ Created 7 years ago2017-07-23 15:20:15 UTC by Screamernail Screamernail

Created 7 years ago2017-07-23 15:20:15 UTC by Screamernail Screamernail

Posted 7 years ago2017-07-23 15:20:15 UTC Post #336253
I want to make a game, which isn't made in Unity, are not a modification and are made in C++ coding. (Maybe C++11 because someone in the Hive Workshop suggested that i use it) Is there anyone here who can help me build 3D graphics from scratch?

I am new at this so please direct me. (If someone here knows how to make 3D out of scratch in C++)
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-23 15:26:47 UTC Post #336254
Do you have experience in C++ and 3D math? If not I would suggest just using a prebuilt engine such as Unity or UE.
rufee rufeeSledge fanboy
Posted 7 years ago2017-07-23 16:32:46 UTC Post #336255
Can't i just try? If i don't do this then I'll never learn how it works.

EDIT: Actually nevermind I'll never touch C++. I learned that i can never learn it.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-23 16:51:30 UTC Post #336257
Try what rufee said. Ages ago there was a book that teach you how to build a Doom engine based on the idtech1 engine, all almost from scratch. Why re-invent the wheel?
Posted 7 years ago2017-07-23 16:56:17 UTC Post #336258
I had similar attitude to learning C++ several years ago. What will help:

Don't start learning to code with trying to learn OpenGL or some other graphics API. Go with simple tutorials that would give you understanding of what coding is and how computers work and some basic code understanding.

Learn by practice. Following tutorials just to get done with them won't make you a good coder. Start with writing some simple programmes that make simple tasks, then as you learn more and gain more experience - build upon them or make something more complex from scratch.

Check numerous references - you won't find all the info in one tutorial.

And my last advice - be patient, or if you can't - be stubborn. Patience and/or stubbornness will make you go through with all problems along your coding way, or at least make it less likely for you to drop the project out when something goes wrong.
Posted 7 years ago2017-07-23 17:00:24 UTC Post #336259
i suggest to start with a simple 2D project: http://lazyfoo.net/tutorials/SDL/index.php
EDIT: Actually nevermind I'll never touch C++. I learned that i can never learn it.
if u dont know the programming language u should start with basics....
https://www.tutorialspoint.com/cplusplus/
Posted 7 years ago2017-07-23 17:18:05 UTC Post #336260
Wow. I where close to give up immediately on this. Thank you all! I'll might just do a 2D project with patience! (Or stubbornness)

And yes i can code! I usually do batch text adventures and do small things in unity.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-23 17:56:36 UTC Post #336262
I'm not trying to put you down, just that C++ is hard enough to deal with w/o 3D graphics. Just jumping right in is a recipe for failure, trust me been there done that.
rufee rufeeSledge fanboy
Posted 7 years ago2017-07-23 18:16:59 UTC Post #336264
I'm going with C++ now. Currently stuck in the makerFile part.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-23 18:38:22 UTC Post #336266
If you've never used C++ or any other programming language before, i'd recommend this tutorial: http://www.cplusplus.com/doc/tutorial/

Also, if you're on Windows you should use Visual Studio. Makefiles are hard to learn, especially if you have no knowledge on C++ itself.
If you're on Linux it may be best to rely on a sample Makefile from a tutorial instead.
Posted 7 years ago2017-07-24 00:15:22 UTC Post #336287
Makefile bad; Visual Studio good. Barely just learned the basics of Makefiles for GBA development. It's a mess, even for its time.

Also C/C++ is good to learn (and easy). Probably a staple language you're gonna use if you land a programming job.

Never touch C# or similar ones if you don't like Java.
Posted 7 years ago2017-07-24 05:26:27 UTC Post #336289
For some reason Visual Studio doesn't work for me. (Or has expired, i need to check) I i work with Notepad++ by the way. It's primitive but it works. I used it to make text adventures on batch files.

By the way i hate Bioware, just because of envy and now can't look at their games without getting angry. Just saying.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-24 06:12:15 UTC Post #336290
Visual Studio community is free, you just have to connect with a Microsoft account (or add an email, did it so long ago that I don't remember), and you'll be able to use.
Posted 7 years ago2017-07-24 07:08:15 UTC Post #336291
I'll rather use Notepad++. It's my favorite.

https://www.youtube.com/watch?v=1IPPvZ3QuQY
Something like this is what i'm aiming for.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-24 07:53:25 UTC Post #336292
As others have mentioned, start off small, and work your way up. Use tutorials/C++ books to learn the very basics before tackling any real projects.

Instead attempting to make your own games when you've just started learning C++, try modding existing games/engines for starters. It always helps to have something that's already working in front of you, where you can mess around, make small changes and immediately see results on-screen. I remember one of the first bits of C++ I wrote was in the HL1 game code, where I wrapped the bit that spawned gibs when a scientist was killed in a for loop, increasing the gore by 10x. Seeing how big of a visual change two additional lines of code made got me hooked immediately.

That being said, I wouldn't suggest GoldSource as a starting point - a lot of that codebase is very much out-of-date (some of it is like 20 yrs old at this point). Try the Unreal Engine, their codebase is fantastic, and there's loads of documentation/demos available, where you can play around stuff that already works.

Finally, if C++ is the first programming language you're attempting to learn, I would also consider starting off with a simpler variant in order to grasp the very basics. C# is a far more easy-to-use (and in some cases more powerful) variant of the language, that would help you wrap your head around C-based language basics without having to consider the low-level memory management that you'd inadvertently run into when using C++. Unity is a great game engine that runs on that language, very much beginner friendly, loads of documentation, etc.

A lot of programmers/game developers here (myself included) have gone through the initial urge to create something huge as their first project (own rendering engine, game, etc.), and have fallen flat on our faces tons of times. Your initial goal should be finding a way to learn the basics without getting discouraged, setting small goals to keep yourself interested/motivated to keep going. Plan for the long haul and you'll get there. :)
Daubster DaubsterVault Dweller
Posted 7 years ago2017-07-24 08:27:36 UTC Post #336293
I actually are going to make goldsource content! Enemy AI to say.

I'm actually trying to get to work on this project.
http://twhl.info/forums.php?thread=19304&page=last

Anyone who can give me some advice? (Comment there not here then)
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-31 13:26:38 UTC Post #336603
I'm still stuck.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-31 14:43:29 UTC Post #336606
What's giving you problems?
Posted 7 years ago2017-07-31 15:05:59 UTC Post #336607
If i can't use makefile then how can i make a way to run my program?

I'm pretty stuck on this because i have too many thoughts and ideas.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-31 15:15:02 UTC Post #336608
Maybe tell us first what are you working on, post a link to it or describe it. You need to compile your code into executable to run it (if it's hl mod, compile into dll and place in dlls dir in your mod's directory).
Posted 7 years ago2017-07-31 15:15:26 UTC Post #336609
Makefiles are for Unix systems like Mac OS and Linux.

For Windows, you must use Visual Studio, the Express and Community editions are free, you just need a Microsoft account. Notepad++ is a code editor not a full IDE.

You should REALLY follow the C/C++ posted by Solokiller, it will help you a lot.
Posted 7 years ago2017-07-31 15:21:44 UTC Post #336610
I...

I should just make YouTube shows instead.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-07-31 18:13:33 UTC Post #336612
If you know what you're talking about..
Posted 7 years ago2017-07-31 18:25:48 UTC Post #336613
Like slideshows. I actually have a unfinished show called "Jinar" that i stopped working with because of laziness.
Screamernail ScreamernailYour personal Fear
Posted 7 years ago2017-08-01 10:20:16 UTC Post #336629
I think you will try Glfw modern opengl and Qt widgets C++. If you don't like than possible you need try C# opentk 2.0 than if you got success than you try to C++. Good luck
You forgot to add at the beginning: after learning the basics of C/C++
Posted 7 years ago2017-08-01 16:43:41 UTC Post #336643
I can convert batch files to exe programs. Does it help with this?
Screamernail ScreamernailYour personal Fear
You must be logged in to post a response.