Skip to main content

Coding Practices

  • Chapter
  • First Online:
Polished Game Development
  • 1059 Accesses

Abstract

Good code is felt but never seen. Its impact permeates the whole game in both the audio and visuals. Unless you’re writing a game for a university project, you might think that your code—as in the quality of your code—is unlikely to come under much scrutiny once it’s working. That, alas, is a fallacious argument.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The first day of release requires the player to download a 100MB (or larger) update to the game they’ve just bought. This increasingly worrying trend is increasingly frustrating for all players. Eliminating this ensures that the first thing in your game review won’t be a complaint about downloads!

  2. 2.

    These applications are typically installed under Unix-like operating systems, while art tools are generally developed first for Windows. This alone necessitates a little configuration creativity.

  3. 3.

    Mine is called devlib and contains known good versions of Fmod, OpenGL, Freetype, and so on, which were approved by the team and shown to work with our game.

  4. 4.

    At the risk of sounding like an advertisement, my first book, Cross-Platform Game Programming (Charles River Media, 2005), covers this area fully.

  5. 5.

    Writing this line brings back (bad) memories of a bug that occurred only on the GameCube, but not the PC, many, many, years ago!

  6. 6.

    Germany is the most common example.

  7. 7.

    The Gem Puzzle (a.k.a. the 15-puzzle) is a deceptively simple puzzle that can be rendered impossible by transposing two pieces.

  8. 8.

    See https://en.wikipedia.org/wiki/Test-driven_development

  9. 9.

    See https://en.wikipedia.org/wiki/Agile_software_development

  10. 10.

    See https://en.wikipedia.org/wiki/Waterfall_model

  11. 11.

    See https://en.wikipedia.org/wiki/Scrum_(software_development)

  12. 12.

    See https://en.wikipedia.org/wiki/Kanban_(development)

  13. 13.

    Mantis, Sifter, Lighthouse, 16bugs, Jira, etc. (Google is your friend)

  14. 14.

    Called a change set, funnily enough.

  15. 15.

    Also known as trunk-based or mainline development.

  16. 16.

    An empty array is typically better, since it prevents the calling code from needing to explicitly test for NULL as a standard enumerator will handle the case normally.

  17. 17.

    You might also want to search on the terms peer review and code inspection.

  18. 18.

    Lawrence G. Votta, Jr., “Does every inspection need a meeting?,” Proceedings of the 1st ACM SIGSOFT Symposium on Foundations of Software Engineering, p.107-114, December 8–10, 1993, Los Angeles, CA.

  19. 19.

    See https://en.wikipedia.org/wiki/SOLID_(object-oriented_design )

  20. 20.

    See https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

  21. 21.

    See https://en.wikipedia.org/wiki/Comparison_of_documentation_generators

  22. 22.

    See https://en.wikipedia.org/wiki/Concurrent_computing

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Steven Goodwin

About this chapter

Cite this chapter

Goodwin, S. (2016). Coding Practices. In: Polished Game Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2122-8_9

Download citation

Publish with us

Policies and ethics