Building a game from the ground up

thinking about building a game from the ground up, am I retarded?
never fucked with game design, but i have an idea i think could be fun.
learnign C++ so i can try it.

Attached: fgf12e7iylky.png (1014x720, 1.02M)

Other urls found in this thread:

youtube.com/watch?v=Osju4QEuqOA
github.com/BeRo1985/pasvulkan
twitter.com/NSFWRedditGif

It will be a nice learning experience, but I don't think you'll end up with a functional game if it's going to be any complex, without putting a fuckton of effort in.
Game engines exist for a reason.

Literally search in youtube, enjoy never making a game.

that's what I plan on doing too, I've been learning C++ and want to try to make something simple from scratch then probably go to unreal engine.
good luck friend

This. You'll start, then you'll realize that it's not optimal and you'll do research on algorithms, then you'll implement them, then you'll find more areas of your game to polish, then you'll want to restart because you made a very basic assumption in the beginning of development and you'll need to implement something differently so they can apply to future algorithms, then you'll have to revamp your algorithms, and then you end up with a game engine and not a game.

"Games" are gay. Make a game engine, it'll be more fun to make anyways.

i rewrote fortnite in 6502

Attached: 7FC5AFDE-EDAA-4456-9571-6F1F0B9AB426.png (256x256, 74K)

thanks user.
my real worry is, building the engine. it just sounds like a heep of work
most impressive.

If you're going to do this, start with simple 2D games. Learn the basics of having a main loop that processes input, updates game state and draws things. Then get into the mess of 3D later.

Or just use an existing engine. It just works better that way.

3d scares the shit out of me, any engins you would like to recomend working in?

Ideally, you want to go for one with a big ecosystem, so that there's a ton of tutorials for it and if you have any problem, there's a good chance someone's had it before.
Unity, Godot, etc. test them and pick one that fits your purposes the best, regarding the licensing and stuff.

If you want to make your own game engine, I'd recommend you use either SDL or SFML to start off with.
If you want to make your own game, I'd recommend you use an existing engine.

There's lots of other things to consider, like how easy/verbose/etc. you want to make everything

>my real worry is, building the engine. it just sounds like a heep of work
It is a lot of work to get it up and off the ground enough to be usable, but once you do get it off the ground and can easily put together a simple little game, it'll feel wonderful.
For the time being, only worry about getting 2D setup and good to go, 3D has a lot more stuff to it (like learning high level math) and naturally increases the complexity of the project.
Learning how to handle 2D objects will set the groundwork for dealing with 3D objects and what you think is the best way to tackle it. However, at that point, I'd recommend making your own backends instead of relying on SDL/SFML and do it one platform at a time, i.e. perfect the linux backend before you work on the windows backend so there's less to worry about at a given point.
On top of this, making your own audio backend will be a bitch, so, if you end up deciding that you want to make your own audio backend then collect resources on dealing with the various audio shit with the different OSes, primarily the ones you'll support, along the way.
Also, focus on interfacing with the hardware (gfx, audio, etc.) before you focus on the physics and other systems.

Just realize that it's going to take a year or two to get a general purpose game engine up and running if you use SDL/SFML/whatever libs you choose, longer if you make your own backends from the start. I'd recommend doing little projects along the way, i.e. implementing pong, snake, tetris, etc. to check for any issues you might have. When you hit the 3D stage, then implement some "simple" 3D games, like checkers or something.

>3d scares the shit out of me
Why? There's not that much to it. A bunch of similar triangles and a perspective divide. That's about it. Why not write your own little software 3D renderer with a cam, a buch of models, and a light. No need to dive into algorithms and shit, just simple stuff to start with.

I see.. I have a lot to learn at this point. ill get back to you all when I have a better idea of what im doing.

>3D
>high level math
Nothing high level about geometry and some matrix multiplication. Simple shading is very simple too. No need for super realistic rendering to start with.

>it's going to take a year or two to get a general purpose game engine up and running
Where's the point in trying to make a general purpose game engine? You will fail. Use one of the existing ones. No. If you're going to write your own engine, make it count and do something special and dedicated (or just something simple enough).

My wife Tohru is so cute

Make a 2D city building game like Pahraoh

You guys are so cute, giving OP in-depth advice as if he's actually serious about making a game and isn't just another 18 year old in his first semester of college

>It will be a nice learning experience,
Will it really? There goes much, much more into a game than just programming.
Sure, making some simple engine for the sake of it, why not. But making a complete game is something different.

Go back to your containment thread

>thinking about building a game from the ground up, am I retarded?
Not at all. By "game", you mean Tic-Tac-Toe or Tetris, right?

>then you'll find more areas of your game to polish, then you'll want to restart because you made a very basic assumption in the beginning of development and you'll need to implement something differently so they can apply to future algorithms,
*sigh*
I wish someone told me sooner that programming is less writing programs and more rewriting them.

>3d scares the shit out of me
it shouldn't really; you can make shit with opengl as easily as with 2d drawing libraries

OP I made my first game it's tic tac toe lol

stop qualityposting, this is Jow Forums

can we play it user?

Those are shit. I'd suggest a simple 2d sidescrolling shooter with a simple spaceship, bottom up, or left to right. Those kind of games were always fun.

If OP is learning C++, he needs to start with console-friendly games.

How hard can it be to setup an opengl canvas in c++?

You really think OP is serious about making a game? We have these threads every fucking week here, with some faglord asking how to make a gayme all by themselves. And 9/10 times they don't even have a basic understanding of programming.

How hard can it be to answer FizzBuzz?

If OP is serious about learning, then start with the building blocks of programming, not 3D games.

well i got interested in programing because of how much i like algorythems, and realized if i could learn to comunicate them to a computer i would be golden.

>You really think OP is serious about making a game?
Dude, I was agreeing with you. I didn't use "qualityposting" ironically.

>I would be golden
Meaning what?

you can do it so long as it's 2D, 3D will take you years

>linux backend
hahahah

if I could learn the syntax I could move on with little holding me back.

The syntax is the easiest part

>Why? There's not that much to it
matrices
quaternions
3D geometry tests
3D space partioning
skeletal animation
shaders

well fuck dosent look like i have many problems then.

3d isnt actually any harder than 2d. It might sound reductive but its literally just an extra dimension to your vectors and a perspective matrix that you can copy paste and then forget about.

>quaternions

Attached: kici kici koty w nici.jpg (640x764, 78K)

Yeah most of that stuff isnt necessary or can be implemented in very simple ways as long as you aren't going for state of the art.

Yeah, yeah. Look, you can write a simple software renderer with flat, or hell, even Gouraud shading, with just a bit of code, no matter what language. That's not photorealistic rendering or the next cry engine, but it's already more than a good start, to think about doing something more with that stuff.

As if any of you faggots get the maths behind quaternions. No, you don't. But using them is easy.
>implying you fucks implemented your own quaternion class
fuck off

all of that stuff is neccessary to make a basic 3D game, and even the most basic implementation of them is difficult

bullshit

>using them is easy.
quaternions in isolation is easy, converting them to and from other formats is a pain in the ass and has many tripups

>converting them to and from other formats is a pain in the ass and has many tripups
Then use a better quaternion library that does that shit for you.

>bullshit
matrices -> obvious
quaternions -> enjoy making a game with no rotation
geometry -> no collisions
space paritions -> no levels over a certain size
skeletal animations -> no animations
shaders -> well I guess you could use opengl 1 intermediate mode

I believe the topic of the thread is doing it yourself
and even if you use a library you'll have to convert rotations between them

you are small baby. you will come to understand it with time

like im sure ill fail, but ill share the files and let everyone laugh at my failure.

Speaking of making a game in C++, how is using Direct X 12 in comparison to OpenGL?

Attached: 1537893978192.jpg (1141x893, 205K)

>matrices -> obvious
And for what you'll need, easy enough. Never heard of matrices? No problem, you'll get it in an afternoon.

>quaternions -> enjoy making a game with no rotation
Yes. They're conceptually also easy to understand and to use. I mean as a black box. No need to understand what's really going on, and nobody is going to implement his own quaternions. You don't. I don't. Nobody does.

>geometry -> no collisions
Geometry is fun, and vector geometry isn't excactly higher maths. Worst case you use a library that computes intersections for you. Maybe use a geometry class that already includes all the necessary primitves and associated methods. But really, anyone can learn how that shit works.

The rest is simply not needed (yet). Plenty of games do just fine without, or most primitive animation (e.g. strategy games, but also simple shoot'em ups, no problem).

>I believe the topic of the thread is doing it yourself
Guess what, faggot. It's a continuum. Now go make your own computer from scratch, asshat.

>6502
>Not a 68000

You fucked up.
youtube.com/watch?v=Osju4QEuqOA

>Geometry is fun
I wouldn't want to figure out how to do a swept sphere vs triangle collision on my own
but I guess you could make a game with no animation and basic collisions
That's just all the shit that's easy to do in 2D but 10 times more complicated in 3D

You dont need matrices.
You dont need quaternions. A lot of games from the 90s didnt use them.
Yes you need collision detection but its pretty easy to implement. SAT is pretty braindead simple and GJK is not going to lie sort of hard but the amount of code is trivial. It is only about~100 lines.
Space partitioning can be done manually. BSP partioning isnt that hard anyways.
I cant speak for skeletal systems, but if you make some sort of vehicle game you dont need animation ;)
Shaders are easy. Its certainly something to learn but there isnt anything essentially hard about them.

>Lookup a tutorial for Vulkan
>Here's a 2000+ line tutorial for drawing a triangle on the screen

Why not just write my own graphics drivers at that point?

Attached: nacho libre.png (220x236, 100K)

none of the things you said are easy are easy for a beginner
they're major stopping points

No one does that sort of collision detection in games. They just use SAT or GJK on convex meshes. In the case of SAT you just project points onto axes defined by the lines of the meshes and compare them for overlap. In the case of GJK you essentially just check the position of the origin relative to simplexes you build up from the inverse minkowski sum of two meshes.

Thats how you learn, buddy

>No one does that sort of collision detection in games.
swept capsule (sphere+cylinder) vs triangle mesh is how basic player movement is implemented in 90% of 3D video games, that included the GJK algorithm, but that's only a small part of it

>Using SAT or GJK

Nigger I've worked on AAA multiplayer games where the most complex collision systems we use are checking bounding boxes. Hell the Call of Duty engine still uses GtkRadiant and that shit was made in the 90's.

I sincerely hope you go for it and waste all your time in the process.

Attached: B5D072FA-3119-4F87-A08B-40497E4915E2.png (465x381, 172K)

Just use OpenGL you nut.

My bad I thought you were talking about something else

Bounding boxes is pretty much SAT, but yeah, for many styles of game you dont need anything complicated.

>Just use OpenGL
Which library? I was told that you shouldn't use GLUT because it's slow as shit.

>Which library?
just openGL

public domain assets exist

I mean, the terminology between "game" and "game engine" is used in a commercial sense to differentiate products. In reality if you have a "game" you can easily build an engine using the existing game code.

Just use OpenGL on its own you dingus.

There is no "just OpenGL" everything I've read uses some kind of library like GLUT, FreeGLUT, GLEW, or SDL.

Well use whatever you've read about, user. The secret to it is to just start.

glut, freeglut and sdl are libraries built ontop of openGL
glew is different, I think you need that to link all the extensions

Use PasVulkan
github.com/BeRo1985/pasvulkan

Never used d3d but apparently it has better API design. Keep in mind that if you use directX you wall yourself off from the rest of the platforms. After using OpenGL for doing a skeleton animation, I've got to say that it kinda sucks. The API is a giant state machine. This makes it so that you have to write tons of code just to manage and maintain state. There are newer opengl features that remedy this problem but its too little too late. There are like 4 or 5 different versions of opengl that have variable support across platforms. So if I write code in opengl that I want support on all(lets say android) devices then I've gotta use the crappy version of opengl all because khronos couldn't get their shit together earlier.

programing in now a waist of time.

Yes, Vulkan is verbose as fuck and you need to write a shitload of boilerplate, but it allows an insane amount of control compared to OpenGL.

>Try to find a game programming tutorial
>They're all in Java

Attached: how.jpg (915x958, 569K)

i wish rendering involved more calculus and less geometry
some bastard, i don't remember whomst, somehow managed to convince me it was mostly 3 dimensional calculus
i despise geometry, calculus is actually fun

i am not sure why i thought something that obviously dealt with geometry wouldn't be geometry
it is still very entertaining though and definitely worth doing just for fun
do not go into things with weird autistic expectations

go for it its fun
the journey is more important than the destination and all that crap