Register
Email: Password:
Forum » Open source!

Open source!

Amarth 13 years ago
The first topic in about 5 years in the Bikez II forum...

It has gone open source! Yayity!

<!-- m --><a class="postlink" href="http://www.instantkingdom.com/2011/01/bikez-ii-open-sourced/">http://www.instantkingdom.com/2011/01/b ... n-sourced/</a><!-- m -->
#
E_net4 13 years ago
It looks like a big bunch of files so far.
I wish to look into the DirectX part of the program.
#
prefic 13 years ago
Sources opened, yay!

So is anyone working on a SDL modification of this?
#
Amarth 13 years ago
That was my first plan, yeah.

On seeing the code, I'm thinking it might take a while...
#
prefic 13 years ago
Seems so quiet here... what do you think about the code Amarth and others? Is it possible (read: reasonable) to make it SDL? I could help you with this, after few months thou. I have to focus on graduating first. And then I could read couple of books about SDL/directX.
#
Amarth 13 years ago
Eh, I'm thinking it would help if the code was translated into English first. And also cleaned up to reduce the filesize to about a third of what it is now.

Once that is done it would be quite some work, I would guess a few weeks of very intense coding, but it would be possible to get it to SDL+OpenGL I think. Ideally you want to split off all the rendering code into a separate interface which you can then replace with OpenGL, and all the auxiliary DirectX functions (input, sound, ...) into some other interface (or multiple interfaces) to replace with SDL.

I'm also focusing on graduating first though... After my current exams (in a few weeks) I might try to get it built on the current code (which I believe might already be quite a challenge), once I get there I will get the code on github and keep sharing my improvements that way.

The new TIGSource competition isn't really helping things though. If I get serious about that it might be a bit longer before Bikez sees some love.

It will all be worth it when it runs on my Wii though.
#
Anonymous1157 13 years ago
"Amarth" said:
It will all be worth it when it runs on my Wii though.
O.o

Mumble mumble traded my Wii for an Xbox mumble... mumble novelty wore off and I never got the Wii back mumble and it's in mumble storage mumble...
#
prefic 13 years ago
I could help translating it from Finnish to English. Translating would be easier way to help you than learning to handle the directx/sdl.
#
E_net4 13 years ago
Ok, all this motivation is quite nice 'n' all... but I still don't understand what makes you so enthusiastic about SDL...
#
Amarth 13 years ago
"prefic" said:
I could help translating it from Finnish to English. Translating would be easier way to help you than learning to handle the directx/sdl.
Then just start doing it. You don't need my permission or my orders to do it. Download the code and translate the variable and function names, make sure it still compiles because broken code is worse than foreign code. If you are not comfortable with doing that, look through the code and write down whatever you know or can deduce in the forum here. Someone else might take it from there. Might not even be me.

To get anyone started: the most important file in the code package is bikez2.cpp, together with bikez2.h.

"E_net4" said:
Ok, all this motivation is quite nice 'n' all... but I still don't understand what makes you so enthusiastic about SDL...
Because DirectX is a closed, Windows-only, unstable library. Every major (and even minor) new platform that will rise is bound to have an SDL implementation in time. SDL makes code future-proof, DirectX makes it unusable.
#
E_net4 13 years ago
"Amarth" said:
"prefic" said:
I could help translating it from Finnish to English. Translating would be easier way to help you than learning to handle the directx/sdl.
Then just start doing it. You don't need my permission or my orders to do it. Download the code and translate the variable and function names, make sure it still compiles because broken code is worse than foreign code. If you are not comfortable with doing that, look through the code and write down whatever you know or can deduce in the forum here. Someone else might take it from there. Might not even be me.

To get anyone started: the most important file in the code package is bikez2.cpp, together with bikez2.h.

"E_net4" said:
Ok, all this motivation is quite nice 'n' all... but I still don't understand what makes you so enthusiastic about SDL...
Because DirectX is a closed, Windows-only, unstable library. Every major (and even minor) new platform that will rise is bound to have an SDL implementation in time. SDL makes code future-proof, DirectX makes it unusable.
Ok... I was just wondering, because not using DirectX doesn't mean you're restricted to SDL. I took a close look at SDL again, and it seems to be an ok choice.
#
MageKing17 13 years ago
"E_net4" said:
"Amarth" said:
"E_net4" said:
Ok, all this motivation is quite nice 'n' all... but I still don't understand what makes you so enthusiastic about SDL...
Because DirectX is a closed, Windows-only, unstable library. Every major (and even minor) new platform that will rise is bound to have an SDL implementation in time. SDL makes code future-proof, DirectX makes it unusable.
Ok... I was just wondering, because not using DirectX doesn't mean you're restricted to SDL. I took a close look at SDL again, and it seems to be an ok choice.
You're right. You could also use OpenGL... which is what SDL does on most platforms anyway. Using SDL is more compatible since SDL doesn't rely on any specific graphics library.
#
Amarth 13 years ago
You've never actually used SDL I guess?

SDL doesn't provide a hardware accelerated 3D interface itself. There's some 2D functions, but I don't think they're hardware accelerated. It does provides a unified way to get an OpenGL context though. So we'll actually be translating it to SDL+OpenGL. Yip, lots of work.
#
prefic 13 years ago
I'll start translating it. Translating from Finnish to English is easy for me because Finnish is my first language. It might take a while because there is almost 8000 lines in the bikez2.cpp alone. Ville have used a bit of slang words in function names etc. which doesn't make it any easier. I will start from comments. Because failing there is not that big deal.

I cant compile it because I use Linux-system. (oh, I mean maybe I could. but I could not execute it.)
#
E_net4 13 years ago
I've never used SDL, yeah. In the only finished work I have with OpenGL, I used GLUT to create a window, set up some stuff and receive keyboard input. I only needed to render coloured squares in a grid anyway.
#
prefic 13 years ago
just little update about my translation process.

It feels very frustrating to translate this. Ville has used a lot of possessive suffixes, grammatical cases, other suffixes etc. in the function and variable names. Most of those doesn't even have a valid translation in English. Using the basic suffix will not work because it has been used already for something else. And translating a function name to a sentence feels just stupid.

This goes a bit off-topic...
In Finnish there is 15 different grammatical cases for a noun.
And all of those cases are affected by possessor (me, you, he, etc.) of the noun. Which makes 7*15 different appearances for a noun. And oh I forgot plurals which doubles the amount.
<!-- m --><a class="postlink" href="http://en.wikipedia.org/wiki/Agglutinative_language">http://en.wikipedia.org/wiki/Agglutinative_language</a><!-- m -->

Making this all platform game would be a lot easier if we would have a Finnish speaking SDL/directX expert.
#
MageKing17 13 years ago
"prefic" said:
And translating a function name to a sentence feels just stupid.
Oh trust me, sentence variable-and-function names are a lot more common than you might think.
#
Amarth 13 years ago
What?
public void sheSellsSeashellsByTheSeashore(const string theDragonRoared);
public int asSheShruggedISawMyWorldCollapse();
private boolean IWillTakeTheRingThoughIDoNotKnowTheWay(OneRing r);
This is fun.
#
Narvius 13 years ago
Noncapitalized public function names? Urgh.

Sorry
#
MageKing17 13 years ago
What, hasn't everybody written an IWillTakeTheRingThoughIDoNotKnowTheWay function?

"Narvius" said:
Noncapitalized public function names? Urgh.
Everyone knows you don't capitalize public function names to avoid confusing them with classes.
#
Narvius 13 years ago
Yes, in script-style languages. But that signature uses C-style syntax.
#
E_net4 13 years ago
"Narvius" said:
Yes, in script-style languages. But that signature uses C-style syntax.
The rule still applies to C++ and Java. Capitalize classes, not methods.
#
Narvius 13 years ago
Yeah, right. I just looked at some code and found I've been doing it that way, too. I guess I wrote too much C# lately (there, it is customary to write everything public capitalized. And it sure looks good, but in other languages it somehow feels wrong.)
#
prefic 13 years ago
Well, since I dont anymore have any higher priority tasks I started the translating process all over again. Is anyone interested about making this SDL/openGL? I understand if you dont but I would like to know. Because I dont want to work for this if no one is interested to take it further.

Btw. the translating process feels a bit easier now. Maybe because I studiet a course of java programming (i can program with python also) and I got rid of some stressful things.

btw. A friend of mine might want to help us with this. His help would speed up the translating process.
#
Amarth 13 years ago
Good to hear it!

Anything you do open source is never lost. Even if no-one is interested right now, or no-one speaks up to let you know they are interested, someone might stumble on it years later and profit from your work. Just make sure you release your work in a way others can find and use it.

I am interested to see the code translated to SDL/OpenGL but I am not sure I will actually do it. I've got other things to do. Then again, if I only manage to do part of it, someone else can continue...
#
prefic 13 years ago
Yeah, i know. It has somerhing to do with my motivation though...
#
prefic 13 years ago
I started with bikez2.h because its not too big for first one. Everything is in comments though. I didnt have balls to start changhing the code right away. First i tried to translate everything but it made me feel like I am breaking something.

<!-- m --><a class="postlink" href="https://github.com/prefic/bikez2-translation/blob/master/bikez2.h">https://github.com/prefic/bikez2-transl ... r/bikez2.h</a><!-- m -->

I can do same to other files if it would help you. Should I continue like this or try to translate everything? I wonder if it is necessary to translate function names etc. at some point.

All pro-tips and comments are welcome.
#
Amarth 13 years ago
This is pretty awesome. I like it.

I think it would be pretty helpful to have the function names translated at some point. Having to grab the dictionary each time you want to read some code is not very fun. It would be a very annoying, long stretched task to translate the actual code, but I think it should be possible to do it without making very many mistakes because the compiler will complain loudly if you miss anything.

I actually hope there is an IDE out there that supports refactoring for C++, so that you just have to tell it once to change the name and it changes all references for you. Well, I'm pretty sure things like that exist, but I haven't used it for C++ yet, so I might need to search around a bit.

I'll try to take a look during the weekend (if I have some time left over) to get the build chain up and running on my new laptop so I can help.
#
prefic 13 years ago
There is simple refactoring tool in gedit (wich is most common texteditor for linux). Gedit's tool cannot do it for multiple files simultaneously. Refactoring the files one by one wouldnt take much more time. I think there is more proper tools available. It may even be included in bash (linux command promt). I think variable names are harder. Maybe I continue with funktion names and comments. Some translated comments may be as odd as the orignal wille's comments. Although i tried to translate those the way that they make sense. Not like googletranslate style.
#
prefic 13 years ago
I am working on bikez2.cpp now. First i do comments and add some new ones. Then i'll probably proceed with function names. I'll try to find a proper refractoring tool before I start doing function names. I hope that I'll get bikez2.cpp done during next week.

Nothing new really. Seems that these little reports about the process keeps me motivated. Even though only few people will ever read these.
#
prefic 13 years ago
Reporting in. bikez2.cpp and func.h are now translated.

<!-- m --><a class="postlink" href="https://github.com/prefic/bikez2-translation/blob/master/bikez2.cpp">https://github.com/prefic/bikez2-transl ... bikez2.cpp</a><!-- m -->
<!-- m --><a class="postlink" href="https://github.com/prefic/bikez2-translation/blob/master/func.h">https://github.com/prefic/bikez2-transl ... ter/func.h</a><!-- m -->
#
Forum » Open source!

Post Reply


Your email:
Your name: