![]() |
[Announce] Lincity-ng (city building simulator) on extras-devel
3 Attachment(s)
Lincity-NG on extras-devel. It contains game+data (40MB downloading, optified)
LinCity-NG is a city simulation game. In the game, you are required to build and maintain a city. You can win the game either by building a sustainable economy or by evacuating all citizens with spaceships. http://lincity-ng.berlios.de/ When game starts, it loads almost 10 seconds with black screen, just wait. Generating statistics take also time. Maemo Specific changes: *Try (even) harder to use 800x480 resolution: http://developer.berlios.de/bugs/?fu...&group_id=2929 *Do not save config on exit (crashes): http://developer.berlios.de/bugs/?fu...&group_id=2929 *built without opengl (SDL only): http://developer.berlios.de/bugs/?fu...&group_id=2929 *StatisticWindow shrinked: http://developer.berlios.de/bugs/?fu...&group_id=2929 Git repository for maemo specific changes: https://gitorious.org/lincity-n900/lincity-n900 Gameplay video: http://youtu.be/MOlwcbGu7u0 (It is not so unresponsible as it looks like, I had difficulties recording and playing at a same time.) There might be some keyboard shortcuts not accessible, keep reporting them. [EDIT] Added screenshots. |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Hi AapoRantalainen , thx for your efforts. For me , the game loads for 5 secs and crash ...
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
New version pushed. Should start now.
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Is there any screenshots for the game please?
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
That's great!
Aapo, could you please SSH into your N900 while a scenario is running in Lincity-ng and monitor the CPU usage with top? I'm particularly interested in the figures for Lincity-ng itself, Xorg and pulseaudio. Also is your N900 overclocked? Edit: @AnasSyria: Here [1] you'll find lots of screenshots of Lincity-ng. [1] http://lincity-ng.berlios.de/wiki/index.php/Screenshots |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
Code:
%MEM %CPU |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
The game seems to crash for languanges except en_US.
Normally my LANG is set to de_DE. With this settings the game crashes every time. If i set LC_ALL=en_US.UTF8 then the game starts. Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
2 Attachment(s)
crash confirmed - strace output attached
Edit: The gz is an output of calling lincity-ng with: LC_ALL=en_US.UTF8 A diff between both reveals that the problem must be somewhere in these three lines: Code:
lstat64("/home/user/.lincity-ng/locale/de.po", 0xbe9800a0) = -1 ENOENT (No such file or directory) |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
I really like a game like this.
But silly question, anyone mind to port it to Harmattan? :) |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
it closed automatically after 5 sec of black screen loading... help please!!.i love this game...
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
1 Attachment(s)
Localization fixed.
I tested with two languages, 'en' and 'fi'. 'En' worked because it is not using localization, and 'fi' worked because there are no localization for it. E.g. 'de' and 'fr' fails with segmentation fault. There were something wrong with reading from files, I rewrote it and it is now simpler. There are something similar with writing settings (which is now just skipped). I will fix that someday too. --- If game keeps crashing, start osso-xterm and run: Code:
/opt/lincity/games/lincity-ng |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
I can't start lincity...
this is what I've got: $ /opt/lincity/games/lincity-ng Starting lincity-ng (version 2.0)... [/home/user/.lincity-ng] is in the search path. [/opt/lincity//share/games/lincity-ng] is in the search path. [/home/user/.lincity-ng] is the write directory. Language is "it_IT". fast = 9 Couldn't load music file '/opt/lincity//share/games/lincity-ng/music/02 - Robert van Herk - City Blues.ogg': Module format not recognized Unexpected exception: Couldn't set video mode (1024x768-0bpp) : No video mode large enough for 1024x768 Thanks for help! |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
@dgls82,Cow:
Does this work for you?: Code:
/opt/lincity/games/lincity-ng -S 800x480 |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
@dgls82,Cow:
Are you using version 2.0-2maemo4? |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
@AapoRantalainen: ops, i'm using using version 2.0-2maemo3... I'm really sorry.... checking updates... Ok! Upgraded! now the game works... still no music. There is sound, I can hear effect's sound but there isn't music... |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
Sound effects are wav-files and they worked earlier. Music is ogg-files and needs newer version of underlying library (sdl-mixer). This better mixer will uninstall metapackage called mp-fremantle-generic-pr, so you will not get system updates from Nokia. Truly speaking nobody beliefs there are any more updates from Nokia, but let you know this. |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
upgraded to 2.0-2maemo5... still no music. Apart of that, the game works well. big thx to Aapo!
Bug report: when I start a new game choosing "start with empty board" or "start with random village" the game crashes... |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
i have a question concerning http://developer.berlios.de/bugs/?fu...&group_id=2929 - have you tried using opengl es (there is even opengl es wrapper for sdl, made by javispedro) insted of opengl or just disabled whole opengl stuff? i would love to try rewriting opengl code to opengl es (as your changes to rendering pipeline are mostly commenting out stuff - and removing one directory which has pretty small files), at first it looks not really hard to port. just wanted to ask if you tried - maybe you know more and it's not worth wasting time ;)
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
GL -> GLES is far from trivial. While code that has 'if( getConfig()->useOpenGL )' parts might support pure SDL (as is the case here), rewriting the GL parts is a huge task. You are welcome to try (not only here, there are tons of apps that could use GLES rewrite, would be very thankful). Aapo is awesome by noticing possibility to compile something which has GL stated as requirement and being able to bring it to GLES device such as N900.
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
It's not even guaranteed that you will get faster blitting using OpenGL ES.
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
Quote:
edit 2 : Oh, forget the CorsixTH part - now I see there was some activity in that thread, I've just missed that. |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
@misiak:
It would be great if you could port Lincity-ng to GLES! I'm not sure if it's worth it from a performance point of view but it would be a nice learning experience to know if GLES is faster than pure SDL. So from an academic point of view it's definitely worth it. Just for reference, I had a look at the source code myself some time ago and I wrote it down here [1] in the penultimate paragraph. But I guess you already know what I've written there. [1] http://talk.maemo.org/showpost.php?p...04&postcount=7 |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
OpenPandora has Lincity-ng with 'experimental openGLES', but I didn't find it source code (source code points only to the upstream version), and I haven't contacted author (lincity-ng is GPL, so sources are somewhere).http://boards.openpandora.org/index....77-lincity-ng/ |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
@sulu - yeah, i've noticed all opengl functions are in files from one directory, and these files are referenced by other files only few times... they look quite simple, there are only simple poligons/lines, textures and some viewport matrix simple operations (these can be tricky, but even if something is not supported, it doesn't mean it could not be rewritten with little effort ;) )
@Aapo - thanks for your reply, one last question - did you publish your patches somewhere? (i mean, the first 4 of them are in the first post, but are other modifications also published as patches somewhere?) it looks like I have what to do with my free time during next weekend ;) |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
When user press button "Start with empty board", it starts generating new board, which takes some 15 seconds without any visibility. So user press also 'Start'-button which then crashes because there are no scenario chosen. So there are two issues: A) Start button crashes if no scenario selected: *Fixed and reported to the upstream: http://developer.berlios.de/bugs/?fu...&group_id=2929 B) Starting empty map should not take so much, or it must be indicated, or dangerous buttons must be disabled. *"Start with empty board"/"Start with random village" - should look button, not text. *Why it takes so much time? (src/lincity/init_game.cpp:159) *Pressing 'start' is not fatal anymore. |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
you could consider splitting the game to two packages, as many other games do that ;) i mean, you could create package "lincity-ng" with size <1mb with file /opt/lincity/games/lincity-ng (that's only executable in the package, amarite?) which depends on package "lincity-ng-data". It's horrible to download almost 40 mb deb file just to get one small updated executable - just a suggestion ;)
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Oh WOW! I asked for this quite some time back and it got worked on! You are AWESOME! Thanks for this, tons~
|
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
ok, stupid question maybe, but i need to ask you, Aapo, as i'm not familiar with "jam"... when i run "./configure" and then "jam", the executable which is produced crashes on my N900 with errors "Warning couldn't find music file... blah blah" and "Unexpected exception: Couldn't open file 'gui/app.xml': No such file or directory" - do i need to run something extra apart from "./configure && jam" ? ;)
edit: ok, nevermind, found in debian/rules that i need a prefix ;) but i'm not deleting the post, as maybe it can help you solve sound issue And, one more thing - I've seen you have in debian/control, in Build-Depends section, text "libsdl-mixer1.2-dev (>= 1.2.6-5+0m5+ogg+mp3-2)" - this however didn't install this version of sdl-mixer and i was stuck with the old one... i needed to execute "apt-get install libsdl-mixer1.2-dev=1:1.2.6-5+0m5+ogg+mp3-2" to install this package - maybe that has something to do with ogg format not recognized issues? edit2: after installing the deb from the repos, i have 1.2.6-5+0m5 version of libsdl-mixer1.2, not 1.2.6-5+0m5+ogg+mp3-2... I've manually downloaded in scratchbox version with ogg: "apt-get install libsdl-mixer1.2-dev=1:1.2.6-5+0m5+ogg+mp3-2" and compiled lincity, then copied executable to device, then on device: "apt-get install libsdl-mixer1.2=1:1.2.6-5+0m5+ogg+mp3-2" and the error changed to simple "Couldn't open audio: Could not open requested file"... in fact, i think all libsdl-mixer games went silent, but i will check tomorrow, it's too late today for me to think |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Ok, my phone just needed a restart. Just letting you know, Aapo - after manually installing on my device proper version of sdl-mixer1.2 and installing in my sdk proper version of sdl-mixer1.2-dev, i have music playing in the background :) So I'm pretty sure it's the case I've described in words:
Quote:
P.S. Sorry for new post instead of editing old one, but this thread deserves a bump ;) edit: how do debian build tools compare versions of packages? if it's just string compare, "1:1.2.6.5+0m5" is indeed higher, than "1.2.6.5+0m5+ogg+mp3-2" due to second character from the first string (":") being higher in ascii table than from the second string (".")... I can see you are already setting some packages' version with ":"... maybe "1.2.6.5+0m5+ogg+mp3-2" should be changed to "1:1.2.6.5+0m5+ogg+mp3-2"? I cannot test right now, because my development environment is messed up due to opengl/opengles tests :P another edit: found that, out of curiosity searched the web and, according to http://www.lucas-nussbaum.net/blog/?p=304 , comment #4, in apt-pkg/deb/debversion.cc - actually it's plain C strcmp() function, so I'm pretty sure I can say I found out why sound is not working ;) |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
1 Attachment(s)
It wasn't that hard, but the performance boost is not that big... On non overclocked device (with power kernel, but with stock speeds), i've made some quick tests, with full sound support (music was playing constantly in the background consuming ~10-15% of cpu via pulseaudio)
70-75% with -s option (SDL rendering) 60-65% without any option (OpenGL ES rendering by default) I don't want to judge wheather the game and whole device was more responsive or not, because it may be related to my excitement ;) The rendering logic is not really OpenGL ES friendly, there are lots of calls to drawing pairs of triangles (quads), there is a lot of room for optimizations, which can be done now ;) In zip you can find compiled executable and a diff of source fetched by "apt-get source lincity-ng". If you feel brave and want to run it before Aapo pushes changes to the repo, you may download the zip, copy file "lincity-ng-opengles" to /opt/lincity/games (you may leave old one untouched, so you will have /opt/lincity/games/lincity-ng and /opt/lincity/games/lincity-ng-opengles), make it executable and run with "/opt/lincity/games/lincity-ng-opengles" command. The game can also be run with "-s" command (lower-case "s", this is important) which makes it ignore my code and use pure SDL rendering. Aapo, maybe you want to make me a co-maintainer of package, I would like to kill the bug with no sound in packages generaged by autobuilder ;) |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Awesome work. The sound issue is not related to this package only. Sadly sld-mixer from repos supports only .wavs (check this thread:http://talk.maemo.org/showthread.php?t=81792) so either statically including proper one is needed, or some other gymnastics. Could you by any chance have a look at Armagetron Advanced? With software GL it is close to playable in speed terms and would be awesome multiplayer game for N900 (except for speed everything else works)
http://forums3.armagetronad.net/view...hp?f=4&t=21548 (link to the GLES discussion on upstream forum, sadly devs from there seem to have abandoned the idea) https://code.launchpad.net/~aavoodoo (link to the close to finished GLES rewrite;opengles iirc is closer, gles2 bit further away) EDIT: oh and btw, probably worth notifying upstream of your work, doubt they will reject piece of code that widens the possible user-base of their project in such a way (open-pandora, iphones... lots of gles only devices) |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
@misiak, I merged your code, but not pushed package to the extras-devel:
https://gitorious.org/lincity-n900/l...19a30cfb529cb1 I added *compiling without GLES *sdl/gles can be changed via options *default=sdl btw: Android Lincity has also some buggy/experimental gles: http://www.nicolasmy.com/projects/57...-of-Lincity-NG -> Working gles on upstream would be very great. I haven't yet got any comments about my patches, so I'm not sure who is currently lead maintainer of the Lincity. Also wider discussion about playing on touchscreen would be cool. |
Re: [Announce] Lincity-ng (city building simulator) on extras-devel
Quote:
Quote:
Quote:
Quote:
Quote:
Android Lincity required quite heavy rewrite I guess, as it's different language and must use different libraries... You know, I've in fact just replaced few OpenGL functions with another ones... My process of porting is: 1. Get your source 2. Restore OpenGL you removed earlier 3. Compile on my ubuntu devel machine 4. It worsk with OpenGL => find in code functions which are in OpenGL but not in OpenGL ES (as OpenGL ES is actually a subset of desktop OpenGL functions) 5. Change this function calls to soething OpenGL ES compatible - but testing is still done on desktop PC, as it is much easier and faster to debug than compiling everything in scratchbox and uploading to my phone... 6. When code is using only OpenGL ES compatible functions - move to maemo scratchbox, replace SDL_opengl initialization/deinitialization and buffer swapping with javispedro's SDL_gles ones (it's really a task for 1-2 minutes, javispedro is the hero here) and adjust compile scripts to use "-lSDL_gles -lGLES_CM" instead of "-lopengl32 -lGL" (also task for only few minutes) In fact, this whole "port" took me about 3-4 hours overall, including messing up with maemo scratchbox and my ubuntu libraries ;) If Armagetron has working OpenGL rendering engine, it shouldn't take much longer than this to make initial port to OpenGL ES... Sorry if I made any grammar mistakes which made some sentences unreadable, I have slept really little during past few nights. Anyone else willing to compare cpu usage on their N900 with SDL and OpenGL ES rendering? |
All times are GMT. The time now is 20:16. |
vBulletin® Version 3.8.8