IMPORTANT: TIME TO DECIDE

Programming, graphics, sound, etc

Moderators: jean.vivien.maurice, Nicosmos, woody, ced117, erin

Forum rules
Due to uncontrollable amounts of spam we will be moving to
https://sourceforge.net/apps/phpbb/extremetuxracer/


New user registration has been disabled for this reason.

Re: IMPORTANT: TIME TO DECIDE

Postby EFU » Sun May 31, 2009 2:22 pm

1. Actually, there is no need to include <GL/glx.h> because, it seems, erin used only definitions for True and False from that file, so you can just temporarily change
Code: Select all
...
#include <GL/glx.h>
...

to something like
Code: Select all
...
//#include <GL/glx.h>
#define True 1
#define False 0
...

Obviously, it's just temporary solution (maybe including wgl.h will solve it).

2. About PFNGLLOCKARRAYSEXTPROC: to make it run you need OpenGL's extensions definition file, e.g.: http://www.opengl.org/registry/api/glext.h (btw, I think it's in a typical Windows installation by default); additionally, change 19th and 21st lines in ogl.cpp from
Code: Select all
...
(*glproc) ((GLubyte*) "glLockArraysEXT");
...
(*glproc) ((GLubyte*) "glUnlockArraysEXT");
...

to something like this:
Code: Select all
...
wglGetProcAddress ( "glLockArraysEXT" );
...
wglGetProcAddress ( "glUnlockArraysEXT" );
...

Hope it helps, because I haven't tried this myself :wink:.
User avatar
EFU
 
Posts: 51
Joined: Wed Jan 02, 2008 8:03 pm

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Sun May 31, 2009 5:57 pm

erin used only definitions for True and False


That's right, but that was not my intention. To say the truth: I've taken the complete bundle of includes from Tuxracer 0.61 and didn't mind the reasons. Most True and False statements I've replaced with true and false, but there are some remnants left.

maybe including wgl.h will solve it


Are there other includes necessary for Windows?

Another question: What about the path separators '/' and '\', is it necessary to change the separator when I use a compiler like wingw or does this compiler accept the unix-conform separator?
erin
 
Posts: 276
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Sun May 31, 2009 6:36 pm

Obviously I'm not in a position to respond to most of the things you just said, erin. However I would like to take a moment to ask: did you mean mingw? Mingw accepts unix style slashes, if that's what you're asking. In fact C:\WINDOWS\system32 is written /c/WINDOWS/system32 in mingw.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 865
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Mon Jun 01, 2009 6:33 am

yes, that's what I was asking. I think I should try to compile the program on Windows but I don't know which compiler to use and how they work.
erin
 
Posts: 276
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Mon Jun 01, 2009 9:01 am

Sorry, I'm quite gawky in the Windows environment. I've read some documentation about wingw and it seems easy to install the compiler and to set the path. But I've nothing read about make and makefiles. Can I compile with make and can I use the Makefile of the Linux-orientated sources?
erin
 
Posts: 276
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Mon Jun 01, 2009 11:13 am

If you install mingw and msys from the mingw website you can literally run makefiles the same way to do on linux.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 865
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Mon Jun 01, 2009 2:32 pm

Is there a way you can avoid dependency on ftgl? Ftgl doesn't compile on windows, I believe the current ETR has a workaround for that seeing as it uses a truetype font with opengl.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 865
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby EFU » Mon Jun 01, 2009 5:49 pm

In current ETR there is a manually written code (in src/ppgltk/FT folder) instead of dependency on FTGL.
User avatar
EFU
 
Posts: 51
Joined: Wed Jan 02, 2008 8:03 pm

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Mon Jun 01, 2009 7:08 pm

instead of dependency on FTGL


I'm not sure. The font modules of ppracer (etr) include a lot of headers of FTGL and the ftgl folder contains the runtime library of ftgl. The ppracer code seems to be an overlay to the original ftgl lib (to make it compilable for mingw or cygwin?). That's too bad since the ppracer code is not readable for me. I had just successfully installed mingw when I read your posts.

So I'm afraid that's the end of my attempt to give ETR another code base, excect a better programmer will be capable to implement the font code. Using another font library will take too much time. Ok, it was a trial, I give up.
erin
 
Posts: 276
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Mon Jun 01, 2009 9:08 pm

Don't give up entirely, there's still plenty of time to find a workaround. You're code is worth it.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 865
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Mon Jun 01, 2009 11:49 pm

Another solution could be simply to use wgl for fonts on windows, the functions don't look that different.
On a rather funny and disappointing side note, googling mingw and ftgl results in pages from the ETR forum on the second page. It looks like we won't be getting much help from google. The only person who seems to have achieved the compile is this guy: http://noranekosan.sakura.ne.jp/weblog/2007/02/ftgl-on-mingw.html, and i don't understand japanese...
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 865
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Tue Jun 02, 2009 9:32 am

First an important question: is the stable Windows version of ETR compiled with mingw, too? In case that the Windows build is made for a native compiler like visual C it doesn't make sense to prepare the code for mingw.

In case that ETR is compiled with mingw I could try to follow Volker Strobels thoughts though I can't promise to be successful.
After all the ETR font code has the advantage that it is prepared for translations.
erin
 
Posts: 276
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Tue Jun 02, 2009 11:16 am

PPracer was compiled in visual studio, ETR has always been compiled in mingw, both have relatively native performance.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 865
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Wed Jun 03, 2009 5:18 pm

Fine, that makes work easier.

First: EFU was right, the ETR font code doesn't depend on the FTGL library. The library in ETR (let's call it ETRFont) seems to be a hack on FTGL with direct access to freetype. ETRFont is a coherent bundle of classes with almost the same intentifiers and acess functions as in FTGL.

I don't know who has written ETRFont, perhaps one of the PPRacer team. It was not Volker Stroebel - he has another code style, whereas the interface beween ETRFont and the other code is written by Volker.

I've put all classes together in a single module to get an overview. Additionally I've removed all comments. For me, the best comment is a clear and well-arranged code. It's important to remove the entry "-lftgl" from the Makefile, otherwise you will run into conflicts with the FTGL declarations (same identifiers).

Result: It works! There is a lot of work to do left, especially the adaption to my code. Hope that you can try to compile the code with mingw in a few days if. I'll report when ready.

Some impressions: The scalability and quality seems to be similar to original ftgl though different kinds of font rendering are used. Probably the original ftgl font looks a little bit clearer, only a little. Maybe there will be other disadvantages I haven't detected yet. But it doesn't run faster than ftgl, so I recommend to avoid this fonts on the racing screen. The hud display needs only the numbers 0..9 and some other characters, this can be achieved with a simple, selfmade bitmap (see ziff32.png in my program). In the case you want to use other letters you can easily design them with a graphic program.
erin
 
Posts: 276
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby FreeGamer » Wed Jun 03, 2009 5:56 pm

Share the code, use SVN (not CVS) and start with a branch.

Get somebody to create the branch e.g. branches/bunnyhill

Then get the branch, and copy the new code into it:

Code: Select all
svn co https://extremetuxracer.svn.sourceforge.net/svnroot/extremetuxracer/branches/bunnyhill
cd bunnyhill
cp -r ~/path/to/bunnyhill/codebase/* .


Then commit the new code:

Code: Select all
svn add *
svn ci * -m "Initial upload of Bunny Hill code"


Or you could register a new project on Google Code or Sourceforge or Github.
Want Free Games?
Free Gamer - open source games resource
FreeGamer
 
Posts: 28
Joined: Wed Apr 11, 2007 9:41 am

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron