Chronosoft
Left Anchor
Right Anchor

iOS6 -D'oh!

Discussion about Rogue Touch for the iPhone and iPod Touch

Re: iOS6 -D'oh!

Postby AdFos » Thu Oct 11, 2012 11:46 am

One issue: The nymph nicked the first unworn/unused thing in my inventory ie my bow not the sleep potion I left at the bottom of the inventory ...
User avatar
AdFos
 
Posts: 7
Joined: Mon Apr 04, 2011 9:05 am

Re: iOS6 -D'oh!

Postby Nighthawk » Fri Oct 12, 2012 10:51 am

The fact that she nicks the last unequipped thing in your inventory is a bug; it's supposed to be a random unequipped item. So either it was fixed by version 1.6 or is now manifesting itself as her taking the first unequipped thing instead.
User avatar
Nighthawk
 
Posts: 161
Joined: Fri Mar 27, 2009 12:48 am
Location: Philadelphia, PA

Re: iOS6 -D'oh!

Postby CommanderData » Sat Oct 13, 2012 9:09 am

Nighthawk, you are correct! It was a long standing issue that I though was corrected earlier. Basically it should loop through and determine when to snatch something based on exceeding a random threshold. But if she is taking the first "unequipped" item now... Most likely the threshold is too low, or we're seeing a bad random seed that is causing it to pick lots of high values.

I'll take a peek at the code again. Been a LONG time since I looked at that last... actually it was in 2010 I believe, when V1.6 was released! :D
User avatar
CommanderData
Site Admin
 
Posts: 588
Joined: Sun Jan 25, 2009 3:17 pm

Re: iOS6 -D'oh!

Postby Nighthawk » Sat Oct 13, 2012 10:18 am

Okay, now I'll ask the non-iOS programmer question: If you're already stepping through the inventory, why not step through to count the number of unequipped inventory slots, get a random number between 1 and that number, then step through again and nick the chosen item?

Or, hell, just create one additional byte-sized game state variable that always keeps count of the number of unequipped inventory slots and add +/- code in the equip/un-equip section. (Guessing this one would probably break save games.)
User avatar
Nighthawk
 
Posts: 161
Joined: Fri Mar 27, 2009 12:48 am
Location: Philadelphia, PA

Re: iOS6 -D'oh!

Postby CommanderData » Sat Oct 13, 2012 11:06 am

Heh, cool question Nighthawk! Always good to think outside the box :D

I'll explain what happens now: The inventory is an Array-List of objects, so we have to iterate through, examining the properties of each object in order. Is it currently in use/equipped/worn? Is it the amulet? If the answer to either of these is yes, the item cannot be stolen.

Since we have to traverse the entire list either way, it seemed simplest to try to decide whether to steal as we examine the items. That's the main reason I did it the present way, lazy simplicity ;) This can create a balance problem if you have bugs or things weighted to far one way or the other. Either you steal an item too near the top... or in the original issue, you'd see the Nymph grab the last "steal-able" item from the inventory as a safety that ensured she got *something* from you.

Your suggested method is definitely possible: we could iterate the list, as we go through we create another list with the indexes of each "steal-able" item, then pick a random number from 0 to (oklist.size-1)... then steal that item! :ugeek:

Probably should just do that and eliminate the headaches :mrgreen:
User avatar
CommanderData
Site Admin
 
Posts: 588
Joined: Sun Jan 25, 2009 3:17 pm

Re: iOS6 -D'oh!

Postby Nighthawk » Mon Oct 15, 2012 7:29 pm

<Programming method assumptions :-)>

I'm not sure you'd even need the additional indices list, just an extra short int. I can't imagine that it takes much processing time to step through an entire full inventory, checking an equipped status flag and an item type id for the amulet, and count the number of non-equipped items that aren't the amulet. Doing it twice should be just as negligible. You've mentioned in the past that most of the code for the game itself is in C, so I'm guessing you're using a dynamically-allocated linked list of some kind for the inventory items (or, at least, that's how I'd do it!). (Or using iOS's database functions, but that also shouldn't take very long.)

</PMA>
User avatar
Nighthawk
 
Posts: 161
Joined: Fri Mar 27, 2009 12:48 am
Location: Philadelphia, PA

Re: iOS6 -D'oh!

Postby iCarbon » Fri Dec 28, 2012 1:07 pm

I think I've found a (minor) bug -- using an iPhone5 with the latest iOS update, I find that the program kicks me out in a specific situation: if I want to play again immediately after death, hitting 'new game' straight out of the graveyard scene boots me out of the game. It works fine if I just go back in, and it only happens after I die (ok, I haven't tested what happens after I win... I'm trying to, but winning isn't exactly a thing I can do on command), so it is t a big deal, but I wanted to let you know.

Thanks for keeping such a great game going -- I always fall back to it when my apps feel stale. I'm looking forward to the next big update!
iCarbon
 
Posts: 6
Joined: Fri Jul 10, 2009 4:07 pm

Re: iOS6 -D'oh!

Postby Nighthawk » Sat Dec 29, 2012 2:22 pm

CD,

Bug confirmed from a clean boot: Rogue Touch 1.62, iOS 6.0.1, on both iPhone 4S & iPad 2. Crash occurs after tapping to clear the Hall of Fame screen, no matter if a game was played or not (clearing after a game, or getting to the HoF screen from the title screen). Doing the same action multiple times results in the same crash occurring each time, no matter if the app is force quit after crash or home button out during play and re-enter the app. After re-entering from crash (without force quiting) the app appears to behave correctly (no other game glitches other than this one).

(edited to include confirmation for iPad 2)

Update: Also confirmed for iOS 6.1.

(edit: update)
User avatar
Nighthawk
 
Posts: 161
Joined: Fri Mar 27, 2009 12:48 am
Location: Philadelphia, PA

Re: iOS6 -D'oh!

Postby Nighthawk » Mon Sep 16, 2013 10:41 am

Crash bug fixed in v1.70
User avatar
Nighthawk
 
Posts: 161
Joined: Fri Mar 27, 2009 12:48 am
Location: Philadelphia, PA

Re: iOS6 -D'oh!

Postby CommanderData » Mon Sep 16, 2013 1:15 pm

Nighthawk wrote:Crash bug fixed in v1.70


Cool! Glad it's working as intended and returning to the title screen now. It was tough to simulate that, my devices did not exhibit the crash until I started with the iOS 7 beta testing recently...

What device are you running on these days? Updating to a new one this week?
User avatar
CommanderData
Site Admin
 
Posts: 588
Joined: Sun Jan 25, 2009 3:17 pm

PreviousNext

Return to Rogue Touch

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Left Anchor
Right Anchor