Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Sat Apr 20, 2019 12:49 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Weird coding style
PostPosted: Sun Sep 03, 2006 10:14 am 
First, congratulations on creating a truly addictive and fun game. Linux doesn't have too many of these.

There were some things that I wanted to tweak, so I downloaded the source code and took a look at the internals. Here are some of my gripes:

- It looks like the source for the whole game (except for the radium engine) is in one big C file (mania_drive.c). I would definitely chop it into smaller pieces, especially if you're going to keep developing new features.

- The indentation style is something I have rarely seen. It's often difficult to see where the longer functions end because the main block has no indentation at all. This seriously kills readability of the code. And sometimes spaces are used for indentation, sometimes tabs. I don't think there's any C style guide that recommends this. This whole indentation problem is fortunately very easy to fix with an automated tool like GNU Indent (http://www.gnu.org/software/indent/).

- Some functions (like void display()) are too long. They should be divided into smaller pieces as well, to improve readability.


Top
  
 
 Post subject:
PostPosted: Sun Sep 03, 2006 3:18 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
We know all this :) This is not a problem at all currently, since the game is less than 3000 lines longs ... All this can easily change over time, but ManiaDrive is still a small application.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 03, 2006 4:31 pm 
Quote:
This is not a problem at all currently, since the game is less than 3000 lines longs ...


True. I just thought that if you're going to keep adding new features the project will begin to collapse under its own weight. And things are easier to fix when they're small.

Anyway, keep up the good work.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group