Laugh at my work day

This is a discussion on Laugh at my work day within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I had an idea. I'm unhappy with the latest incarnation of my "engine", dubbed Grey_Fox (t'is a long story) and ...

  1. #1
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709

    Laugh at my work day

    I had an idea. I'm unhappy with the latest incarnation of my "engine", dubbed Grey_Fox (t'is a long story) and thought some people here would be interested in looking at it.

    No reason why you would want to. Maybe to laugh at it, slap me over my over-commenting (I comment a lot more when I'm tired, by the way). Maybe someone might learn something (like how not to do things).

    Maybe one or two of you are interested in how I layout my code. Meh, unlikely.

    Anyway, here's a link to a .zip of the project (Visual Studio .NET 2003 project files):

    http://www.ahluka.co.uk/GF.zip

    EDIT: Warning for those of you who don't use a 1280xX screen resolution, the length of the lines may seem a little, well, long. Damn my 1280x960.
    Last edited by cboard_member; 06-12-2006 at 07:15 AM.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  2. #2

    Join Date
    May 2005
    Posts
    1,041
    I didn't build the project, I don't have .net 2003 currently installed, but I did take a gander at the source. Main.cpp looked a little funny, but overall it seems you've got a good start (better than I thought, to be honest).

    No reason why you couldn't continue work to make a game.
    I'm not immature, I'm refined in the opposite direction.

  3. #3
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Main.cpp is sort of empty (I need to move the singleton creation somewhere else, possibly a manager). There actually isn't a mainloop yet since this was more of a fresh start and wanted to focus on everything bar the game loop / rendering.

    When I start again (in the next couple of hours) I'll be taking some parts of that and building up on it.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  4. #4

    Join Date
    May 2005
    Posts
    1,041
    Well good luck with that then!
    I'm not immature, I'm refined in the opposite direction.

  5. #5
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    ... Thanks
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  6. #6
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    Looks good so far, it's almost cross platform too (I ran across a MessageBox), keep in mind it may take very little work to make and keep it cross platform since you're using SDL.

  7. #7
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    I've been thinking about making it cross-platform and have decided it would be a good idea. It's only a little extra work (mainly wrapping certain blocks in #ifdef / #endif's).
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  8. #8
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    >mainly wrapping certain blocks in #ifdef / #endif's).

    This works well, however, don't litter them throughout your code. The best way to write cross platform code that needs platform specific parts, is to isolate those parts into separate modules. Then you can either substitute the platform specific version of those modules at build time, or #ifdef them in that module.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. April Fools Day
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 04-01-2005, 01:58 PM
  2. Nothing to do at work
    By joshdick in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 03-31-2005, 02:41 PM
  3. Printing weekday
    By sworc66 in forum C Programming
    Replies: 12
    Last Post: 09-13-2002, 08:03 AM
  4. debug program
    By new_c in forum C Programming
    Replies: 3
    Last Post: 03-18-2002, 11:50 PM
  5. Simplified code
    By soonerfan in forum C Programming
    Replies: 2
    Last Post: 12-05-2001, 03:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21