Page 2 of 2

Posted: Thu Oct 04, 2012 4:52 pm
by jph_wacheski
Thanks guys,. I fixed the typo and made an icon. looks nice ;)

I am trying to get highscore to save to the device, alas to no avail,.

Do I need to add some path info. to my filename?

Code: Select all

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<File Name="ScoreFile" FileName="score.save" Encoding="1">
  <OnRead>
    <FileMoveData Property="fileHigh Value"/>
  </OnRead>
  <OnWrite>
    <FileMoveData Property="high Value"/>
  </OnWrite>
</File>
I call Read in OnLoaded, and then do this in the OnStart of the game over AppState;

if (score>high) high=score; //update highscore

Code: Select all

ZZDC<?xml version="1.0" encoding="iso-8859-1" ?>
<Condition Expression="return high>fileHigh;">
  <OnTrue>
    <FileAction File="ScoreFile" Action="1"/>
  </OnTrue>
</Condition>
I was also thinking, it would be cool to be able to read some text from my website into the app, for things like "On sale till Friday; Only $0.50" or "New game available" etc. However I can not seem to get the WebOpen to read the file,. should that be working? or is just the in browser option working?? [ try http://iterationgames.com/news.txt ]

Posted: Thu Oct 04, 2012 7:44 pm
by VilleK
It looks like that would work. You don't forget to copy from filehigh to high on load? Try using trace() to write the value of high and fileHigh directly after read or write and then watch the Android log.

Got a good score when trying it today, it can be quite mesmerizing :)

The WebOpen component only supports browser open at the moment on Android.

Posted: Thu Oct 04, 2012 10:58 pm
by jph_wacheski
Thanks Ville,. indeed I had forgotten :oops:
Works great now. Ok then, no message from the web-base for now,. the built in link should be enough to get players to check the site for more games, and the link to the store could perhaps work to get interested players to buy it. I played some Saucer Invasion last night and think I will do an update to that one some time, have some ideas! and I have a bunch more stuff in various states of prototype to come later as well,.

Posted: Fri Oct 05, 2012 9:51 pm
by VilleK
I think I got the hang of it now, great game! It's got addictive qualities. Reached 128k :)
The new icon is pretty too.

Posted: Fri Oct 05, 2012 10:33 pm
by jph_wacheski
Cool,. thanks.

CastleNode is now in the play store! https://play.google.com/store/search?q= ... ode&c=apps

I tried using the same name so that buying the paid version would auto overwrite the demo however the OS sees the installed one, and then you only get the 'uninstall' or 'open' options,. so in the end I made two different versions, CastleNode (paid) and CastleNode 128K Edition (free). The main thing is that now the free version points to the payed version from the 'Get Full' or 'Upgrade' buttons. So this works the way it should, using just the WebOpen and the google store link.

I need to do a bit more work cleaning up the media,. better video, text,. etc. but happy to have it set up. I'll let you know if we make any monies ;)