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.

IMPORTANT: TIME TO DECIDE

Postby erin » Mon May 25, 2009 5:27 pm

I think it's time to decide now because I must know how to continue. Bunny Hill, my attempt of a rewrite, is still work in progess but it has reached a state that allows to compare with ETRacer. The game has got a new program core, so it's possible to use 3D models. The physics code can be adjusted in a wide range, the collision code is complete new since Tuxracer/PPRacer/ETR lacks a real collision procedure. Probably you will miss the options in respect to the player (player name, scoring etc.) The reason: currently I'm working on a future-oriented player structure that should be open for multiplayer enhancements. In my opinion it doesn't make sense to implement player options without a particular basis.

In the first view you might get the impression of almost the same and wellknown game, but it's truly a rewrite.

About 60% of the code is entirely new, with other algorithms and methods.
About 25% is from Tuxracer 0.61 but thoroughly reworked.
The remaining 15% is nearly the same as in Tuxracer 0.61.

Bunny Hill contains no code from PPRacer or ETRacer, I've only taken a skybox, a few buttons and - tentatively - the logo from ETRacer.

I've tried to adjust the forces in a way that the behaviour is similar to Tuxracer. But by playing the game and watching the motion you will find some little differences. The motion in Tuxracer (PPRacer, ETR) is a bit smoother than in Bunny Hill, especially on courses with low scale factor (less than 2.0). The reason: In Bunny Hill the motion follows exactly the surface, with the result that you feel the bumpyness. In Tuxracer the motion is less accurate and ignores some hard edges - in this case an advantage. On the other hand: In Tuxracer the character dives into slopes on the side. That's a result of the inaccurate motion, too. In Bunny Hill the character touches the slopes in the right way, that's better. You see, advantages and disadvantages.

First my request:

Please download the code from my website and test the program VERY CRITICALLY - so long as you work with Linux. (URL at the end of this article) Bunny Hill is not available for Windows! Then post your opinion.

In my view there are 4 possibilities:

1. You might think that the code could be a good base for a new ETRacer. In this case I suggest to publish the code as an ETR rewrite beside (!) the existing version, first as alpha release. We can discuss it and receive the user comments. If someone is ready to help me out with CVS etc. I could try to become an ETR developer, or even better: another person could adopt the code and manage the further development. Then I would be free for writing the course editor and for creating more courses (I've dozens of ideas). And the ETR wiki needs a lot of articles for developers and course creators, especially for beginners.

2. You don't want to publish a second program beside ETR, but perhaps someone could try to use some parts of the Bunny Hill code for the existing ETR. Then I will keep my website open, but it's not my task and intention to work on the ETR code. (I've already said a lot about the reasons). But I'm able to answer questions.

3. You find that the existing ETR is better. Why not? Then I've to accept that my assessment and mind can't be generalized. Anyhow, in this case I will change my strategy and develop my own and private game regardless of the wishes and ideas of the community. I'm not sure to keep my website open except someone will participate and help to issue Bunny Hill as a new branch, independent from ETR. Another important reason to keep the existing ETR might be that other developers are already familiar with the ETR/PPRacer code. Possibly they don't want to change the code base. Be aware that the code style of Bunny Hill is extremely contrary to the ETR style. I know the sensivities of developers especially in respect to C or C++. For many of them the code style is more important than the functionality (see PPRacer). Coding as mentality.

4. I'm afraid, the following might happen, too: no reaction or too little reaction. That will be an indication of the end of ETR, and for me, it will be a hint to act in the same way as in case 3. It doesn't make sense to work at random.

Now some important changes you probably don't notice in the first view

1. Jumping. To trigger a jump you must press (!) the space key and not release it. I think that's more natural. Additionally the jumps are wider and higher.

2. Course angle. In Tuxracer, PPRacer and ETR you adjust the speed by setting the course angle. In Bunnyhill the basis speed is controlled by an additional speed param that emulates the course angle without changing the geometrical params. So it's a good idea to use a constant angle (about 15°). That has some advantages: It's easier to adjust bridges and houses on the course and you can change the speed after (!) adjusting the objects. Course creators who have already worked on courses for commercial Tuxracer know what I mean. Furthermore you have less problems with the skybox, it appears always in the same height since the view angle depends on the course angle (see view.cpp).

3. Tcl. Tcl is no longer used, all configuration and resources are loaded with SP now. The code for parsing the files is shorter and clearer, and the files are less syntax-sensible. In many cases, wrong or missing entries are offset by using meaningful default values.

4. Objects. In Tuxracer all objects (trees, items) are drawn on the trees.png map. That's a good way as long as there are only "point-orientated" items like trees. Objects with a larger basement like bridges, walls or houses can't be described with a dot on an object map, they need a detailed description in a textfile. Bunnyhill can read both. The normal procedure is to create an object map with trees, flags and herrings. The program generates an item list from this map, stores it immediately and afterwards this list is used instead. You can add the more complex objects manually. (Later this will be the task of a course editor)

5. Keyframes. It was high time to create more keyframes, especially for the final state of the race. The way Tux stopped after reaching the finish line was quite dreadful. Creating new keyframes is truly easy now and the course creator can write keyframes, appropriate to his course. I've written some keyframes but rather sketchily.

Some options I haven't implemented yet

... and I don't know if it makes sense to implement them at all. Maybe, maybe not.

1. Reset. First, in racing mode the reset option is nonsense. But a reset can be helpful when you want to train a special challenge on the course though the existing method with predefined reset marks is not good. It's better to set a reset mark during the race. Then all current parameters can be stored and when repeating this part of the course you will do it exactly under same conditions. And you know where you are after reset.

2. Mirror course. Sure, it's a nice option, and in Tuxracer 0.61 it was easy to implement it, you had only to mirror the three bitmaps. Commercial Tuxracer with an item list instead of trees.png lacks this option though it would be possible to enable it - with much more effort. Is it very important?

3. Tux shadow. No, the shadow in Tuxracer or ETR is poor, too poor. A good shadow must use the stencil buffer, and at the moment I don't know how to realize it. First I've to learn more.

4. Joystick. I'm not a gamer but I know what a joystick looks like. Hm, I can't imagine that steering with such a stick is advantageous though some people might like it. For me not urgent at the moment.

Options I can't implement

I think I've done a lot but something I'm not capable to realize.

1. Translations. I don't have experiences with wide char strings and unicode. So all texts and messages in Bunny Hill are in English. If it is desired to reach the level of ETR someone will have to implement the method that allows to use multiple languages.

2. Windows. This operating system is too difficult for me. For compiling the program under Windows someone must adapt the source code or help me with doing that.

3. Build systems and CVS. No idea how to work on CVS. No idea how to access the sourceforge files. No idea how to create a build system. I need help or another one must do it.

To say the truth, I'm a bit tired of doing all the stuff alone. For example, I can prepare the code for using 3D models but I can't create a lot of models. You agree with me that this must be the task of the communitiy, as well as creating new courses or campaigns. The same with sounds. We need some sliding sounds. Listen to the sound when sliding on ice - a terrible scraping. So I've only implemented the snap sound for the collision with a herring.

The few courses I've prepared for the rewrite seem to be the same as in ETR or Tuxracer because I didn't have time enough to equip them with 3D trees or other 3D models. To test those models - especially the collision with them - you can start the short test courses.

Unsolved problems

Yes, some problems are unsolved yet. One of the most urgent questions is how to create 3D models and how to make them available for the program. For creating nice models you need a 3D program like Blender, anim8or ... But a game can't use the files directly, they must be converted in a readable format. It seems to be possible to convert a text-orientated output like .obj though the actual problem is the uv texturing. For example: It would be fine to have some scalable stones for the course, but currently I don't know how to cover the 20 or 30 polygons properly with a texture.

Another problem is the quadtree algorithm combined with nice terrain texturing. The blurring mechanism of the Tuxracer quadtree is not optimal and should be replaced with a better algorithm. The trackmarks code in Bunny Bill already requires a method with geared texture tiles instead of simple blurring, so sometimes you can see an inaccurate transition. Ok, it works for the present.

I know, these problems are my concern. It will take some time.

Some words about the code

I've started to create some C++ classes primarily to clear the code, especially for the interaction between the different modules. A lot of elementary functions are still written in C, the library with mathematical functions for example, or the SP library. Sure, it were possible to transform all functions to C++, but I can't see a convincing advantage, so I hesitated. However, this shouldn't be an obstruction. If desired someone can make the code more C++ style.

What will I do next?

I've already said that Bunny Hill isn't ready yet. Some of the lacking options I'll implement the next weeks or months: the credits page, the configuration page, the player scoring. These tasks are not difficult but rather boring. More interesting will be to implement the first multiplayer option: race against an opponent in a single viewport (time-time challenge). I've already an idea how to generate the required chain of timemarks in a comfortable way, and the code is almost prepared for this.

Ok, it was a long post, thank you for reading.

An now some screenshots.

First a view on the main menu. The screen is almost empty since the buttons have moved to the lower border. The area above can be used for pics, animations, an inside scenery ... I don't know yet. Of course, Bunny Hill has its own logo, I've set the ETR logo on the screen to give an impression how it looks like in the other environment.

Image

The next shot shows the menu for selecting a training course. The course creator decides whether the campaign courses are visible in this menu or not. The light conditions are splitted in location (skybox) and light (daytime), you can choose them independent. There are 6 light conditions now: sunny, cloudy, foggy, evening, sunset and night. You needn't provide all light conditions at a location, if there are less than 6 lights (one is enough) you can access only the existing. Furthermore the listboxes for course or campain selection as well as the info boxes have got a scrollbar for faster navigation.

Image

The shot below shows the statistics. Tux has finished the braking phase and done the final keyframe:

Image

And now an impression from the course "Challenge One":

Image

The next pic is a shot from a race with hard wind conditions, the wind changes the direction and speed. You have to consider these conditions, so I've implemented a wind indicator. The thick pointer indicates the wind, the color and intensity changes with the wind speed. The thin pointer shows the direction of Tux' motion. So you can see the relative wind direction on a twisty course.

Image

Finally an impression of a race in a snow storm:

Image

Not to forget, here the URL of Bunny Hill:
http://www.erinacom.de/tux/bunnyhill/download.html
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby Torandi » Mon May 25, 2009 11:26 pm

I think it really looks great from the screenshots. There seems to be some improvment in graphics. I have not been able to test the game, since I get buffer overflow on both my computers (both running Ubuntu 9.04, one x64 and one i836), you will find the backtrace in the end of the post.

Anyway, if the game does what you say it does, I think I will vote for using that code as the code for ETRacer. In my opinion the current ETRacer code is terrible to work with.
Though if we use your code, I would appreciate if you translated the comments in the code to english.

Edit: After some debugging i found that it is this row that causes the problem:
[main.cpp:54] if (strcmp (argv[0], "./bh") == 0) getcwd (game.progdir, 256);
More specific it isgetcwd (game.progdir, 256); that causes the error.

Edit2: Yupp, it was the getcwd (game.progdir, 256); that caused the error. The reason was that the type of game.progdir was char[128]!
With that removed, the game looked nice :) (though i got an framrate around 1 fps on my laptop).
In my opinion the actual game is better in your version, but i think we should keep the look of the old menus.

Edit: No need for a stacktrace anymore
User avatar
Torandi
 
Posts: 56
Joined: Thu Jun 14, 2007 8:32 pm
Location: Stockholm, Sweden

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Tue May 26, 2009 2:15 pm

Yupp, it was the getcwd (game.progdir, 256); that caused the error. The reason was that the type of game.progdir was char[128]!


I'm sure that there are more bugs ...

though i got an framrate around 1 fps on my laptop


That's bad. If you have the required graphics drivers installed you should reach 75 fps or more - or there is another fatal bug in the program. On my computer (6 years old) the program runs with 90 fps (or with 50 fps when the snow particle system is fully activated).

but i think we should keep the look of the old menus


That's one point we will have to discuss
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby Torandi » Tue May 26, 2009 4:32 pm

erin wrote:That's bad. If you have the required graphics drivers installed you should reach 75 fps or more - or there is another fatal bug in the program. On my computer (6 years old) the program runs with 90 fps (or with 50 fps when the snow particle system is fully activated).

That could probably be my graphics drivers, their worthless. I will try it on my desktop later.
User avatar
Torandi
 
Posts: 56
Joined: Thu Jun 14, 2007 8:32 pm
Location: Stockholm, Sweden

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Wed May 27, 2009 1:26 am

Those screenshots look amazing! And I'll write up a whole list of reasons why it would be better to use your code. Unfortunately, before I may do so, it must become compilable. I get the following on Ubuntu (is this the same thing as Torandi?):
Code: Select all
*** buffer overflow detected ***: ./bh terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7bd8da8]
/lib/tls/i686/cmov/libc.so.6[0xb7bd6eb0]
/lib/tls/i686/cmov/libc.so.6[0xb7bd75d4]
./bh[0x804bd84]
./bh[0x804bdec]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7af1775]
./bh[0x804b5f1]
======= Memory map: ========
08048000-08087000 r-xp 00000000 08:01 337481     /home/kristian/Desktop/bunnyhill/bh
08087000-08088000 r--p 0003e000 08:01 337481     /home/kristian/Desktop/bunnyhill/bh
08088000-08089000 rw-p 0003f000 08:01 337481     /home/kristian/Desktop/bunnyhill/bh
08089000-08383000 rw-p 08089000 00:00 0
09358000-09379000 rw-p 09358000 00:00 0          [heap]
b769b000-b769e000 rw-p b769b000 00:00 0
b769e000-b76a2000 r-xp 00000000 08:01 103443     /usr/lib/libogg.so.0.5.3
b76a2000-b76a3000 r--p 00003000 08:01 103443     /usr/lib/libogg.so.0.5.3
b76a3000-b76a4000 rw-p 00004000 08:01 103443     /usr/lib/libogg.so.0.5.3
b76a4000-b76a8000 r-xp 00000000 08:01 101883     /usr/lib/libXdmcp.so.6.0.0
b76a8000-b76a9000 rw-p 00003000 08:01 101883     /usr/lib/libXdmcp.so.6.0.0
b76a9000-b76c4000 r-xp 00000000 08:01 103447     /usr/lib/libvorbis.so.0.4.0
b76c4000-b76c5000 r--p 0001a000 08:01 103447     /usr/lib/libvorbis.so.0.4.0
b76c5000-b76d3000 rw-p 0001b000 08:01 103447     /usr/lib/libvorbis.so.0.4.0
b76d3000-b76da000 r-xp 00000000 08:01 261811     /lib/tls/i686/cmov/librt-2.9.so
b76da000-b76db000 r--p 00006000 08:01 261811     /lib/tls/i686/cmov/librt-2.9.so
b76db000-b76dc000 rw-p 00007000 08:01 261811     /lib/tls/i686/cmov/librt-2.9.so
b76dc000-b76dd000 rw-p b76dc000 00:00 0
b76dd000-b76f5000 r-xp 00000000 08:01 101885     /usr/lib/libxcb.so.1.1.0
b76f5000-b76f6000 r--p 00017000 08:01 101885     /usr/lib/libxcb.so.1.1.0
b76f6000-b76f7000 rw-p 00018000 08:01 101885     /usr/lib/libxcb.so.1.1.0
b76f7000-b76f9000 r-xp 00000000 08:01 101881     /usr/lib/libXau.so.6.0.0
b76f9000-b76fa000 r--p 00001000 08:01 101881     /usr/lib/libXau.so.6.0.0
b76fa000-b76fb000 rw-p 00002000 08:01 101881     /usr/lib/libXau.so.6.0.0
b76fb000-b7736000 r-xp 00000000 08:01 136484     /usr/lib/libsmpeg-0.4.so.0.1.4
b7736000-b7737000 r--p 0003a000 08:01 136484     /usr/lib/libsmpeg-0.4.so.0.1.4
b7737000-b7738000 rw-p 0003b000 08:01 136484     /usr/lib/libsmpeg-0.4.so.0.1.4
b7738000-b7754000 rw-p b7738000 00:00 0
b7754000-b775b000 r-xp 00000000 08:01 103449     /usr/lib/libvorbisfile.so.3.2.0
b775b000-b775c000 r--p 00006000 08:01 103449     /usr/lib/libvorbisfile.so.3.2.0
b775c000-b775d000 rw-p 00007000 08:01 103449     /usr/lib/libvorbisfile.so.3.2.0
b775d000-b77a4000 r-xp 00000000 08:01 136476     /usr/lib/libmikmod.so.2.0.4
b77a4000-b77a6000 rw-p 00047000 08:01 136476     /usr/lib/libmikmod.so.2.0.4
b77a6000-b77a7000 rw-p b77a6000 00:00 0
b77a7000-b77bb000 r-xp 00000000 08:01 261770     /lib/libz.so.1.2.3.3
b77bb000-b77bc000 r--p 00013000 08:01 261770     /lib/libz.so.1.2.3.3
b77bc000-b77bd000 rw-p 00014000 08:01 261770     /lib/libz.so.1.2.3.3
b77bd000-b780f000 r-xp 00000000 08:01 102893     /usr/lib/libtiff.so.4.2.1
b780f000-b7811000 r--p 00052000 08:01 102893     /usr/lib/libtiff.so.4.2.1
b7811000-b7812000 rw-p 00054000 08:01 102893     /usr/lib/libtiff.so.4.2.1
b7812000-b7831000 r-xp 00000000 08:01 102887     /usr/lib/libjpeg.so.62.0.0
b7831000-b7832000 rw-p 0001e000 08:01 102887     /usr/lib/libjpeg.so.62.0.0
b7832000-b7856000 r-xp 00000000 08:01 102890     /usr/lib/libpng12.so.0.27.0
b7856000-b7857000 r--p 00023000 08:01 102890     /usr/lib/libpng12.so.0.27.0
b7857000-b7858000 rw-p 00024000 08:01 102890     /usr/lib/libpng12.so.0.27.0
b7858000-b786b000 r-xp 00000000 08:01 103009     /usr/lib/libdirect-1.0.so.0.1.0
b786b000-b786c000 r--p 00012000 08:01 103009     /usr/lib/libdirect-1.0.so.0.1.0
b786c000-b786d000 rw-p 00013000 08:01 103009     /usr/lib/libdirect-1.0.so.0.1.0
b786d000-b786e000 rw-p b786d000 00:00 0
b786e000-b7875000 r-xp 00000000 08:01 103011     /usr/lib/libfusion-1.0.so.0.1.0
b7875000-b7876000 r--p 00006000 08:01 103011     /usr/lib/libfusion-1.0.so.0.1.0
b7876000-b7877000 rw-p 00007000 08:01 103011     /usr/lib/libfusion-1.0.so.0.1.0
b7877000-b78db000 r-xp 00000000 08:01 103010     /usr/lib/libdirectfb-1.0.so.0.1.0
b78db000-b78dc000 r--p 00063000 08:01 103010     /usr/lib/libdirectfb-1.0.so.0.1.0
b78dc000-b78dd000 rw-p 00064000 08:01 103010     /usr/lib/libdirectfb-1.0.so.0.1.0
b78dd000-b79a0000 r-xp 00000000 08:01 103095     /usr/lib/libasound.so.2.0.0
b79a0000-b79a2000 r--p 000c2000 08:01 103095     /usr/lib/libasound.so.2.0.0
b79a2000-b79a5000 rw-p 000c4000 08:01 103095     /usr/lib/libasound.so.2.0.0
b79a5000-b79a7000 r-xp 00000000 08:01 261796     /lib/tls/i686/cmov/libdl-2.9.so
b79a7000-b79a8000 r--p 00001000 08:01 261796     /lib/tls/i686/cmov/libdl-2.9.so
b79a8000-b79a9000 rw-p 00002000 08:01 261796     /lib/tls/i686/cmov/libdl-2.9.so
b79a9000-b79be000 r-xp 00000000 08:01 261809     /lib/tls/i686/cmov/libpthread-2.9.so
b79be000-b79bf000 r--p 00014000 08:01 261809     /lib/tls/i686/cmov/libpthread-2.9.so
b79bf000-b79c0000 rw-p 00015000 08:01 261809     /lib/tls/i686/cmov/libpthread-2.9.so
b79c0000-b79c3000 rw-p b79c0000 00:00 0
b79c3000-b79cb000 r-xp 00000000 08:01 103919     /usr/lib/libdrm.so.2.4.0
b79cb000-b79cc000 r--p 00007000 08:01 103919     /usr/lib/libdrm.so.2.4.0
b79cc000-b79cd000 rw-p 00008000 08:01 103919     /usr/lib/libdrm.so.2.4.0
b79cd000-b79d1000 r-xp 00000000 08:01 103065     /usr/lib/libXfixes.so.3.1.0
b79d1000-b79d2000 rw-p 00003000 08:01 103065     /usr/lib/libXfixes.so.3.1.0
b79d2000-b79d4000 r-xp 00000000 08:01 103071     /usr/lib/libXdamage.so.1.1.0
b79d4000-b79d5000 rw-p 00001000 08:01 103071     /usr/lib/libXdamage.so.1.1.0
b79d5000-b79d9000 r-xp 00000000 08:01 103921     /usr/lib/libXxf86vm.so.1.0.0
b79d9000-b79da000 r--p 00003000 08:01 103921     /usr/lib/libXxf86vm.so.1.0.0
b79da000-b79db000 rw-p 00004000 08:01 103921     /usr/lib/libXxf86vm.so.1.0.0
b79db000-b7ac5000 r-xp 00000000 08:01 101887     /usr/lib/libX11.so.6.2.0
b7ac5000-b7ac6000 ---p 000ea000 08:01 101887     /usr/lib/libX11.so.6.2.0
b7ac6000-b7ac7000 r--p 000ea000 08:01 101887     /usr/lib/libX11.so.6.2.0
b7ac7000-b7ac9000 rw-p 000eb000 08:01 101887     /usr/lib/libX11.so.6.2.0
b7ac9000-b7acb000 rw-p b7ac9000 00:00 0
b7acb000-b7ad9000 r-xp 00000000 08:01 101889     /usr/lib/libXext.so.6.4.0
b7ad9000-b7ada000 r--p 0000d000 08:01 101889     /usr/lib/libXext.so.6.4.0
b7ada000-b7adb000 rw-p 0000e000 08:01 101889     /usr/lib/libXext.so.6.4.0
b7adb000-b7c37000 r-xp 00000000 08:01 261793     /lib/tls/i686/cmov/libc-2.9.so
b7c37000-b7c38000 ---p 0015c000 08:01 261793     /lib/tls/i686/cmov/libc-2.9.so
b7c38000-b7c3a000 r--p 0015c000 08:01 261793     /lib/tls/i686/cmov/libc-2.9.so
b7c3a000-b7c3b000 rw-p 0015e000 08:01 261793     /lib/tls/i686/cmov/libc-2.9.so
b7c3b000-b7c3e000 rw-p b7c3b000 00:00 0
b7c3e000-b7c4b000 r-xp 00000000 08:01 261696     /lib/libgcc_s.so.1
b7c4b000-b7c4c000 r--p 0000c000 08:01 261696     /lib/libgcc_s.so.1
b7c4c000-b7c4d000 rw-p 0000d000 08:01 261696     /lib/libgcc_s.so.1
b7c4d000-b7c71000 r-xp 00000000 08:01 261797     /lib/tls/i686/cmov/libm-2.9.so
b7c71000-b7c72000 r--p 00023000 08:01 261797     /lib/tls/i686/cmov/libm-2.9.so
b7c72000-b7c73000 rw-p 00024000 08:01 261797     /lib/tls/i686/cmov/libm-2.9.so
b7c73000-b7d57000 r-xp 00000000 08:01 99485      /usr/lib/libstdc++.so.6.0.10
b7d57000-b7d5b000 r--p 000e3000 08:01 99485      /usr/lib/libstdc++.so.6.0.10
b7d5b000-b7d5c000 rw-p 000e7000 08:01 99485      /usr/lib/libstdc++.so.6.0.10
b7d5c000-b7d62000 rw-p b7d5c000 00:00 0
b7d62000-b7dd4000 r-xp 00000000 08:01 102896     /usr/lib/libfreetype.so.6.3.20
b7dd4000-b7dd8000 r--p 00071000 08:01 102896     /usr/lib/libfreetype.so.6.3.20
b7dd8000-b7dd9000 rw-p 00075000 08:01 102896     /usr/lib/libfreetype.so.6.3.20
b7dd9000-b7dda000 rw-p b7dd9000 00:00 0
b7dda000-b7e04000 r-xp 00000000 08:01 136516     /usr/lib/libftgl.so.2.1.3
b7e04000-b7e06000 r--p 00029000 08:01 136516     /usr/lib/libftgl.so.2.1.3
b7e06000-b7e07000 rw-p 0002b000 08:01 136516     /usr/lib/libftgl.so.2.1.3
b7e07000-b7e2c000 r-xp 00000000 08:01 136486     /usr/lib/libSDL_mixer-1.2.so.0.2.6
b7e2c000-b7e2d000 r--p 00024000 08:01 136486     /usr/lib/libSDL_mixer-1.2.so.0.2.6
b7e2d000-b7e36000 rw-p 00025000 08:01 136486     /usr/lib/libSDL_mixer-1.2.so.0.2.6
b7e36000-b7e60000 rw-p b7e36000 00:00 0
b7e60000-b7e6a000 r-xp 00000000 08:01 136520     /usr/lib/libSDL_image-1.2.so.0.1.5
b7e6a000-b7e6b000 rw-p 0000a000 0Aborted
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 864
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Wed May 27, 2009 6:29 am

is this the same thing as Torandi?


I can't say definitely, but I guess. Today I'll fix the bug and upload the fixed code.
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Wed May 27, 2009 7:44 am

Ok, the fixed code is up.

In the case you decide to take the Bunny Hill code I suggest that someone checks and reworks the code. I think, for an open source project it would be better to use consistent C++ code. Many of the developers here seem to have more experiences with C++ than me. Sure, I'm not bad in mathematics and I know a lot (not all!) about vectors, matrices etc. but I'm still beginner in writing code. And to say the truth: Urgently I need a time-out. For about 8 months I've worked on the rewrite, averagely 2 hours a day.

Here some hints for a rework:

All string-orientated functions including the SP library should use the C++ string class, prepared for translations in different languages. You see, the stupid buffer overflow is a dangerous result of careless handling of C strings.

Perhaps the maths library should converted to C++ with vector classes etc. That would simplify the usage of parts of ETR code. Additionally I suggest to replace all variables of type double with GLfloat. This type seems to work exactly enough and saves a lot of memory space (items list !) though it's not faster than double.

But first test the program.
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Thu May 28, 2009 1:31 am

Ok, thanks for fixing that, it works wonderfully now. I have so much to say, this is such an improvement over the old code in terms of efficiency (how do you get fps?). While there would be a lot of work to do graphically to get it up to par with the current version, it would definitely be worth it. I would opt to adopt this code under the condition that it is made to compile on Windows (I'm already working on that). I would also commit to working to the best of my ability to better it (keeping in mind that I am an artist and project manager, not a coder). Taking our name presents a good deal of advantages for you too, erin: you get immediate recognition, a forum full of people coming and going and making suggestions, not to mention near-instant repo inclusion. Anyway, I can't possibly think of any reasons why this would not be preferred over the old code base (except for the german comments).
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 864
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Thu May 28, 2009 6:53 am

Anyway, I can't possibly think of any reasons why this would not be preferred over the old code base (except for the german comments).


No problem to translate the comments to English, I'll do it next days. Additionally I will do the following:
- replace the double type with GLfloat (almost done). That makes the code more integrative.
- rewrite of SP and usage of the string class. That makes the code safer and easier to work on. Indeed, there's no reason to use the old C strings, ist's a rudiment of my first work on old Tuxracer 0.61.
- in respect to the maths library I've started a rework, but at the moment I don't know if it is advantageous to use vector classes instead of native vector functions. However, for other developers it might be better to use the same structures than ETR.
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Thu May 28, 2009 7:13 am

under the condition that it is made to compile on Windows


I don't know the requirements to make the program compilable on Windows. I've only used SEP instead of "/" for separating pathes and filenames. That can be changed in the main header bh.h. But I think there must be some additional includes. So I have a question: which compiler do you use for Windows? I'd like to compile it on Windows, too, to keep the code available for both systems.
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Thu May 28, 2009 11:17 am

I use mingw on Windows, it's literally a port of gcc, this makes it much easier for compiling unix programs. There's a (small) chance that the program already compiles on windows, I just need to get the dependencies sorted out. I'll be sure to tell you if I get any strange errors.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 864
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Sat May 30, 2009 2:36 pm

Ok, for the time being it seems impossible to compile on windows due to the references to pwd.h which (if i'm not mistaken) is a posix only library.
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 864
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Sat May 30, 2009 4:04 pm

due to the references to pwd.h which (if i'm not mistaken) is a posix only library


That's right, it is used to find out the homedir on Linux (pwd stands for password). Since this version doesn't save the configurations yet it can be removed. Later I can differ between Windows and Linux.
Comment out or remove the #include <pwd.h> in bh.h and the 3 related lines in SetGameParams (main.cpp).

how do you get fps?


Open config.cpp and set the option show_fps to true (the config is not saved yet)

Another hint: Since the player options are not implemented yet, you can set the challenge to a higher level in the campaign intro, that's the screen which shows the 3 courses of the campaign. Press '+' or '-' to change the level.
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Re: IMPORTANT: TIME TO DECIDE

Postby cpicon92 » Sat May 30, 2009 7:07 pm

Ok, a few more errors:
1. it can't find glx.h, what is this used for?
2. there's a problem with ogl.h, something about pfngllockarraysextproc
cpicon92: utilisateur de Windows; défenseur du logiciel emprisonné
a.k.a. kpicon92
User avatar
cpicon92
 
Posts: 864
Joined: Sun Apr 08, 2007 5:06 pm
Location: New York, USA

Re: IMPORTANT: TIME TO DECIDE

Postby erin » Sun May 31, 2009 9:03 am

it can't find glx.h, what is this used for?


glx is the interface between OpenGL and the X window system. On Linux it is installed together with the drivers, and it seems to be unix-specific, too. I don't know if something like that is necessary on Windows. You could try to compile it without glx (see Makefile).

there's a problem with ogl.h, something about pfngllockarraysextproc


pfngllockarraysextproc is a function pointer to the OpenGL extensions declared in one of the headers of OpenGL. The way to get access to these functions seems to differ on the os. I remember that I had some problems with the standard header of OpenGL, but it worked when I used SDL for getting the pointers: SDL_GL_GetProcAddress (). There is a alternative that should be suitable for Windows: wglGetProcAddress (is wgl the Interface OpenGL-Windows?).

However, I think there must be some adaptations. I'll try to implement them in the code. Additionally I'm going to change the C strings with the string class to make the code safer. When ready (a few days) I'll report.
erin
 
Posts: 275
Joined: Mon Oct 08, 2007 8:10 am

Next

Return to Development

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest