supertuxkart / stk-code

The code base of supertuxkart
Other
4.49k stars 1.06k forks source link

On Android release, all levels are unlocked without completing any. #3109

Open rphsoftware opened 6 years ago

rphsoftware commented 6 years ago

Description

On the Android releases, all levels in story mode are unlocked before completing any, even after re-downloading the game and clearing cache/data.

Steps to reproduce

Download the game off the store, create a new local profile and enter story mode. All levels will be unlocked.

Configuration

STK release version:
Latest (Shows in game as 0.9.3)

STK Source (ppa, distribution package, official bin,...):
Google Play Store

System: Android 6.0.1

Device:
Xiaomi Redmi 3S

Graphics card:
Adreno 505

CPU: Snapdragon 430

deveee commented 6 years ago

It's intended that all levels are unlocked, because android package contains less tracks than desktop version and it wouldn't be possible to complete all challenges.

Indeed it would be nice to unlock challenges in more smart way. At least consider only tracks that are installed and require 100% points to unlock Fort Magma instead of hardcoded value.

rphsoftware commented 6 years ago

Ah, it is indeed true that some tracks are not there... Well, I guess a smarter way to handle that would be to edit the story mode on android appropriately, might make a Pull Request for it in the future...

Benau commented 6 years ago

you can have an unlocked fps when recording by edit config.xml limit_game_fps to false

beware running out of ram if you recording for a very long time with 1080p though (the recorder was designed for quick and short video)

Alayan-stk-2 commented 6 years ago

It would be possible to add in challenges files an "android-requirements" node, which would be used instead of the normal requirements node if compiled in android mode.

However, to determine how many points should be required, I'd need to know which tracks exist in the android version and which don't.

How are GPs managed while there are less tracks than normal, by the way ?

deveee commented 6 years ago

Tracks that are available on Android are hardcoded in https://github.com/supertuxkart/stk-code/blob/master/android/generate_assets.sh

export TRACKS="abyss battleisland cave cornfield_crossing endcutscene        \
               featunlocked fortmagma gplose gpwin hacienda icy_soccer_field \
               introcutscene introcutscene2 lighthouse mines olivermath      \
               overworld sandtrack scotland snowmountain snowtuxpeak         \
               soccer_field stadium tutorial zengarden"

But it may be different in next release. For example hacienda may be redone and it may be too slow on android. And also more library objects, music, textures etc. means that there is less space for tracks, because the apk must be <= 100MB.

If there will be very little space for tracks, in worst case it's possible to remove overworld/cutscenes and include more tracks in apk instead.

Ideally points requirements should depend on available tracks, because it's possible to add or remove tracks in data/tracks directory. For example we can release add-on pack for android that will contain more official tracks.

GPs show only available tracks. It works the same if you removed add-on track that was used in custom GP.

Alayan-stk-2 commented 6 years ago

The difficulty with making point requirements depend on available track is that it is additional complexity. For each challenge, you'd have to create a list of challenges supposed to come before (that is, every single challenges should list all the challenges supposed to come before it), do checks correctly on what exist, and compute a number of points based on the list.

For GPs, it may be worth it to condensate them in 3 GPs, to guarantee at least 4 tracks per GP. This would however require specific challenges and GP files.

deveee commented 6 years ago

Just an idea. Maybe declare difficulty level for each challenge? And unlock challenges depending on difficulty level instead of points? For example if you finished all challenges in level 4, then you unlock challenges in level 5. If there is no available tracks with level 5, then you unlock 6 etc...

And in this case we can unlock tracks/karts/supertux mode when eg. level 5/6/7 is finished instead of particular track.

Alayan-stk-2 commented 6 years ago

That would however force users of the normal version to do all the challenges in a "difficulty level" before being able to do those in the next one, which seems like an unnecessary restriction.

The way the points unlock of challenges work is also rather clear, it seems to be significant work to make this proposed system good enough.

The envisioned track add-on packs for the android version wouldn't necessarily add all the remaining official tracks at once, but maybe only a few or even one, if I understand correctly ?

deveee commented 6 years ago

Tbh. I don't care that much, because it's a root of problems :P Playing on touch device is a bit harder than using keyboard, so that all challenges would have to be adjusted. But... It's possible to connect a keyboard or gamepad to android device and in this case all challenges would be trivial.

And initially I was thinking about a package with 2-3 additional tracks, but full-data package is possible too. There is already an apk with candela city somewhere on the forum.

LoadingPleaseWait commented 5 years ago

Maybe we should just disable story mode for Android. It seems like it is not possible for users to get the same experience in Android story mode that they would get on desktop.

qwertychouskie commented 5 years ago

At this point, all track can be fit onto the APK, it's just a matter of whether it should be done or not, since many Android devices will struggle to run heavier tracks.

contrapunctus-1 commented 5 years ago

Re: APK sizes, I hope this helps - https://developer.android.com/google/play/expansion-files

qwertychouskie commented 5 years ago

The problem there is it looks like you have to link to the proprietary Google Play libraries, which would likely conflict with STK's GPL license. @deveee How much free space is currently in the APK? Can the new tracks fit? I'd love to have all the tracks, especially since 0.10 is more optimized than 0.9.3, so having heavier tracks should be fine.

Alayan-stk-2 commented 5 years ago

Maybe this could be used :

If you'd like to avoid using expansion files and your app's compressed download size is larger than 100 MB, you should instead upload your app using Android App Bundles which allows for up to a 150 MB compressed download size.

Benau commented 5 years ago

btw deve in the future if sam add all karts with "dirt" texture u may > 100MB apk size!

and do you want to keep bisecting mesa / just change uniform?

and can i assume all your commits are safe for 0.10?

CodingJellyfish commented 5 years ago

See #4025 Benau gave a way to use full assets so we can disable story mode and ask if users want to reinstall them to play story mode.

rphsoftware commented 5 years ago

I thought about an alternative approach: What if the game downloaded the assets at runtime and stored them in the data folder? (So you could have like a 20 MB download off the play store but then on first start you see a download progress bar)

Benau commented 5 years ago

deve doesn't like this idea.... (anyway now in beta you can install full tracks by using the "Install full game assets" button in options)

Alayan-stk-2 commented 4 years ago

Now that the android build will ship with all tracks, should we change the default ? @deveee

deveee commented 4 years ago

I would leave it as is because challenges are designed for a PC with keyboard/gamepad and not for small phone screen with touch device. Anyway benau decides.

Alayan-stk-2 commented 4 years ago

It's true that the difficulty of the challenge is designed for PC. Obviously, lower difficulty challenges being available limits the scope of the issue but it's not perfect.

If we had some actual data on how many % of people manage to get which trophy on different platforms (only counting people who attempted a challenge), it would be helpful.

Benau commented 4 years ago

maybe just leave it....

also apple won't like it!

"if something is locked then it must have a price"

economically correct!

so you need to use in app purchase for anything "locked" in game

and i think locking content is stupid anyway

7wells commented 4 years ago

If it matters, I agree that locking does not make sense - on any platform. AFAIK, everybody can unlock everything in config.xml. If people do not want to go through all necessary tracks to unlock further tracks, let them go straight anywhere - maybe with the exception of the last track in story mode, I assume (which one can also override in config.xml, though, right?). Unlocking of tracks to me looks very familiar for commercial games with in-app buys etc. Let STK be free! 😉 Oh, would it matter for online competitions/ tournaments? I don't think so.

Alayan-stk-2 commented 4 years ago

There is a point to unlocking tracks and karts. Content that is available from the start in the base game, and that can't be fast-unlocked through a purchase, is common in many games.

The upsides are :

If everything is available from the start and a newbie decides to start with XR591, he's more likely to have a poor experience than if first discovering the game through Nessie's Pond.