Pages: 1 ... 6 7 [8] 9 10 11
  Print  
Author Topic: Android port  (Read 343025 times)
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #175 on: June 08, 2016, 07:51:45 AM »

Let me understand first... which ones of these examples would work?

+set cvar1 text1

+set
cvar1
text1

+set cvar1
cvar1a text1b

+set cvar1 text1 +set cvar2 text2

+set cvar1
text1a text1b text1c
+set cvar2
text2a text2b

+set cvar1
Text1a text1b
+set
cvar2
text2a text2b

+set cvar1
text1a text1b text1c
+set cvar2 text2

+set cvar1
text1a text1b text1c
+set cvar2 text2 +set cvar3 text3

Isn't it possible to add in the page a button which would open a window with extended help text, to include a couple of examples?
« Last Edit: June 08, 2016, 08:01:34 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #176 on: June 08, 2016, 08:10:50 AM »

I'm happy to tell you that none of your examples would work  Grin

The text in the dialog:
Code:
openarena
+set
cvar1 text1
+set
cvar2 text2 more text

will be translated into following command line:

'openarena' '+set' 'cvar1 text1' '+set' 'cvar2 text2 more text'

I'm not happy about the idea of another button opening a separate help dialog. Please propose something that will require less than 30 minutes of coding. Like a help text in a dialog title Smiley
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #177 on: June 08, 2016, 08:16:15 AM »

I'm happy to tell you that none of your examples would work  Grin

Because of the lack of the $0 parameter? It seems useless, cannot you add it automatically? Which examples would work then?
« Last Edit: June 08, 2016, 08:22:45 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #178 on: June 08, 2016, 08:21:36 AM »

No, because all your examples except one contain '+set cvar1' on a single line. Try running this in your PC:

openarena '+set cvar1' text1

Everything on one line gets enclosed in quotes. What you want to do is openarena +set 'cvar1 text1', so you put 'cvar1 text1' on one line, and all other parameters on separate lines
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #179 on: June 08, 2016, 08:24:39 AM »

A message like "Use new lines instead of spaces. Use spaces only for multi-word values."?

Ehm... you mentioned "with spaces for the first line of input", so I did the examples that way.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #180 on: June 08, 2016, 08:29:12 AM »

And your single-line example would work for some different command, like

openarena +map wrackdm17

But you put "+set cvar text" there, and 'cvar text' must be a single argument with spaces, so it must be on a separate line.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #181 on: June 08, 2016, 08:30:34 AM »

What you want to do is openarena +set 'cvar1 text1'
I should test on pc. At memory, I would say +set cvar1 "text1" instead.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 62
Posts: 1664


Open Arena Developer


WWW
« Reply #182 on: June 08, 2016, 08:30:53 AM »

@pelya
You should remove argument 0 as Gig suggested. It should not be possible for the user to set it directly.

A short description test could be: "One argument per line". Much shorter than "Use new lines instead of spaces. Use spaces only for multi-word values.". For people understand argument parsing it is not that hard to understand.

Give one short example like:

Code:
+set
nick
This is my name
+map
dm4ish
Logged

There are nothing offending in my posts.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #183 on: June 08, 2016, 08:41:01 AM »

Okay okay, I'll remove argument $0.

Yes Sago, you are correct, I've just checked on PC, and +set command accepts two separate arguments, and that one-line Gig's example will work okay.

I enjoyed this discussion. Please post here more commands, and I'll reply with explanations why they will not work Cheesy
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #184 on: June 08, 2016, 09:48:33 AM »

@pelya
You should remove argument 0 as Gig suggested. It should not be possible for the user to set it directly.

A short description test could be: "One argument per line". Much shorter than "Use new lines instead of spaces. Use spaces only for multi-word values.". For people understand argument parsing it is not that hard to understand.

Give one short example like:

Code:
+set
nick
This is my name
+map
dm4ish

"nick"? I guess you mean "name", right?

Not sure about "argument" concept being so clear by its own, however the example explains it well.

PS: Also "do not specify quotes" or similar should be part of the instructions, maybe?
« Last Edit: June 08, 2016, 12:44:01 PM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
sago007
Posts a lot
*

Cakes 62
Posts: 1664


Open Arena Developer


WWW
« Reply #185 on: June 08, 2016, 10:19:41 AM »

"nick? I guess you mean "name", right?
Yes, it should be name.

Argument to commands are a bit surprising at times. Rather do something simple like the list of arguments than trying to implement a command line parser. A command line parser would most likely lead to surprises for someone.

If there was an UI widget that emphasized that it is a list and not a free text field it would be great but that is wishful thinking.
Logged

There are nothing offending in my posts.
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #186 on: June 08, 2016, 12:27:39 PM »

I don't know what's the reason Pelya cannot simply pass the command line parameters string "as is", including quotes and everything, as a single line, to write it exactly like on pc. I suppose there is some reason.

Having a GUI to enter any possible thing (latest Sago's post), instead... would be extremely complicated.
« Last Edit: June 08, 2016, 12:45:05 PM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #187 on: June 08, 2016, 12:33:04 PM »

The reason is that I am not launching OpenArena executable through the shell. The app itself is the executable.
So I've got the string with your quotes and everything, and I must pass it to OpenArena main() functions as
int argc, char *argv[]
How do you fill that argv array? Well, parse it.
Now that you've told me, I could do something atrocious, like invoking an actual shell, with a shell script that will simply write out all arguments, one per line.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #188 on: June 09, 2016, 06:33:26 AM »

Talking about something different:

1) It happened that accessing "multiplayer" screen made the game froze. Forcedly cosing it and opening again made it froze again when going to multiplayer. Then I cleared the app "cache" and it started working again. I don't know what happened.

2) While using 3G, it looks like the PING times shown by server browser are much more variable and higher than what's shown while actually playing in the server. I cannot tell if that was something it always did or is something new.

3) Server browser says "7 of 7 Arena servers" on "Internet" (while "3 of 3 Arena servers" on "Internet (2)"). I have "Game type: All", "Show full: on", "Show empty: off", "Only humans: off" and "Hide private: off". But it actually shows only three servers (the usual ones)... where are the others? Sometimes it says "5 of 5" and shows 2 servers. Any idea? Maybe there are some servers which are published to master server but are not actually reachable?

4) I tried starting a (non-dedicated) server from the phone. The only "server type" it allows me to choose is "LAN only" (which is shown red), in both cases of Wifi and 3G connection.

5) I still don't have cardborard or gamepad, but just to try, I enabled your VR mode again. I noticed that map loading screen writes the first two lines of text big and centered, instead of doubled in both "screens". Also, framerate indicator appears in right "screen" only.
« Last Edit: June 09, 2016, 07:31:16 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #189 on: June 09, 2016, 08:06:51 AM »

No idea about freezing, I will need to catch this bug on my side.

3G network will give you very high ping when pinging new IP address, then if you continue to send packets, the ping will become lower. This is lamentable but expected.

The game now uses masterserver for it's own shady stuff, namely to determine the NAT type you have, so there will be some 'ghost' servers you cannot ping. I would use my own masterserver for this, but I have only one public IP address, and you need two for that thing.

And it looks like you have 'bad' kind of NAT, if the game won't allow you change server type. 'Bad' NAT is called symmetric NAT, it's usually found on corporate networks or on very crowded internet providers. All other types of NAT are 'good', meaning that you can connect two hosts behind 'good' NATs, but you cannot connect 'good' and 'bad' NAT, or two 'bad' NATs - you can only connect 'bad' NATs to servers with public IP, such as those three dedicated servers we have. 'Good' NATs are the restricted cone NAT, the port restricted cone NAT, and the full-cone NAT - the best one, it's essentially like having a public IP.

You can also start public server if you have IPv6 address. IPv6 addresses are always public, which means there are no NATs and you can host whatever server you want on any IP. Some people set up NAT anyway on IPv6, but it's more for security reasons. You cannot connect IPv6 with IPv4 directly.

On my 3G connection, my network operator allocates a public IPv4 address with no NAT at all, but no IPv6 address. I know that Verizon in US gives you IPv6 address by default, I don't know about AT&T.

You can install an app called STUN client, it will tell you which NAT type do you have. this one works okay. Don't select stunserver.org server inside the app, it does not work anymore. stun.ekiga.net works for me. Try it on both 3G and WiFi connections (and also in local mcDonalds if possible, they have free WiFi).
If you will find any connection which is not symmetric NAT, OpenArena should allow you to start an online server.

If you are going to test it extensively, please tell me when, so I can join.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #190 on: June 09, 2016, 08:58:08 AM »

You can install an app called STUN client, it will tell you which NAT type do you have. this one works okay. Don't select stunserver.org server inside the app, it does not work anymore. stun.ekiga.net works for me. Try it on both 3G and WiFi connections (and also in local mcDonalds if possible, they have free WiFi).
If you will find any connection which is not symmetric NAT, OpenArena should allow you to start an online server.
With my work Wifi it says "Symmetric Cone NAT". I will test with my home Wifi in the next days (I haven't tried acting as Android OA Multiplayer Host there yet).
With my 3G connection it says "Symmetric Cone NAT", too.
« Last Edit: June 09, 2016, 10:12:23 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #191 on: June 09, 2016, 09:06:07 AM »

Yup, that's the type of NAT you install to prevent your employees playing videogames and downloading torrents.
I don't know why your 3G operator is that restrictive. Probably they got an expensive unlimited plan, which also gives you a new shiny public IP.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #192 on: June 10, 2016, 08:24:08 AM »

Also at home I have Symmetric cone NAT. I suppose it's how NATs are most commonly set up, isn't it? In theory, I could setup static port forwarding on my router as I would do to host a classic Internet OA server on PC...

Just for curiosity: what's your opinion about UPnP?

However, I finally found another human player on one of your Android servers and did a couple of matches. Smiley
Playing, I noticed a few times that something strange happened to the view: I was no able to look more down than a certain point... I had to tilt forward and look completely down with the virtual stick to be able to see at human height, otherwise it looked about 45 degrees higher than normal and I was not able to look at the ground. After some time, it apparently fixed by itself... then happened again, and "fixed by itself" after a minute. I was playing in firstperson mode, with gyroscope aiming enabled.
« Last Edit: June 10, 2016, 09:28:35 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #193 on: June 10, 2016, 08:48:11 AM »

My router does not support UPnP, so I have no opinion on it. If your router supports UPnP, I can add the support to OpenArena. There's another Android app you can use to scan your netwirk for UPnP hists.
I don't know how NAT are commonly set up, in my office we have a port restricted NAT, and I could not find any statistics on it.

I will look into that new aiming bug.

Edit: I already reproduced it, it happens after the first respawn, and disappears if you look up. Oh well.
« Last Edit: June 10, 2016, 08:55:26 AM by pelya » Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #194 on: June 10, 2016, 09:25:46 AM »

It looks like my router supports upnp. It has general options to enable it and to set its port, plus "answer to client request" and "interface is upnp controlled" checkboxes for every interface. I think I never tried it.

Now that I think about that, maybe I never asked Sago to add UPnP support to PC OA due to I thought that making internet servers is something that should be done only by who knows what he's doing, because of in OA a badly configured server (just a pk3 file in the wrong folder) can mess up local installations of any player connecting to it with autodownload active....
« Last Edit: June 10, 2016, 09:31:05 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #195 on: June 10, 2016, 09:45:45 AM »

Actually no, it will not mess up your installation. If you connect to my dedicated servers without updating OA, they will push their own pak7-android.pk3, so it may crash the game, but it will be reverted to your original one if you close and restart the game.

I guess that's a feature of an updated ioq3 engine I'm using in Android port.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #196 on: June 10, 2016, 10:18:05 AM »

Pk3 overwritten and then automatically reverted to original at next start? That sounds new to me. Maybe Sago or Fromhell do know something about that stuff?

I don't know really how do PC quake3/openarena manage the case of autodownloading modified files with the same name of existing files (maybe I saw the game adding some suffix to filename? I don't remember)...

However the typical case of "messing" servers are pk3 with different names than standard ones (e.g. pak9.pk3, zztest.pk3) in baseoa folder which are loaded after the standard ones and do include weird stuff such as a qvm thought for a mod. Such messy pk3 files, after have been autodownloaded by the client, are permanently stored in homepath... while not showing problems playing on other servers due to being ignored by "sv_pure", they do cause strange behaviours when playing locally.
« Last Edit: June 10, 2016, 10:20:15 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #197 on: June 10, 2016, 10:58:42 AM »

It saves the file with prefix consisting of it's MD5 sum, I think. It does not save it to baseoa directly, but into your $HOME/.openarena/ directory.

I'm not sure about pak9.pk3, I should test it.

Edit2: I've fixed that aiming bug and published another update

Edit3: I've checked by creating baseoa/pak9.pk3 on a local server, and this file does stay inside $HOME/.openarena/baseoa and is loaded when you close and relaunch the game, so the problem is there.

Edit4: The behavior when OA reverts to it's original pak7-andorid.pk3 is my own code  Embarrassed  it's literally this during the start: remove(".openarena/baseoa/pak7-android.pk3");
So I can simply remove every .pk3 file from .openarena/baseoa when the game starts. And you can put your maps directly to baseoa, they will be disabled when connecting to a pure server anyway.
I've fixed that bug already, it will be in the next update.
« Last Edit: June 10, 2016, 02:30:30 PM by pelya » Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #198 on: June 13, 2016, 08:16:32 AM »

The new version of command-line parameters seems to work, however it looks like it adds an extra blank line at the beginning each time you enter the option.

Do you mean that in the next update you will clear pk3s from homepath at every app launch, while will remain untouched in basepath, right?

About basepath and which is homepath in Android version.... If I query "fs_homepath" cvar, it reports /storage/extSdCard/Android/data/ws.openarena.sdl/files/.openarena... but if I query "fs_basepath" cvar, it reports "."... Uhm... I guess it is my "/storage/extSdCard/Android/data/ws.openarena.sdl/files/" (due to stock .pk3 files being in "/storage/extSdCard/Android/data/ws.openarena.sdl/files/baseoa"  punched), but why does the cvar do not report such path?

PS: Just in case (however I see you already did the pak9 test).... Some readings about basepath/homepath in PC version of OpenArena and troubleshooting problems related to autodownloaded files...
* (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/FAQ#Configuration_files_and_automatic_downloaded_files_path
** (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/FAQ#Where_are_the_configuration_files_saved.3F
** (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/FAQ#Where_are_autodownloaded_files_saved.3F
** (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/FAQ#Can_I_change_the_directory_to_where_configuration_and_autodownloaded_files_are_saved.3F
* (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/FAQ#Yesterday_everything_worked_correctly.2C_but_today_I_experience_strange_problems
* (DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Manual/Automatic_downloading

PPS: Also, I don't remember... if I pull down the console with "/~", is there a way to confirm commands typed there?

PPPS: The drawback of clearing automatic downloads would be having to re-download extra stuff each time one would connect to the server using it. Or manually moving such stuff from one's homepath to basepath, something which probably not many Android OA users would think about. I don't know which would be the best solution, if allowing people to mess up their install, or delete autodownload files automatically. Maybe adding an option in external SDL menu, to delete extra pk3s only at user's request, to be used just in case something got wrong with autodownloads?
« Last Edit: June 13, 2016, 08:42:49 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
pelya
Member


Cakes 6
Posts: 399


WWW
« Reply #199 on: June 13, 2016, 09:04:50 AM »

Yes, I'll clear eberything from homepath baseoa directory. So if you want to host your own map, creade a 'mod' directory for it, 'Gig-map-collection' will work fine, and will not be deleted from homepath on each launch after downloading.

baseoa will be erased on each start, so users won't have to open file manager or search for some obscure SDL option to fix their OA installation. Always assume that the user is capricious idiotdoes not care about technicall details, and wants the game to just work.

The directory '.' is indeed .../Android/data/ws.openarena.sdl/files, it's the current directory when OA launches. Homepath directory is <basepath>/.openarena

I'll be adding primitive UPnP support to the next version, I discovered how to enable UPnP on my router, so I can test it, and there are chances it might work on your setup.

To execute commands in console, you just press Enter on your keyboard, or press Next button in the text input field.
When inside the game, you have to prepend / to the command, but you don't have to do that in main menu.
« Last Edit: June 13, 2016, 09:08:49 AM by pelya » Logged
Pages: 1 ... 6 7 [8] 9 10 11
  Print  
 
Jump to: