A Hello And A Qusetion that may have been asked

Started by
15 comments, last by Servant of the Lord 10 years, 9 months ago

Firstly, please take the time to try to type properly. We can forgive some mistakes, but when a post that long (I'm specifically talking about reply #9) doesn't contain a single punctuation mark it makes it difficult to read and respond to properly.


I'm not asking all of the code just the process of how a engine should work like what files should be loaded and some of the math

[...]

just need to know the math and the syntax

You load whatever files you need. You use whatever maths is required for your game. The syntax will be the syntax of whatever programming language you are using. If you had more specific questions (i.e. "I'm trying to implement [some functionality] using [some programming language] and [some particular engine], here's what I've tried, what am I doing wrong?" or even "I'm trying to do [some specific task] with [some engine] and have no idea how to start, help!") we could help you, but at the moment these questions are just so broad and general that they're completely meaningless and impossible to answer.

The fact that you're asking this very clearly shows that you have not yet learned the basics properly, and if we give you code samples or random instructions on the usage of an engine it will not be helpful to you. You really should try actually making a simple 2d game -- just a game of Pong, with simple blocks and a circle for graphics so not having art isn't a concern -- but without using existing code.

Pong is a really simple game, but it contains a lot of the basics you'll need for a top-quality MMOG: a game loop, input handling, basic collision detection and response, etc. If you can't make Pong, you can't make your MMO. I know it sounds silly. I know it might not be exciting to make Pong. But honestly, if you can't do that, you aren't ready for the things you're asking for, and it'll just be a lot of technical gibberish you're unable to understand.

Start from the basics.

Try to make Pong. If you do it properly you'll actually have a much better understanding of what to do next. You can't just skip over this basic stuff because you think you would be able to do it if you tried -- by actually doing it you'll learn the answers to some of your questions, as well as having a better idea of what specific questions you should ask next.

smile.png

- Jason Astle-Adams

Advertisement

I kinda know what you are asking for.

I think your assessment that your know a lot about programming is not quite right, though. You probably have a solid idea of the basics, which certainly is not nothing, but there is still a lot of big picture knowledge you need to learn.

Usually I would agree that learning to program / thinking like a programmer in general is more important than examples of how something is done.

But I didn't make any progress until I found a follow-along-tutorial that happened to explain the thoughts / reasoning behind the taken steps.

So I actually like your take on learning. I read "The First 20 Hours" (first20hours.com/?) and love the message:

You should only learn enough theory that you can start doing something right away (and before that you should know your goals ... more detailed than you have outlined them).

You need to break your goals down into chunks, as many others here have said here. Making smaller games will help you get that big picture knowledge.

Unfortunately I don't know of any tutorials that teach the reasoning ... and I don't know of any source code on Github that you could analyze.

Maybe somebody can point something out.

Maybe you can also prove that you have the big picture knowledge that we think you lack.

I think Nehe might still be a place with some info on 3D Graphics programming (http://nehe.gamedev.net/). The codebase was improved ... not sure if all links point to that codebase. Maybe somebody here has an opinion on the state of those resources?

Given enough eyeballs, all mysteries are shallow.

MeAndVR

Adams makes a bunch of good points and his answer is very honest and true. I would take that answer to heart and start learning because you have a lot of hard work ahead of you.

"The code you write when you learn a new language is shit.
You either already know that and you are wise, or you don’t realize it for many years and you are an idiot. Either way, your learning code is objectively shit." - L. Spiro

"This is called programming. The art of typing shit into an editor/IDE is not programming, it's basically data entry. The part that makes a programmer a programmer is their problem solving skills." - Serapth

"The 'friend' relationship in c++ is the tightest coupling you can give two objects. Friends can reach out and touch your privates." - frob

Writing code that someone else has already shown you is not programming.

Programming is writing your own code to solve your own unique challenges for your individual project.

I wanted to point out those 2 sentences because everyone tells me, and not just me, that you shouldn't reinvent the wheel, you shouldn't write what someone else already has written, to save time, and at some cases to save money.

How would you respond to this statement?

“There are thousands and thousands of people out there leading lives of quiet, screaming desperation, where they work long, hard hours at jobs they hate to enable them to buy things they don't need to impress people they don't like.”? Nigel Marsh


I wanted to point out those 2 sentences because everyone tells me, and not just me, that you shouldn't reinvent the wheel, you shouldn't write what someone else already has written, to save time, and at some cases to save money.
How would you respond to this statement?

I'm obviously not the person this was directed to, but if I might offer a response anyway...

There's a difference between getting things done and learning.

Reinventing the wheel is (usually) a bad idea when you're trying to get things done. You're spending time that doesn't need to be spent, and unless you spend a lot of time and effort and are very skilled will probably produce a lower-quality replacement for the existing functionality.

When you're learning however, it's an excellent idea to make your own version of things as a learning experience -- you can compare to a more professional solution to judge the quality of your work, and you'll learn from figuring out how to implement it yourself. You'll also end up with a better appreciation for the existing solutions.

You don't learn by cutting and pasting someone else's code samples -- you learn by writing your own. You will however still take advantage of existing libraries (rather than reinventing the wheel) such as SDL/SFML/Allegro, etc.

- Jason Astle-Adams


I wanted to point out those 2 sentences because everyone tells me, and not just me, that you shouldn't reinvent the wheel, you shouldn't write what someone else already has written, to save time, and at some cases to save money.
How would you respond to this statement?

I'm obviously not the person this was directed to, but if I might offer a response anyway...

There's a difference between getting things done and learning.

Reinventing the wheel is (usually) a bad idea when you're trying to get things done. You're spending time that doesn't need to be spent, and unless you spend a lot of time and effort and are very skilled will probably produce a lower-quality replacement for the existing functionality.

When you're learning however, it's an excellent idea to make your own version of things as a learning experience -- you can compare to a more professional solution to judge the quality of your work, and you'll learn from figuring out how to implement it yourself. You'll also end up with a better appreciation for the existing solutions.

You don't learn by cutting and pasting someone else's code samples -- you learn by writing your own. You will however still take advantage of existing libraries (rather than reinventing the wheel) such as SDL/SFML/Allegro, etc.

Thank you. That's what I wanted to hear. Those are exact my thoughts.

“There are thousands and thousands of people out there leading lives of quiet, screaming desperation, where they work long, hard hours at jobs they hate to enable them to buy things they don't need to impress people they don't like.”? Nigel Marsh

Writing code that someone else has already shown you is not programming.

Programming is writing your own code to solve your own unique challenges for your individual project.

I wanted to point out those 2 sentences because everyone tells me, and not just me, that you shouldn't reinvent the wheel, you shouldn't write what someone else already has written, to save time, and at some cases to save money.

How would you respond to this statement?

Yes, code reuse and not re-inventing the wheel are really important. But if someone's use of "tutorials" is not to learn from the tutorial, but to copy+paste the code and then smush it into place in their own projects, regardless of how well it fits, that's not actually learning the concept the tutorial is teaching. Sometimes people say with English, "Say it in your own words" to make sure you understand something and aren't just rehashing what someone else said. Well, if you understand the concept a tutorial teaches, you should be able to "write it in your own code" even if you choose not because of time/money/labor costs.

Copy+pasting tutorial code to help you learn the tutorial - compiling the tutorial's code and then modifying it to see how it works - is perfectly fine. Experimenting with code you don't understand is a good tool to help you understand. But googling for code to copy+paste when you encounter a challenge in your own non-practice projects is not fine, for several reasons:

A) It teaches you to avoid creatively thinking up solutions yourself, and instead using other people's code.

B) It's almost never a perfect fit, so it'll have to be kinda duck-taped together, likely resulting in bugs.

C) You won't actually understand the code, and since you'll need to modify to expand it's capabilities, you'll likely introduce bugs.

D) If you want to sell your game (or even just release it for free...), you'll have licensing issues over the copyright of the code you didn't write.

If there's a problem you don't understand, yes, researching the problem is very good! Trying to create your own solution without knowledge isn't good, but just copying someone else's solution without understanding it also isn't good. Using third party libraries or whatever is fine (even, and especially, if the 3rd party libraries make up 99% of your project), you aren't required to learn how the libraries work inside, but your game that interacts with those libraries shouldn't be just a frankenstein of sewn together flesh from other people's projects or tutorials. The code that you write, should actually be written by you.

If I'm using a 3rd party library, and using functionX(), I don't need to know how functionX() is implemented, but I absolutely shound understand what functionX() does. Otherwise programming just becomes alchemy ("If I mix X and Y, then Z is magically produced. But I don't know why, that's just the way I've "learned" (copied) it").

I'm probably not wording this properly. Using 3rd party code (libraries, tutorial/article code, code snippets from forums) is great! But make an attempt to understand programming, even if you don't have time to learn how every piece of code works, at least you should know how the code you yourself are writing works. Using 3rd party libraries is great. Copying a code snippet that uses 3rd party library, and being unable to rewrite that code snippet in your own code means you don't actually know how to use the 3rd party library.

Now, some amount of copy+pasting from tutorials is part of the learning process, especially for new programmers. The distinction I'm trying to make is, copy+pasting and experimenting with it to understand it is fine, copy+pasting and then just moving on to the next part of your project without even making an attempt to understand it, isn't fine. If that happens in a few places, well okay, you'll learn those pieces of code anyway over time. But if the entire project is like that, then that's not actually learning to program.

If someone needs a tutorial that says, "How to make my specific videogame, with feature X, Y, and Z", then they need to learn how to actually program. Part of that programming process is learning how to break down projects into tasks and subtasks so you can wrap your mind around it and code what you can yourself, researching problems you don't know how to solve, and using the acquired knowledge to write the solution in a way that meshes seamlessly with the rest of your code.

(Bleh, it takes me seven paragraphs to write what someone else could probably explain in two sentences)

This topic is closed to new replies.

Advertisement