Rewriting the game engine. (Plz read developers ect.)

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Nexuiz better in c or c++

C++ ftw
3
16%
C <- its cooler :)
9
47%
Wtf is c++
7
37%
 
Total votes : 19

Postby divVerent » Mon Feb 23, 2009 7:14 am

Actually, DP is supposed to compile with g++ without any changes, but this sometimes breaks (and then gets fixed later).
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby esteel » Mon Feb 23, 2009 10:07 am

Porting the engine to C++ is not necessary as it already compiles with g++ (at least the current development version does.. maybe the engine in 2.4.2 did not, but it is checked and fixed now and then as divVerent mentions)

Porting the code to be OO will require LOTS of work and i'm yet to see software were this REALLY helped to make the code easier to understand. Generally people just talk about OO as the holy grail but only a frightening small number of people REALLY uses it correctly. As long as you are not proposing a good design idea i guess code quality will just suffer, more bugs will be introduced and this 'port' will not improve anything at all.

You can mix C and C++ code, its often done but for DP i do not see what you would gain by doing so. Beside making it even harder to understand as you have to understand both C and C++.


Besides stuff like BOTs and their AI is not coded in C at all. Only the ENGINE is coded in C.. the engine in turn is interpreting 'byte-compiled" QuakeC which makes up the GAMECODE. This gamecode is what makes Nexuiz do what you know as the game Nexuiz. The engine is very general purpose and in fact its a Quake 1 (!!) engine that can run all sort of quake1 games, mods and if you like 'über-mods' that make up dedicated games like Nexuiz or Darsana.
QuakeC how ever is very similar to C with some special things tailored to games. If you want to change THIS part you would need to change the engine so that it understands what ever 'new' language you want. Its possible but hard and again i see nothing to 'win' from doing so.
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby tehbomb » Mon Feb 23, 2009 8:38 pm

i see what you mean... thanks for the help...
tehbomb
Member
 
Posts: 10
Joined: Mon Feb 09, 2009 12:48 am

Postby Alien » Mon Feb 23, 2009 10:36 pm

Slav wrote:I tried to compile Nexuiz with g++ (MinGW) - it did NOT worked :(
But already compiled .o-files (with gcc) could be linked properly with g++.
So it's possibly to compile .c-files with gcc, c++ with g++ and then link it - that's how I will do.


This won't always work.


In the other hand, QuakeC could be made as a general purpose game programming language suited for fps games (dropping all those quake-only functions, effect names, etc..). But this is not related to C/C++ issue.

I think if OP codes smth worthy in C++, I doubt div or lh will reject that. But who knows.
Alien
Forum addon
 
Posts: 1212
Joined: Tue Apr 22, 2008 7:12 am

Postby FraNcoTirAdoR » Tue Feb 24, 2009 9:38 am

Well, if we consider that the number of C++ developers are way far much more, than the number of people who know QuakeC, Im for this idea, since it would attract tons of programmers into this game. I also think that C++ is easier to read, but maybe its just me :P Good luck for the debugging process lol :D
Image
FraNcoTirAdoR
Alien trapper
 
Posts: 288
Joined: Tue Mar 04, 2008 10:25 am
Location: near the nex

Postby esteel » Tue Feb 24, 2009 9:49 am

The problem is NOT QuakeC .. its similar enough to C and if you show me a coder that says he knows C++ but NOT C i'll personally slap him with my cluebat!!!
The problem is the domain specific knowledge you need to have regardless of the used language. You need to understand how the system works.
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Previous

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron