problems with my game running on simulator perfectly, but not device

hello everyone, I’ve been developing a game that utilizes director as well as spritegrabber. I seem to have solved how to insert my sprites into the localGroup, as it works on the device and simulator just fine. the problem i’m having lies in two functions i’m using in my game that changes a display objects graphic depending on a varible I have set. the code works like this example.

–first i have a variable to represent bullets for my weapon.

local ammo = 9

–then we have a function thats updates the graphics for the bullets —being shown on screen.

local function ammocount()

if ammo == 0 then

bulletpic = display.newImage(“bullet0.png”)

elseif ammo == 1 then

bulletpic = display.newImage(“bullet01.png”)

end

end

Runtime:addEventListener(“enterFrame”, ammocount)


I have another function like this as well for updating my players healthbar.

if I dont try to insert the display objects for these functions into
the localGroup. it runs fine in the simulator and displays the graphics properly. when i build it for my android device, the graphics for my bullets and healthbar do not show up at all and no errors are displayed. if I try to insert the display objects for these graphics into the localGroup it runs fine on the simulator still, but returns a director error on the android device that so many others have posted about regarding params. *note that the example was just a quick explanation and not the full code for all nine graphics.* so, I guess the question would be… how do i go about getting these graphics into my localGroup and onto my devices screen properly. I’ve been working at this for days and it’s the only thing that is stopping my game from making it to my device.
any help is greatly appreciated.

thank you kindly,

Joey king

Crayotic Games

[import]uid: 97844 topic_id: 21368 reply_id: 321368[/import]

Just out of interest have you also put your background into the local group? The first thing I’d think of is that the background is showing up in front of these images on the device.

Let me know and I will try to check back in, although this is the director forum and not really our territory :wink:

Peach [import]uid: 52491 topic_id: 21368 reply_id: 84598[/import]

hi peach, thanks for your speedy reply. I’ve got the background added to the localGroup first, before any of the other images. thats a definite. I’m reading through your other comment now and about to try out your suggestion. i’ll check back in just a bit and let you know if I had any luck.

thanks,

Joey King

Crayotic Games [import]uid: 97844 topic_id: 21368 reply_id: 84635[/import]

hey, I replied back to your posts and tried your suggestion. it’s still giving me the failed to execute params error on my evo 4g.

I’ve considered just making my healthbar and bullet graphics into spritesheets to use with spritegrabber. however, it’s been difficult to try and get the animations working properly when it only has one frame per animation. I did a test with just the ammo and I made a button that will reduce my ammo counter by one every time you touch it. the only animation that worked was the very last one. [import]uid: 97844 topic_id: 21368 reply_id: 84663[/import]

Hey,

Apologies - we have a time difference and it makes it tricky with back-and-forth sometimes.

I have seen the params issue before but not only on device; because this is director specific I can’t really advise further although my one possible suggestion is trying reverting to director 1.2. (I have seen others using this in this sort of situation.)

Else, hopefully Ricardo (creator of director) or another user may have some more insight.

Peach :slight_smile: [import]uid: 52491 topic_id: 21368 reply_id: 84730[/import]

hey, it’s okay. no worries. I am very thankful to have gotten the support. i’ll try my luck with 1.2 and see if ricardo has any suggestions. thank you so much for you time. do stay in touch. i’ll keep an eye out for updates on your work. i’ll be more than happy to provide you some backlinks on my website as soon as i get it up and going. :slight_smile: [import]uid: 97844 topic_id: 21368 reply_id: 84864[/import]

Thanks Joey - I’m sure we will encounter each other regularly, after all I do tend to spend an inordinate amount of time here :wink:

Please do let me know how you get on with this, would very much like to hear it has been resolved.

Peach :slight_smile: [import]uid: 52491 topic_id: 21368 reply_id: 84888[/import]

Just to add, I have an app which works perfectly in the Simulator but Director throws a wobbly on my iPhone 4S. I do wonder if it’s a director thing and not the app now… hmm. [import]uid: 10389 topic_id: 21368 reply_id: 85175[/import]

man, i’ve tried about everything. i’ve reverted back to 1.2 even. with 1.2 I get no errors on the simulator or device, but the graphics I’m needing still are not showing up. it’s has to be a director thing. have you or anyone else had any luck with the new storyboard api? [import]uid: 97844 topic_id: 21368 reply_id: 85248[/import]

Yeah I tried 1.2 but that just stopped my buttons from being clickable.
I tried to make an app with Storyboard but apparently it’s rather buggy so I’m not going to use it. [import]uid: 10389 topic_id: 21368 reply_id: 85355[/import]

Storyboard has improved a LOT, although that is in daily builds which currently Joey can’t use as he isn’t a subscriber.

Jason - if you arrange another meetup soon I might be able to assist you there, haha. [import]uid: 52491 topic_id: 21368 reply_id: 85449[/import]

FINE! :stuck_out_tongue:
We should give a couple weeks notice. [import]uid: 10389 topic_id: 21368 reply_id: 85686[/import]

You’re the ambassador :wink: [import]uid: 52491 topic_id: 21368 reply_id: 85746[/import]