• 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
TrentonK

My OLD Syntax

80 posts in this topic

That's awesome. :) And a great read. It reminds me of my expectations: php is a chainsaw to get the job done and I don't really expect much from it. I expect more from C and C++ and they demand more of my thought to work correctly. (so, I'm spoiled by php)

 

I really like that dude said to go learn python. Always have been meaning to. Seeing the reference and reading some led to my big chuckle for the day:

Go learn Lisp. I hear people who know everything really like Lisp.

 

0

Share this post


Link to post
Share on other sites


Two things I miss the most from PHP: === operator and all variables needing to start with $. The $ thing makes it easier for me to see my own variables in the other mess of logic. And the === identity is true only if value and type match. So you can do a ===0 or !==0 and not really worry about accidental 1/0 true false problems.

By general rule, if a language has === and !==, that means somebody got the design of the language horribly wrong with == and != (I can see doing implicit casting with integers and/or floats, but as soon as any other type combinations are involved comparisons should always return false).

 

Also the $ thing has an advantage you didn't mention: they're guaranteed to not clash with keywords, because they never start with $. That's extremely useful in the long run, albeit it looks somewhat hackish. Shame PHP only does it for variables and not for all identifiers.

0

Share this post


Link to post
Share on other sites

That's funny.  I consider that a great style.  Also this is the style at Microsoft, and Epic.

 

I only switched to having the opening curly brace on the same line because I wanted to be consistent with others on a team I was on.  Overall I think putting it on the next line is the most flexible and doesn't require weird special cases like when you start indenting the parameters list.

0

Share this post


Link to post
Share on other sites

Reading the comments there reminds me of people who said that if you aren't using camel case you're actively boycotting other programmers by making identifiers less readable... I actually find all lowercase to be more readable than camel case (although if you use all lowercase then you must use underscores, otherwise yes, it's an unreadable mess).

 

Which reminds me, with my current style things go like this:

  • Identifiers: lowercase
  • Custom types: camel case
  • Constants: uppercase

How would it be with camel case for identifiers? Like this? (going by the Windows API, which does exactly this)

  • Identifiers: camel case
  • Custom types: uppercase
  • Constants: uppercase

Yeah, not hard to see the issue there, constants and types look the same under that convention. Sure, somebody will argue that smart syntax highlighting should take care of that, but you don't always have that available, and you shouldn't rely on it being available either, especially if you're going to be sharing the code (and you should program like you will!).

0

Share this post


Link to post
Share on other sites

Using python syntax on C++ project is a nice thing to experience, specially to get cool state machines.

We need to add --ignore--brackets option to GCC, enabled on default settings in the next release (as usual).

0

Share this post


Link to post
Share on other sites

Well when I'm too lazy to make my code look nice I just press CTRL + SHIFT + F in eclipse and it automatically formats my code. Try it if you use eclipse I.D.E.

0

Share this post


Link to post
Share on other sites

Checking the OP's profile, and re-reading the post itself, it seems at least possible that he just came to troll or incite a flamewar over brace style.  It's quite a credit to this community that it didn't happen.

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
Sign in to follow this  
Followers 0