• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
shadowstep00

From C to ?

20 posts in this topic

So I want to move on from C to an object oriented language. (C++, C# or Java)

 

My C knowlege is not that advanced.

But I have learned all the basics of the language. (pointer,arrays, structures, input output files, dynamic memory)

 

I don't plan to move on Java because I am going to learn it along with my university class next year.

 

This leaves me with C++ and C#. I think it's best for me to move on to C++. But there's a big fuss on learning C++  the C way. And because I know C I don't want to start using C in C++. This is something I want to avoid.

 

So I want a book that doesn't learn you to program the C way in C++. I don't care if it's an super introductory book I don't mind. I just want the book to explain well the object oriented concepts and the best way to program in C++.

 

 

 

Thanks smile.png

 

 

2

Share this post


Link to post
Share on other sites

On Youtube you can find long presentations form Stroustrup where he talks about how not to look at at C++ as C with classes and how to do things the C++11 way. They might sound a bit advanced though.

 

This was the last one I saw: "The Essence of C++: With Examples in C++84, C++98, C++11, and C++14"

2

Share this post


Link to post
Share on other sites

I learned C++ right after C, and I do not regret it.

When I needed Java, it took me two days to be capable enough for the tasks.

I studied C# to code a tool, and even though it took me longer than Java to get the hang of, the learning was also fast and easy enough.

 

But I like to learn languages as I need them. It reinforces the concept that they are the tools; and that I am not their programmer.

The only times where I research new languages that I won't really need (notice I said research, not learn) is when I am evaluating new technologies, what I do from time to time. Still, this research process should never take over two days.

 

And as you said you'll be needing Java, I'd go for it.

 

I guess the best C++ book recommendation I can give you, following what you asked, is C++ for dummies.

Edited by dejaime
0

Share this post


Link to post
Share on other sites

I wouldn't go on C++ right now. Main problem is that there's no such thing as "C++" to start with. I mean just read this:


On Youtube you can find long presentations form Stroustrup where he talks about how not to look at at C++ as C with classes and how to do things the C++11 way. They might sound a bit advanced though (1).
 
This was the last one I saw: "The Essence of C++: With Examples in C++84, C++98, C++11, and C++14" (2)

Here's what I read "between the lines":

  1. The new, non-broken way. But wait, because the new not-broken way is complex.
  2. 4 versions. Four.

I'd probably go C# right now. Java left me a bitter taste and not in the good way.

1

Share this post


Link to post
Share on other sites

Guys I am determined to learn C++ and do some serious stuff with it until the end of the year. :P 

 

I will take a look at the books you recommended me.

I already started with C++ Primer as it is the most advanced and will get me quickly moving. (see if I can keep up with it)

 

 

Thanks for your suggestions!

2

Share this post


Link to post
Share on other sites

I'd probably go C# right now. Java left me a bitter taste and not in the good way.

 

If you want an even more bitter taste, try using C# with Windows Metro... They cut out loads of classes for their core profile and does tend to cause quite a few headaches.

 

Whilst C++ is a perfectly robust language, the only one I have known not to evolve in any radical way (for many years) is C.

 

... Oh wait, you say that there is now <stdbool.h>? C99 is Madness!

Edited by Karsten_
2

Share this post


Link to post
Share on other sites

 

I'd probably go C# right now. Java left me a bitter taste and not in the good way.

 

If you want an even more bitter taste, try using C# with Windows Metro... They cut out loads of classes for their core profile and does tend to cause quite a few headaches.

 

Whilst C++ is a perfectly robust language, the only one I have known not to evolve in any radical way (for many years) is C.

 

... Oh wait, you say that there is now <stdbool.h>? C99 is Madness!

 

 

There's C11 too, though admittedly I don't use it but have been told it contains mostly atomics/threading stuff and some utilities designed to make writing cross-platform programs useful, such as a standard alignment keywords (read: all major C projects already have platform-independent wrappers for these, especially for platforms which are not going to support C11 anyway - such as MSVC - meaning C11 is pretty much useless all around). Oh well, at least they tried.

0

Share this post


Link to post
Share on other sites

Yes, admittedly I have never even seen C11 code in the wild.

 

I still dont think MSVC fully supports C99 either which is quite annoying. Microsoft's excuse was that they would rather spend time on C++0x functionality.

Now, as a C++ developer, I agree with this choice. Unfortunately their C++ support is a bit lacking too :/

 

With Microsoft's new direction with C++ (Albeit C++/CX) perhaps we will see them make up a bit of ground here in the near future including in C support.

Edited by Karsten_
2

Share this post


Link to post
Share on other sites

 


I wouldn't go on C++ right now. Main problem is that there's no such thing as "C++" to start with.

Oh, come on.

I'm so happy that C++ is evolving again, after so many years of standstill. Simply take a modern compiler like MSVC or GCC and take off. There are still some minor restrictions regarding C++11 support, but well, if it's not one thing, it's another.

And regarding different versions: What C# version are you going to learn: 3, 4, 5? And what .net framework: 3.5, 4.0, 4.5?

 

 

Frankly, beyond the move to Generics ( 1.1 -> 2 I believe ), almost everything that changed with the language has basically stayed the same.  It's evolutionary changes, like support for parallel programming.  Simply put though, idiomatic C#2 and C#5 are basically identical.  The same can certainly not be said for C with Class to C++14.

 

 

Ironically, one of the biggest warts in C#/.net IS the existence of non-generic containers.

0

Share this post


Link to post
Share on other sites

I also love how people complain about C++, C# or Java version issues, and then don't comlain about Perl, Python or Ruby versions issues ... which are absolutely the worst, except most of the history of Perl 5 has been about as stable as C++,C# and Java ... hell, you can just now BARELY get a linux distro that ships with Python 3 (which is at 3.3) because they have a dependency on incompatible Python 2 code.  And ruby, a langauge I actually like, got stuck at 1.8 for more than 2 years after 1.9 was released, and now that 2.0 is released, only 1 major distro ships it.

 

The fact is in my entire C++ history, I had exactly 1 type of code I actually used that wasn't compatible with C++ 11 - related to how it disambiguates names in some cases.  I spent 3 hours fixing my code base, problem gone.

 

Also, in C#, none of my working code has ever failed to work on newer versions, except for 1 change they made with 1.1 as a security fix.

 

Yeah, the Python 2 vs Python 3 thing is driving me nuts. I get that backwards compatibility is a good thing, but it was just so unnecessary to spawn an incomplete 3.x version leaving 80% of the Python community stranded on 2.x because of dependencies. The amount of developer manpower lost on this issue is probably enough to power a small city for several decades, and is a PITA for anyone considering Python as a development platform.

0

Share this post


Link to post
Share on other sites
sorry for not specifying the array part. i meant the way it is represented in c++11.

int arr[3][4] is so much clearer than std::array <std::array <int, 3>, 4> arr, at least to me.
1

Share this post


Link to post
Share on other sites

Oh yea, that'd definitely be clunky.

I prefer not to use 2D arrays anyway. happy.png I find it is easier to use 1D array and just do the conversions myself:

std::vector<int> arr(3 * 4);
 
//I can iterating over it as if it's 2D:
for(int y = 0; y < height; ++y)
{
    for(int x = 0; x < width; ++x)
    {
         arr[(y * width) + x] = ...;
    }
}
 
//But I can also iterating as if it's 1D:
for(int i = 0; i < (width*height); ++i)
{
    arr[i] = ...;
}

 

But if you want a clean class to use, you could wrap your "std::array <std::array <int, 3>, 4>" into a new (re-usable) template class: Array2D<int,3,4>, and write one or two quick member functions to make it easier to access the data.

0

Share this post


Link to post
Share on other sites

sorry for not specifying the array part. i meant the way it is represented in c++11.

int arr[3][4] is so much clearer than std::array <std::array <int, 3>, 4> arr, at least to me.


perhaps this well help you understand why std::array is preferred:

c++11 std::array way:
http://ideone.com/XpP7Zm

c++ array way:
http://ideone.com/ey6aC8

std::array allows you to use the entire suite of std container algorithms, that you can't use with a plain old array, it also includes a handy size field, so no longer do you have to keep track of how many elements you have. there's plenty of other reasons to be using std::array, but being able to use a static array with container algorithms should be enough imo.
 

[spoiler]

#include <iostream>
#include <algorithm>

int main() {
	std::array<int, 5> a = {1,2,3,4,5};
	for(int x : a) std::cout << "a: "<< x << std::endl;
	return 0;
}
    #include <iostream>
     
    int main() {
    const int ALen = 5;
    int A[ALen] = {1,2,3,4,5};
    for(int i=0;i<ALen;i++) std::cout << "a: " << A[i] << std::endl;
    return 0;
    }

[/spoiler]

Edited by slicer4ever
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0