Author Topic: CleanCode Quake II has gone public!  (Read 6560 times)

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
CleanCode Quake II has gone public!
« on: December 12, 2009, 02:03:08 PM »
The anticipated release of CleanCode to the public can be anticipated no more!

If you haven't heard of it yet, CleanCode is an object oriented, clean and stable version of the Quake II modding gamex86.dll system. The project aims to provide a clean, efficient, quick base for any modding you plan to deliver on Quake II. It also provides an easy to use, C++ base.

Due to it's volatile nature of testing, we encourage people to report any issues in the Issues section of the site linked below.

What are ya waiting for? Go give it a spin!

Site: http://code.google.com/p/cleancodequake2
Downloads: http://code.google.com/p/cleancodequake2/wiki/Downloads?tm=2

-Paril
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline The Happy Friar

  • Opulent Member
  • *
  • Posts: 2089
    • View Profile
    • Fuzzy Logic Inc
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #1 on: December 12, 2009, 02:26:50 PM »
question:
Will this be any benefit to people who run servers?  IE can I compiled & put this on my linux server & have it run better/more stable (like baseq2 ever crashes!!!)?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
q2server.fuzzylogicinc.com
d3server.fuzzylogicinc.com
l33t hacz over yonder.  ;) :)

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #2 on: December 12, 2009, 05:17:33 PM »
In the future, possibly; the DLL itself was built using VS2010/VS2009 and therefore does use a lot of Windows-only features (such as the WinINET library for updating); eventually a Linux port will be available, but for the time being you may have to emulate your dedicated Windows server to run on Linux with something like WINE (I know some servers can handle this, not sure about web host-type servers though).

It's mostly aimed at mod developers, map developers, and for client-side usage, but of course all of these tie one way or another into servers.

EDIT: Should also mention, any Windows-only portion of the code is separated in a way that new platforms will be able to just add their respective cc_platform_x file and exclude the Windows one. Hopefully this should make porting a breeze, my main concern is compilers liking the code I wrote with VS.

-P
« Last Edit: December 12, 2009, 05:25:08 PM by Paril »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline The Happy Friar

  • Opulent Member
  • *
  • Posts: 2089
    • View Profile
    • Fuzzy Logic Inc
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #3 on: December 12, 2009, 06:35:20 PM »
I know the C dll code need some slight changes to compile in linux.... you're just trying to make job job harder.   :peace:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
q2server.fuzzylogicinc.com
d3server.fuzzylogicinc.com
l33t hacz over yonder.  ;) :)

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #4 on: December 12, 2009, 07:14:11 PM »
Well I kept the module definition file and everything, I avoided dllexport for this very reason. Module defs are cross-platform, so that part should be fine. It'd be the compiling part that would give you issues, not the usage of Windows in the code itself.

-P
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1372
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #5 on: December 12, 2009, 07:25:45 PM »
2>c:\q2cleancode\cleancode source\shared\mersennetwister.cpp(80) : fatal error C1083: Cannot open include file: 'random': No such file or directory
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #6 on: December 12, 2009, 07:41:13 PM »
If using VS08, it requires the VS08 Feature Pack; random is from C++0x Technical Report 1, which is supported by VS08 Feature Pack and VS2010.
Otherwise your compiler doesn't support TR1 headers (in which case reply back, because then the macro is at fault, since random should only be being used if MSVS_VERSION >= 9).

You can change _CC_NO_TR1 to 1 in cc_options to get rid of this and use CleanCode's own mersennetwister implementation.

-P
« Last Edit: December 12, 2009, 07:44:03 PM by Paril »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF]Defiant!

  • Carpal Tunnel Member
  • ******
  • Posts: 1502
    • View Profile
    • Quake 2 LAN party July-August 2007
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #7 on: December 13, 2009, 08:44:43 AM »

So this might be a good option for a novice mod developer?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Next Event: http://www.quakecon.org/  Fall 2014
You missed the Quake 2 LAN party at http://athenslanparty.pbwiki.com/

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #8 on: December 13, 2009, 09:50:28 AM »

So this might be a good option for a novice mod developer?

Being OOP and using a lot of modern libraries, it is probably easier to get into for someone following along in a C++ textbook. You'll see a lot of those concepts in practice. The original c version of quake2 has a lot of nonstandard practices and work-arounds that you wouldn't see today.

Apart from the academic value I don't know that it would be easier, but it certainly shouldn't be harder.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #9 on: December 13, 2009, 01:58:15 PM »
The attempted design of CleanCode was to make sure that new programmers knew exactly what everything did; you'd still have to have knowledge of what templates are and things like that, but we designed it so that if you knew C++, you knew CleanCode. In fact, OOP made a lot of things easier, vectors for example.

-P
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline R1CH

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #10 on: December 16, 2009, 09:51:22 PM »
Given that most servers run Linux don't you think no Linux support is a bit of a step backwards?

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #11 on: December 19, 2009, 11:12:56 PM »
Most modders that I've come into contact with were only interested in working on Win32.

The fact that servers run on Linux is not a big issue for me personally because that doesn't stop the modding process.
A Linux port is viable, not at this point of course, but it is viable.

CleanCode is a community project. It isn't just me working on this, there are several developers who pitch in and out all the time. I don't work with Linux and therefore cannot offer any support for Linux; anyone who is willing to create a Linux port is encouraged to step forward so we can get that show on the road as soon as possible.

-P
« Last Edit: December 19, 2009, 11:31:34 PM by Paril »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #12 on: December 20, 2009, 02:53:30 AM »
Most modders that I've come into contact with were only interested in working on Win32.

The fact that servers run on Linux is not a big issue for me personally because that doesn't stop the modding process.
A Linux port is viable, not at this point of course, but it is viable.

CleanCode is a community project. It isn't just me working on this, there are several developers who pitch in and out all the time. I don't work with Linux and therefore cannot offer any support for Linux; anyone who is willing to create a Linux port is encouraged to step forward so we can get that show on the road as soon as possible.

-P

I'm going to add that adding Linux support is a major goal for the wolf mod friar and I are planning on porting over. I'm sure that others already feel the same way and are planning on adding it. I'm ill equipped to do that in the immediate future but it definitely will happen eventually.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1372
    • View Profile
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #13 on: December 20, 2009, 09:46:27 AM »
The key to portability is to avoid compiler extensions and OS-dependent functions or classes that don't have equivalents. Nothing is more annoying than dealing with a bunch of code full of #if WIN32 directives. Your OS dependencies should be wrapped such that your code hides these details.

Also, DON'T use constructs in your code like __CC_DEPENDENCY_H__ with leading/trailing underscores. Functions, variables and constants with leading underscores are reserved to the implementation, (the compiler writers) not user namespace. Functions with leading underscores for example, are compiler extensions or non-standard C runtime functions that are platform/implementation dependent and you should not use this namespace for your application code. If you find yourself using leading underscores or double leading underscores this is supposed to be a clue that you are venturing into non-portable territory.

There should be almost nothing in a Q2 mod that is OS dependent. The only exception is the code necessary to support the different DLL implementation and names. (Although I confess to using OutputDebugString occasionally, I undefine it in the header on non-windows platforms.) All the OS dependent code is in the engine, the mod only needs to call the engine API. All other functions in the mod should be completely contained and defined in the mod code, dependency on outside packages makes modding harder, not easier. If he downloads the wrong version of the package the modder ends up debugging the package, not his code. If you import package code then ship that code with the project. Make no use of Windows API or classes.

You should consider creating a VM and running your code through the GCC compiler concurrently with your Windows development since the vast majority of active servers are on Linux. idSoftware made the mistake of not paying enough attention to this and they ended up massaging the entire Quake 2 code base for Linux and the 3.21 release. OO helps you in this case since you can conceal platform dependencies inside a class but again, this should not be necessary at the mod level.

ALWAYS test your conditional switches and pathways to be sure they work. Test all cases to be sure your project builds successfully under all conditions of switches and packaging. Obviously, the more switches and special configurations you have the harder it becomes to maintain.

« Last Edit: December 20, 2009, 10:22:42 AM by QwazyWabbit »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline The Happy Friar

  • Opulent Member
  • *
  • Posts: 2089
    • View Profile
    • Fuzzy Logic Inc
  • Rated:
Re: CleanCode Quake II has gone public!
« Reply #14 on: December 20, 2009, 11:07:48 AM »
anyone TRY compiling in linux yet?  I'll give it a whirl later.

EDIT: can't "give it a whirl."  No g++ in my shell account from quadz.  :D
« Last Edit: December 20, 2009, 02:03:29 PM by The Happy Friar »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
q2server.fuzzylogicinc.com
d3server.fuzzylogicinc.com
l33t hacz over yonder.  ;) :)

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 22, 2024, 02:46:41 AM

Login with username, password and session length