Code Maintenance & Programming Rules

 This guide outlines essential best practices spanning code style, architectural design, debugging, testing, performance, and portability—all aimed at reducing the long-term cognitive load of code maintenance. 🎨 1. Style Code is written for humans to read, and only incidentally for computers to execute. Variable Naming : Use descriptive names for global variables, and short names for local variables. Precision and Consistency : Use active names for functions (e.g., calculateTotal ). Above all, keep your coding style consistent throughout the project. Structure & Expressions : Use a consistent indentation and brace ( {} ) style to show program structure visually. Use the natural form for expressions. Use parentheses to make the semantics unambiguous. Break up overly complex expressions to keep them clear. Side Effects & Macros : Beware of functions with side effects. Avoid function-like macros; if unavoidable, parenthesize the macro body and arguments carefully. Magic Numbe...

電腦遊戲設計入門


本部落格的幾篇文章:
說明了一些開發環境的建立,也介紹了一些小遊戲的做法。但,設計電腦遊戲一定要學程式設計嗎?例如 開源跨平台遊戲開發工具介紹:GDevelop 文中提到的 GDevelop 以及 遊戲程式開發工具與網站 ( Tools and their website for game programming ) 所提到的 Clickteam FusionRPG Maker,這三款軟體皆可不需撰寫程式碼,就可以設計遊戲囉。

除了這三款軟體之外,還有沒有其他的工具呢?當然有(不然要這篇文章做什麼呢!?)。此類軟體有免費與付費的,底下就分為這兩類來介紹。

須付費電腦遊戲設計軟體:
Game Maker https://www.yoyogames.com/gamemaker
Game Maker 最初推出的時候,有免費的版本,現在有30天試用的版本。提供拖拉(drag and drop)功能,讓使用者只要熟悉幾個指令就可以開發遊戲。除了拖拉方式外,也提供腳本語言GameMaker Language給開發者撰寫程式碼。

Construct 3 https://www.construct.net/en
除了有 Construct2 的功能外,增加了底下功能:支援Mac 和 Linux系統、多國語言、第三方工具的擴充。Construct3的使用方式可參考此連結:Construct3教學文章

GameSalad https://gamesalad.com/
GameSalad這套軟體一樣有視覺式的編輯畫面,操作方式像Flash與Dreamweaver,開發者只需要把遊戲物件放到當位置,並設定相關的物理原則,即可設計出簡單的2D遊戲囉。

免費電腦遊戲設計軟體:
Stencyl http://www.stencyl.com/
Stencyl官網標榜「Create Amazing Games Without Code」,不會寫程式也可製作出HTML5與Flash遊戲。也是透過拖拉的方式來進行遊戲的製作。

Construct 2 https://www.scirra.com/construct2以HTML5為城市語言的2D遊戲開發工具,透過視覺化的界面與拖拉動作,即可讓沒有程式設計基礎的人來完成一個遊戲。Construct2的使用方式可參考此連結:Construct2教學文章

題外話:免費的遊戲設計軟體還是會有一些功能限制,例如無法將開發好的遊戲發布到App商店上去賣等。


若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

留言

這個網誌中的熱門文章