QUOTE
Hey Adventus, the Developer Fund thread got me thinking. I'm a coding know-nothing, and I'm curious about the amount of work that this release needed. What sort of steps did you have to take, and what sort of time went into it? You can get technical, I'm not scared. Please describe using diagrams where necessary.
Hmmm, thats a difficult question. Some factors should be taken into consideration, I'm probably not indicative of the average dev round 'ere. I've seen daylight.... haha
I'm rather new to programming (going on ~2 years now, one year with a real programming language), i've never been formally taught, never read a programming book. So everytime i do something its a learning process. However many ideas i'm developing in my uni degrees (theoretical physics & mechatronic engineering) probably help.
Getting things to cross-compile can be very hard for a newbie. Makefiles can be written in several different ways, and they often, understandably, try to do things (like automatically detect OS, good settings and processor arch) that make it easier for people who are natively compiling..... which naturally you have to bypass without too much harm done.
If I 100% knew what i was doing (ie familar with: particular engine, compiling process, used libraries, programming language), I could finish a port very quickly.... the actual amount of written code can vary greatly. In this case it was fairly minimal. I would say 90% of my time is either searching through the engines header files trying to locate a variable/function that'll give me a clue, or looking through library documentation.
Another thing, I can tell you that stratagus is quite possibly some of the nastiest code (not that i can talk
) i've seen on a large scale. At some point i think it moved from C to C++, as well as incorporating a generic GUI engine (guichan) and "tolua" engine (17,000 lines of computer generated vomit.... in one file). I much prefer uHexen2.
Since i usually do it in small chunks over a long period, heres what i remember of the wargus build:
- 1. Cross compile Lua for ARM. I tried a few different versions including a fixed point hack. This was fairly easy, but required a little bit of Makefile hacking since I'm compiling from x86 windows -> ARM Linux.
- 2. I successfully cross compiled a version of wargus that was released for QVGA mobile phones.... it also came with a rescaled texture pack, OMG ILLEGAL.... so it was instantly playable.
- 3. I wrote a generic input system that integrated well within the engine. Basically it simulates an SDL event when a button is pressed..... and therefore is completely isolated from the internal systems.
- 4. Played the game a bit. Realised this was an old version of wargus that was fairly basic on the AI front and was very slow.... nearly thought it wasnt worth going on.
- 5. After toiling with my conscience, decided to do my own port of stratagus & wargus. Downloaded SVN build of stratagus and most recent wargus. Moved my input system in, made some minor adjustments. Got it to cross compile successfully.
- 6. Decided it would be awesome, without the underlying engine realising, if i mapped its 640x480 coordinated space to 320x240 like you can with 3d games.
- 7. Played it at a 640x480 res..... ungodly slow. Decided that maybe the hardware blitter would be a good investment. Spent a fair bit of time trying to convert the png loading code so that it worked with SDL hardware surfaces. Eventually discovered that i had to make font sprites nonhardware because the cpu keeps on accessing them (changes their colors, etc).
- 8. Eventually got hardware blitting working.... still ungodly slow at 640x480. Sweet. Decided my only plan of attack was to dump my 640x480 plan and bite the bullet, 320x240 native was my only choice. This meant i would have to redesign the UI... in Lua (a language i've not before encountered).
- 9. Discovered Lua is quite possibly the easiest language in the world. Spent a lot of time going through Lua files dividing everything by 2 (sprite dimensions, bounding boxs, positions, etc).... Lots of Fun. Also because the fonts look shitehouse when scaled down, i provide one.... which replaces the 5 warcraft comes with (mostly). This means that dividing by two isnt correct in many cases, i had to fit it to the new font.
- 10. T'was happy with the speed when rendering 320x240 with hardware blitter. Finally had a decent warcraft II in my pocket. Unfortunately sharing it with others was a bit of a problem, i needed an easy, multi-platform way of half sizing the textures extracted from Wargus (i was just using a script in PaintShop Pro XI).
- 11. Tried a few batch image resizing programs. They all seemed to lose my pngs color keys no matter the settings (and i tried many). Settled on ImageMajick, seemed fast & well documented. Hacked a default color key into stratagus that is used for any palletised image.
- 12. Wrote help file, and generally cleaned up some stuff. Released Public Beta 1.
Over this whole dev process it probably took about 2 months ON and OFF, but as i said before ask me to do it again and it'll take less than a day. As you can see alot of time was wasted. [/wall-o-text]
Edit: Replying to Manjuu....
QUOTE
I use Filer2x to browse the NAND. It's a Japanese app, but you can switch to English with the button R, and hold Vol+ to read the help info. There also seems to be no exit menu in it, so you either need to reboot or launch a program in it. (It's also a launcher.)
Yea, i tried using Enexfi, but i couldn't work it. Anyway, if its only the "logs" folder then i've already fixed it.
QUOTE
Although, they are just suggestions... if it's too much trouble or would incur a noticeable performance penalty, then you don't really have to. The controls are very usable as they are.
Don't worry, i've already done it. Every button is now mapped to something, and it works really well, you have to be pretty coordinated though.
QUOTE
I don't know the "standards", but from what I understand ".gpu" is used for utilities and non-game programs, which also can include scripts, while ".gpe" is for games and emulators. From what I observe with other homebrew, the launching scripts for games ends with ".gpe", while ".gpu" for utilities.
*Suddenly the "u" makes sense* Ahhh, mmkay, will be done in next release.