• 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.
uptick

C vs C++, Objected Oriented Programming vs Data Oriented Programming

12 posts in this topic

As someone new and planning on getting into Graphics Programming and possibly Game Development, the following topics/paths always leave me wondering as to which route I should take. Now, I know some of these subjects are a little controversial and might create much debate, but still, I would love to hear about your personal view and experience in the industry and hopefully get a better perspective.

As someone who is planning on getting into Graphics Programming or Game Development, would it be better to :

1. C or C++

2. Object Oriented Programming or Data Oriented Programming

After researching around on the internet, there seems to be two schools of thoughts. One that prefer to use C with perhaps a few features from C++ such as operator overloading, etc. (Casey Muratori, Mike Acton....) Who value performance and the Data Oriented approach and see Object Oriented as an unnecessary evil.  And, those who use C++ and Object Oriented Programming (responsibly).

Now, as a relatively new programmer with only python experience, I'm really having a hard time deciding which road to take; especially when it comes to the initial decision of deciding which language to learn.

Both sides seem to make a good case, yet the undeniable fact is that majority of the people do seem to use C++ (but perhaps someone in the industry could shed some light on this subject), while some use a Cish C++, and relatively few using only pure C. Even John Carmack -- Quake's developer who used to code in pure C have recently decided to use C++ for their new and recent installment of Quake 3.

After years in the industry, what would you recommend to newcomers who are interested in Graphics Programming, making their own engine, or Game Development in terms of C, C++, OOP, DOD?

Thanks in advance :)

 

1

Share this post


Link to post
Share on other sites

Depending on the face of project, I see myself more often write C-Style global functions than diving into the OOP (if correct or not may be at any onse choice) syntax. But on the other side OOP(ish) style code makes life a little easier over plain C code. Classes as data containers with extra functions are in some way better to handle than the good old plain data with argument overloaded API calls have been for there encapsulation of proeprties.

I think it is the possibility of both, C_Style mixed with OOP(ish) code that makes C++ (dont forgetting about the power of templates and preprocessor macros)

0

Share this post


Link to post
Share on other sites

Posted (edited)

You can do OOP with C (check out gobject as an (over engineered) approach).

Likewise you can do procedural development with C++ but still benefit from safety and convenience (i.e smart pointers, STL / vectors)

Most of my middleware work is in C (eases binding to other languages and the hardware) but I would classify more than 90% of my code to be Object Oriented in design.

i.e C:

struct Player *p = PlayerCreate();
PlayerDamage(p, 13);
PlayerDestroy(p);

vs (non-exception safe) C++

Player* p = new Player();
p->damage(13);
delete p;

As for which one is better... people generally agree that breaking things up into objects makes a project easier to navigate because you have a common design that you can make assumptions upon.

Edited by kop0113
0

Share this post


Link to post
Share on other sites

Thanks so much for all the wonderful replies. I'm currently learning C++ and planning to read Effective C++ once I am done with the first book.

Are there any good books you guys would recommend? on algorithms, data structures, etc? or any other related subjects that might be helpful beyond the basics of C++ ? :)

0

Share this post


Link to post
Share on other sites
On 17.7.2017 at 6:56 PM, dmatter said:

The original objectmentor PDFs about SOLID are now hosted here: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

Definitely read them.

Understanding SOLID is the beginning of a journey away from just being able to write code in C++ and towards being able to architect software and software components. Then to do so on a larger scale without even getting hung up on the specifics of any particular language.

SOLID is often touted as modern pillars of OO and the PDFs are certainly presented from an OO perspective. In actuality you will find that a number of the lessons there can and should be applied to other programming paradigms too!

Thanks, i will have a detail look.

0

Share this post


Link to post
Share on other sites

I have the same problem. I notice this.

If follow John Carmack , yes his step from C to C++ is very old one. His newer adventures also years old back is with Haskel. So that Funcional programming with pure Functional languages.

in these day there is still C but C++ is C++ C++98 C++11 C++14 and C++17 so the long livaty of C++ is it legacy support and it still evolving. D is the language is the one wich drops legacy

i Notice hard defending of OOP. But I also Discovered the combination

Functional Reactive programming.

Because CPU get many more cores so side effect less , lockless programming and much easy way of archieve that with paradigm that support it from it core. Without being guru to tackle that major problem of concurrent and parallel programming. In paradigm wich seams to come from the single core time.

John Carmack interrest in Functional programming has to mean something.

What is the relation of functional with DOD

 

 

0

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