maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   [Announce] Lincity-ng (city building simulator) on extras-devel (https://talk.maemo.org/showthread.php?t=83647)

AapoRantalainen 2012-04-15 09:48

[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.

4n77r4xX 2012-04-15 13:53

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 ...

AapoRantalainen 2012-04-16 10:06

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
New version pushed. Should start now.

AnasSyria 2012-04-16 10:18

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Is there any screenshots for the game please?

sulu 2012-04-16 10:19

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

AapoRantalainen 2012-04-16 15:42

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by sulu (Post 1192708)
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?

Most of the time lincity is between 60..70 %CPU. Not overclocked device.
Code:

%MEM  %CPU
43.0 66.7 /opt/lincity/games/lincity-ng -f -s -S 800x480
1.2  11.3 /usr/bin/pulseaudio --system --high-priority
5.0  2.3 /usr/bin/Xorg -logfile /tmp/Xorg.0.log -logverbose 1 -nolisten tcp -noreset -s 0 -core


HolgerN 2012-04-16 16:25

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:

export LC_ALL=en_US.UTF8

sulu 2012-04-16 20:14

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)
lstat64("/opt/lincity//share/games/lincity-ng/locale/de.po", {st_mode=S_IFREG|0644, st_size=35962, ...}) = 0
open("/opt/lincity//share/games/lincity-ng/locale/de.po", O_RDONLY) = 3


efion 2012-04-17 01:12

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? :)

Cow 2012-04-17 02:15

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...

AapoRantalainen 2012-04-17 11:51

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
Copy+paste results here.

dgls82 2012-04-17 12:41

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!

Cow 2012-04-17 13:50

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by dgls82 (Post 1193240)
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!

same problem here :(:(:(

sulu 2012-04-17 14:02

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
(I can't test right now.)

AapoRantalainen 2012-04-17 14:07

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
@dgls82,Cow:

Are you using version 2.0-2maemo4?

dgls82 2012-04-17 14:40

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by sulu (Post 1193260)
@dgls82,Cow:
Does this work for you?:
Code:

/opt/lincity/games/lincity-ng -S 800x480
(I can't test right now.)

Yes! it works.

@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...

Cow 2012-04-17 14:47

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by sulu (Post 1193260)
@dgls82,Cow:
Does this work for you?:
Code:

/opt/lincity/games/lincity-ng -S 800x480
(I can't test right now.)

it works for me as well ! thx ! :D

Cow 2012-04-17 15:12

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by dgls82 (Post 1193292)
Yes! it works.

@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...

im a n900 newbie... do u mind teaching me to upgrade it ? :(

MiK546 2012-04-17 15:56

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by Cow (Post 1193315)
im a n900 newbie... do u mind teaching me to upgrade it ? :(

Open application manager, press Update and then update (upgrade) the program to the latest version.

AapoRantalainen 2012-04-17 17:44

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by dgls82 (Post 1193292)
Upgraded! now the game works... still no music. There is sound, I can hear effect's sound but there isn't music...

I pushed new version for fixing this.
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.

Cow 2012-04-17 18:52

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by MiK546 (Post 1193344)
Open application manager, press Update and then update (upgrade) the program to the latest version.

Thx a lot ! :D it works now :D

dgls82 2012-04-17 19:51

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...

misiak 2012-04-17 23:17

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 ;)

szopin 2012-04-17 23:24

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.

javispedro 2012-04-18 00:06

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
It's not even guaranteed that you will get faster blitting using OpenGL ES.

misiak 2012-04-18 00:07

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by szopin (Post 1193569)
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.

Don't get me wrong, I know it's not trivial. I've spent 10 minutes to review his changes really quickly and noticed there are only ~10 files which need to be edited (including ones which require only #include<SDL_OpenGL.h> line removal), and I've done some OpenGL ES programming in the past (mainly 1.1, but also some 2.0 including custom far-from-standard shaders), so I may use my free time to code for Maemo again (I was inactive for almost an year now on this platform, I'm sorry, Guys). Aapo - great work, as szopin said :) I wrote this post simply to ask if you, Aapo, know about any blocks of code (apart from ones mentioned by you in link quoted by me previously) which may relay on getConfig()->useOpenGL check, because you know the code already.

Quote:

Originally Posted by javispedro (Post 1193580)
It's not even guaranteed that you will get faster blitting using OpenGL ES.

Do you think it's not worth trying? I hate not to use hardware acceleration when it's available and could be used, maybe it would be worth just to put less stress on the cpu and more on gpu? offtopic - could you update OpenTH thread with some information about new releases? The game reached next stage of development, so maybe you could announce it again and advertise more here on TMO?;) great work javispedro and great thanks - for all your work on entertainment software on Maemo platform! :)

edit 2 : Oh, forget the CorsixTH part - now I see there was some activity in that thread, I've just missed that.

sulu 2012-04-18 06:53

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

AapoRantalainen 2012-04-18 07:17

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by misiak (Post 1193568)
i have a question concerning http://developer.berlios.de/bugs/?fu...&group_id=2929 - have you tried using opengl es

These are only modifications for dropping openGL. I didn't even tried to use openGLES. Feel free to investigate with it. I have no idea would it be faster or more battery friendly (but I'm interested in results). I think upstream would be also want that merged.

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/

misiak 2012-04-18 07:58

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 ;)

AapoRantalainen 2012-04-18 08:21

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by misiak (Post 1193696)
@Aapo - thanks for your reply, one last question - did you publish your patches somewhere?

I just pushed them to the gitorious, opening post updated.

AapoRantalainen 2012-04-18 09:26

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by dgls82 (Post 1193469)
Bug report: when I start a new game choosing "start with empty board" or "start with random village" the game crashes...

I can reproduce this. I run it under debugger and strace and nothing. But now I tracked it.

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.

misiak 2012-04-18 21:00

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 ;)

szopin 2012-04-18 21:14

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by misiak (Post 1193582)
Don't get me wrong, I know it's not trivial. I've spent 10 minutes to review his changes really quickly and noticed there are only ~10 files which need to be edited (including ones which require only #include<SDL_OpenGL.h> line removal), and I've done some OpenGL ES programming in the past (mainly 1.1, but also some 2.0 including custom far-from-standard shaders), so I may use my free time to code for Maemo again (I was inactive for almost an year now on this platform, I'm sorry, Guys). Aapo - great work, as szopin said :) I wrote this post simply to ask if you, Aapo, know about any blocks of code (apart from ones mentioned by you in link quoted by me previously) which may relay on getConfig()->useOpenGL check, because you know the code already.


Do you think it's not worth trying? I hate not to use hardware acceleration when it's available and could be used, maybe it would be worth just to put less stress on the cpu and more on gpu? offtopic - could you update OpenTH thread with some information about new releases? The game reached next stage of development, so maybe you could announce it again and advertise more here on TMO?;) great work javispedro and great thanks - for all your work on entertainment software on Maemo platform! :)

edit 2 : Oh, forget the CorsixTH part - now I see there was some activity in that thread, I've just missed that.

Sorry, didn't want to sound prickish/dickish, just that many opengl->gles projects die out due to complexity, if you have the knowhow/experience in such porting... pls pls pls take a look at armagetron advanced (halfway (maybe 3/4ths?) there thanks to voodoo): https://code.launchpad.net/~aavoodoo

jperez2009 2012-04-18 23:24

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~

misiak 2012-04-19 00:03

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

misiak 2012-04-19 23:15

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:

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
for music not playing (strangely, sdk thinks that libsdl-mixer1.2-dev 1:1.2.6.5+0m5 is actually >= 1.2.6.5+0m5+ogg+mp3-2...). Please resolve this issue with deb file, so we can hear the music playing in background :) (maybe try using "=" instead of ">=" ? maybe not elegant solution, but worth a try...) in the meantime, i will start opengl es porting tomorrow, good night to all of you :)

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 ;)

misiak 2012-04-21 04:26

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 ;)

szopin 2012-04-21 06:20

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)

AapoRantalainen 2012-04-21 06:36

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.

misiak 2012-04-21 10:42

Re: [Announce] Lincity-ng (city building simulator) on extras-devel
 
Quote:

Originally Posted by szopin (Post 1195192)
Awesome work.

Thank you, but no really, in fact it was a peace of cake...
Quote:

Originally Posted by szopin (Post 1195192)
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.

I know, I'm aware of it since I bought my N900 in 2009 ;) There is however, in Extras testing, a version which supports more formats ( http://maemo.org/packages/package_in...5+0m5+ogg+mp3/ ), and it didn't uninstall any metapackages or anything on my phone with CSSU stable (someone reported it uninstalls maemo-fremantle-pr or however is this metapackage named) - is it just case of phones with Nokia's PR's?
Quote:

Originally Posted by szopin (Post 1195192)
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)

Sure, I'll take a look at it during this weekend, but I can't promise I'll make it work. If there is desktop OpenGL rendering engine, I will try to port it to OpenGL ES 1.1 (it's easier for me, I hate writing shaders, etc.)
Quote:

Originally Posted by szopin (Post 1195192)
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)

I know, for upstream the patch dould be better - if you are curious, you may take source code of ubuntu package and replace code in all /src/gui/PainterGL/* classes with my code from /src/gui/PainterGLES classes and it will work... So in fact a better and more proper patch would just update functions in src/gui/PainterGL/* classes and change just a few lines in "main.cpp" and "mk/configure" (and "mk/something", i'm sure i edited two or three files from "mk" directory). Anyway, the code with my patch should be compilable on Pandora AFTER replacing all SDL_gles related calls to their version of SDL_opengl ( SDL_gles library is Maemo-only library and there are few functions which would be not available anywhere else).

Quote:

Originally Posted by AapoRantalainen (Post 1195193)
@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.

You changed default rendering engine to SDL anyway? Ok, the OpenGL can be turned on by using "-g" command line option anyway - I hope you didn't change that ;)
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 10:40.

vBulletin® Version 3.8.8