Jump to content
  • Advertisement
Sign in to follow this  
SeljukTurk

Yet another beginner thread...

This topic is 2018 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

Hello guys, Seljukturk here.

     First and foremost I would just like to preface this by saying that I am a  quasi-beginner to coding; my experience with coding revolves around HTML and a bit of C++ (which is very brief). 

     Since that is out of the way I would like to talk about my objective for my 6 month project which is (you guessed it!) to build a game. However since I am a complete newbie when it come to game creation I need some assistance from the expert gamedev community out there. I spent a good half hour meandering around the beginner forums and read a lot of the beginner guides available. With that in mind I created a schedule for how my project will proceed.

     In the beginning I read that if you want to create a more complex game you need to have some background in programming so when deciding which programming language to use I opted for the most powerful one which is C++. They way I am learning C++ is just reading through a book and learning how to code; the book that I am using the Programming principles and practices using c++ made by the c++ creator himself. I am going to start at June, 6th and hopefully will get finished with the first 9 chapters by July, 6th. The reason I am doing this is because I felt as if the topics that are covered in the first 9 chapters will be suffice for the type of game I am making, however since I am still a newbie at this I would ask the community for some feedback, here are the topics covered in the first 9 chapters.

Chapler 2 He llo. World! 43
2.1 Pl.'Ograms 44
2.2 The classic first program 45
2.3 Compilation 47
2.4 Linking 51
2.5 Programming environments 52
Chapter 3 Objects. Types, and Val ues 59
3.1 Input 60
3.2 Variables 62
3.3 Input and type 64-
3.4 Operations and operators 66
3.5 Assignmem and initialization 69
3.5.1 An example: dcJete repeated words 71
3.6 Composite assignment operators 73
3.6.1 An example: count repeated words 73
3.7 Names 74
3.8 Types and objects 77
3.9 Type safety 78
3.9.1 Safe conversions 79
3.9.2 Uns •• fe conversions 80
Chapter 4 Computation 89
4.1 Computation 90
4.2 Objectives and tools 92
CONTENTS
CONTENTS
4.3 Expressions 94
4.3.1 Constant expressions 95
4.3.2 Operators 96
4.3.3 Conversions 98
4.4 Statements 99
4.4 .1 Selection 10 1
4.4.2 Iteration 108
4.5 Functions 112
4.5.1 Why bother wilh functions? 114
4.5.2 Function declarations 115
4.6 Vcclor 116
4.6.1 Growing a vector 118
4.6.2 A numeric example 119
4.6.3 A text example 121
4.7 Language features 123
Chapler 5 Errors 1 3 1
5.1 Imroduction 132
5.2 Sources of errors 134
5.3 Compile-time errors 134
5.3.1 Syntax errors 135
5.3.2 Type errors 136
5.3.3 Non·errors 137
5.4 Link-time errors 137
5.5 Run·time errors 138
5.5.1 llie caller deals with errors 140
5.5.2 -nle c.1.llec deals wilh errors 141
5.5.3 Error reporting 143
5.6 Exceptions 144
5.6.1 Bad arguments 145
5.6.2 Range errors 146
5.6.3 Bad input 148
5.6.4 Narrowing errors 151
Logic errors 152
Estimation 155
Debugging 156
5.9.1 Praetical dcbug advice 157
Pre· and post-conditions 161
5.10. 1 Pos t·conditions 163
Testing 164
vii
viii
Chapter 6 Writing a Program 171
6.1 A problem 172
6.2 111inking about the problem 173
6.2.1 Stages of dcvelopmcnt 174
6.2.2 Slralcgy 174
6.3 Back to the ca1culaLOr! 176
6.3.1 First attempt 177
6.3.2 Tokens 179
6.3.3 Implementing tokcns 181
6.3.4 Using tokens 183
6.3.5 Back to the drawing board ) 8S
6.4 Granunars 186
6.4.1 A detour: English grammar 191
6.4.2 Writing a grammar 192
6.5 Turning a grammar into code 193
6.5. 1 Implcmcmi.ng gr.unmar rulcs 194
6.5.2 Expressions 195
6.5.3 Tcnns 198
6.5.4 Primary expressions 200
6.6 Trying the first version 201
6.7 Trying the second version 206
6.8 Token streams 207
6.8.1 Implementing Token_slream 209
6.8.2 Reading tokens 2 11
6.8.3 Rcading numbcrs 212
6.9 Program structure 213
Chapter 7 Completing a Program 219
7.1 Introduction 220
7.2 Input and output 220
7.3 Error handling 222
7.4 Negative numbers 227
7.5 Remainder: % 228
7.6 Cleaning up lhe code 23 1
7.6.1 Symbolic constants 231
7.6.2 Usc of functions 233
7.6.3 Code layout 234
7.6.4 Commenting 236
7.7 Recovering from errors 238
7.8 Variables 241
7.8.1 Variablcs and dcfini tions 241
7.8.2 Introducing namcs 246
7.8.3 Predefmcd names 249
7.8.4 Arc wc there yct? 249
CONTENTS
CONTENTS he
Chapter 8 Technicalities: Functions, etc. 253
8.1 Technicalities 254
8.2 Declarations and definjtions 255
8.2.1 Kinds of declarations 259
8.2.2 Variable and constant declarations 260
8.2.3 Default initialization 261
8.3 Header files 261
8.4 Scope 264
8.5 Function call and return 269
8.5.1 Declaring arguments and return type 270
8.5.2 Reluming a value 271
8.5.3 Pass-by-value 273
8.5.4 Pass-by-const-reference 273
8.5.5 Pass·by-refcrellce 276
8.5.6 Pass·by-value vs. pass-by-refercnce 279
8.5.7 Argument check.ing and conversion 281
8.5.8 FUllction call implementation 282
8.6 Order of evaluation 287
8.6.1 E.o.:prcssion evaluation 288
8.6.2 Global initialization 288
8.7 Namespaces 290
8.7.1 using declarations and using directives 291
Chapter 9 Techni ca lities: Classes, etc. 299
9.1 User-defined types 300
9.2 Classes and members 301
9.3 Interface and implementation 302
9.4 Evolving a class 304
9.4. 1 slrucl and functions 304
9.4.2 Member functions and constructors 306
9.4.3 Keep details private 308
9.4.4 Defining member functions 309
9.4.5 Referring to the current object 312
9.4.6 Rcportingerrors 313
9.5 Enumerations 314
9.6 Operator overloading 316
9.7 Class interfaces 3 18
9.7.1 Argumelll types 319
9.7.2 Copying 321
9.7.3 Default constructors 322
9.7.4 const member functions 325
9.7.5 Members and "helper fu nctionsn 326
9.8 TIle Oate class 328

If anyone has a better book for suggestions or changes to the current topics please post in the comments or PM me. Also I need a person who is well versed in C++ to add me on my e-mail or on this site because of the fact that I am teaching myself how to code I will eventually run to some problems, having someone there to help  me will be much obliged. 

     Since we have that part of the plan done I would like to move on the second stage of my project which is getting a game engine to make my game on. Since it will be a 2d game I opted for game maker 8 (since it was held in high regard and free). I plan to spend about a week or 2 to get used to the different mechanics of the engine. I need some feedback on this because I am confused on which engine I should use.

     After the learning process is complete I plan to make the game to publish on IOS store and hopefully on the playstation store. 

     Some final comments: since it is summer I will have more time available for this project than I normally would (finished those damn AP tests). I am also looking at becoming a professional computer scientist for my career choice.

 

 

Thanks in advance for the comments

~SeljukTurk

 

Share this post


Link to post
Share on other sites
Advertisement

Picking C++ because it is the "most powerful one" is not in my opinion the approach I would take. There are many other languages out there (and the forum here has tons of suggestions) that can make the task far more enjoyable and you will still learn the fundamentals of programming.

 

Game Maker is not a C++ library. Game Maker has GML and you may be able to extend it with a DLL but you do not need any C++ to use Game Maker.

 

Don't bother planning to publish to IOS or Playstation... These cost money and your game will very likely not be worth putting up there to begin with. This is not criticizing your abilities but to say that almost everyone's first games suck. Don't aim to publish for this project, aim to learn how to make a game.

 

Anyway you can get started with Game Maker right off the bat. I like the fact you are wanting to learn the language before jumping into a game but if you go that route, I would aim for C# or Python as a first language.

 

In terms of the book and the C++ plan... I don't think a month for nine chapters and only one chapter on object oriented programming is going to be enough for you to be adequately versed in C++ to use it for a game project. I don't see anything about templates or STL... I don't see anything about pointers and how/when not to use them...

Edited by shadowisadog

Share this post


Link to post
Share on other sites

Picking C++ because it is the "most powerful one" is not in my opinion the approach I would take. There are many other languages out there (and the forum here has tons of suggestions) that can make the task far more enjoyable and you will still learn the fundamentals of programming.

 

This is wisdom. Personally, I would recommend C#, Java, or Python. They are much easier to handle.

C++ can be extremely powerful, when in the hands of experienced users. For a beginner, there a lot of ways to screw up and bog down your performance.

C# and Java both have very good included graphics libraries to get started with, and .many available better ones(I haven't used python but I assume it does too) 

Using a library for one of these languages is much easier than handling C++, and you can get the same performance.

After the learning process is complete I plan to make the game to publish on IOS store

iOS uses Objective-C, which is similar to C++, but is something you would need to work on separately for a while.

The best thing is to just start out making games for the computer, and then move on to other platforms as you become more advanced.

 

A piano student normally doesn't learn Bach's Goldberg Variations as their first piece. Yes, it is the best piano piece, but it is too complicated for them and the student will soon become frustrated and give up.

Share this post


Link to post
Share on other sites

 

After the learning process is complete I plan to make the game to publish on IOS store

iOS uses Objective-C, which is similar to C++, but is something you would need to work on separately for a while.

The best thing is to just start out making games for the computer, and then move on to other platforms as you become more advanced.

 

A piano student normally doesn't learn Bach's Goldberg Variations as their first piece. Yes, it is the best piano piece, but it is too complicated for them and the student will soon become frustrated and give up.

 

Yes this is great advice and I really liked the analogy.

 

Beginners often believe that they must use C++ because it is what is most often used in the industry. C++ IS used in the industry but that does not mean that a beginner must run out and learn C++. The core principles of programming are practically universal. The concepts of flow control (if statements, loops, ect), variables, functions, OOP, and data structures are seen across many many languages.

 

I would note that Minecraft was written in Java... Eve Online was written in Stackless Python. There are lots of very popular games that are not developed in C++. Sure C++ is a nice language to know... but it is wise to save it for the future because it will be easier to learn if you already know the fundamentals of programming.

 

To relate some of my own experience... I started with Klik & Play a long time ago in a galaxy fairly similar to this one. I used The Games Factory, Multimedia Fusion, Jamagic, dabbled in C++ and wrote some games with it, went to C# and Game Maker, used Python a bit, and now I am working full time in C++ (although not on games and I still use Python).

 

I thought I knew C++ but I had used it for years before I learned that I was flat out doing it wrong. I did not realize that pointers are passed by value and not reference. You tend to learn pitfalls regularly when you get terrible bugs that make you rip your hair out in frustration. For instance knowing not to return a variable declared locally by reference... There are many ways to get bitten using C++ and even after using it for quite a while I am sure that I will be bitten even more in the future!

Edited by shadowisadog

Share this post


Link to post
Share on other sites

Picking C++ because it is the "most powerful one" is not in my opinion the approach I would take. There are many other languages out there (and the forum here has tons of suggestions) that can make the task far more enjoyable and you will still learn the fundamentals of programming.

 

Game Maker is not a C++ library. Game Maker has GML and you may be able to extend it with a DLL but you do not need any C++ to use Game Maker.

 

Don't bother planning to publish to IOS or Playstation... These cost money and your game will very likely not be worth putting up there to begin with. This is not criticizing your abilities but to say that almost everyone's first games suck. Don't aim to publish for this project, aim to learn how to make a game.

 

Anyway you can get started with Game Maker right off the bat. I like the fact you are wanting to learn the language before jumping into a game but if you go that route, I would aim for C# or Python as a first language.

 

In terms of the book and the C++ plan... I don't think a month for nine chapters and only one chapter on object oriented programming is going to be enough for you to be adequately versed in C++ to use it for a game project. I don't see anything about templates or STL... I don't see anything about pointers and how/when not to use them...

Thanks for the feedback!

 

I see your point, probably switching my plan for right now. Also could you elaborate in more detail on what you mean in the second paragraph (talking about game maker not being a c++ library). 

 

Should I begin to learn one of the languages you suggested or should I try to become better at game maker or both at the same time, also how good of a game can you make with just the free version of game maker?

Share this post


Link to post
Share on other sites

Picking C++ because it is the "most powerful one" is not in my opinion the approach I would take. There are many other languages out there (and the forum here has tons of suggestions) that can make the task far more enjoyable and you will still learn the fundamentals of programming.

 

Game Maker is not a C++ library. Game Maker has GML and you may be able to extend it with a DLL but you do not need any C++ to use Game Maker.

 

Don't bother planning to publish to IOS or Playstation... These cost money and your game will very likely not be worth putting up there to begin with. This is not criticizing your abilities but to say that almost everyone's first games suck. Don't aim to publish for this project, aim to learn how to make a game.

 

Anyway you can get started with Game Maker right off the bat. I like the fact you are wanting to learn the language before jumping into a game but if you go that route, I would aim for C# or Python as a first language.

 

In terms of the book and the C++ plan... I don't think a month for nine chapters and only one chapter on object oriented programming is going to be enough for you to be adequately versed in C++ to use it for a game project. I don't see anything about templates or STL... I don't see anything about pointers and how/when not to use them...

Thanks for the feedback!

 

I see your point, probably switching my plan for right now. Also could you elaborate in more detail on what you mean in the second paragraph (talking about game maker not being a c++ library). 

 

Should I begin to learn one of the languages you suggested or should I try to become better at game maker or both at the same time, also how good of a game can you make with just the free version of game maker?

 

From http://www.yoyogames.com/gamemaker/studio/free

 

GameMaker: Studio™ Free – Limitations Feature Limit Rooms 5 Sprites 20 Sounds 10 Objects 15 Backgrounds 5 Timelines 5 Scripts 10 Fonts 5 Paths 10 Included files 5

 

I think you can make a fairly decent game given those limitations. If the limitations become an issue then you could get a higher version for $50 to remove the limitation and that is a very reasonable price.

 

At the very least you could use Game Maker to prototype your idea and the game mechanics, art assets, and level designs.

 

I personally like Game Maker (I own the professional studio version with html5 export) and so I think you should just dive into it and see what you can do. Spend some time with it and see if you like it. If not then you can always switch to something else. The important thing is just to pick something and get started!

Edited by shadowisadog

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!