Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
UraniumAnchor
May 21, 2006

Not a walrus.
I was trying to find information on if using Lua is feasible in an iOS app but it seems that Apple has rules against using scripting languages (presumably security reasons), but I was talking to somebody who actually does iOS development and he says he knows people who use Lua for initialization but not actual app logic. Does anybody have direct experience with using or trying to use Lua or similar in an iOS app? Speed would be a concern as I would use it for game entity logic.

Adbot
ADBOT LOVES YOU

UraniumAnchor
May 21, 2006

Not a walrus.

skidooer posted:

Wax will allow you to write your entire app in Lua, so it is definitely feasible.

Scripting is fine as long as the script is bundled with the app. It's scripts that are downloaded later, after the app is installed, that Apple has issues with.

Yeah the guy I was talking to said he was under the impression it was too slow for game logic on an iOS device, but if Angry Birds uses it extensively then maybe he misheard. Or maybe the person he talked to was just a bad programmer. :v:

So how would this work with DLC addons that include scripts? I assume I could get the addon approved by Apple and this wouldn't be an issue.

UraniumAnchor
May 21, 2006

Not a walrus.
Yeah, I've used Lua pretty extensively already in a C++-based engine I've been working on for the last couple of years off and on, so I was surprised to hear that it would potentially be slow on an iOS device. That didn't make much sense to me. Good to hear I'm not alone in thinking that sounds wrong.

I suppose I'll have to try writing some high level logic in C++/Lua and see if the performance difference is anything other than statistical noise.

UraniumAnchor
May 21, 2006

Not a walrus.
These are almost more OpenGL thread questions but it's only occuring on iOS, so I figured I'd ask here too.

Firstly, I have some skeletal vertex shader code that is flickering the triangles whenever something moves. It looks as if the culling is suddenly backwards, but I have culling turned off and it's still occurring. The vertex data is contained in static VBOs that are specified once and never change, so I really doubt it's a matter of the vertex data itself getting overwritten, either. The triangles attached to bones that don't move in a given frame don't have this problem, and I'm reasonably sure the only thing changing frame to frame is the bone matrices and the overall clip matrix (and sometimes not even that, if I just leave a given object sitting in one spot, unmoving but animating). I doubt it's the shader, either, because I got identical (so far as I could tell, anyway) results when I switched the shader off and used CPU-side bone calculations instead.

The part that has me most confused is that this is ONLY occurring so far on iOS 7.x devices (tested an iPad 2, iPad 3, and iPod Touch 5). The same code displays correctly on Android, OSX, Windows, iOS 5.x (I don't have any iOS 6 or 8 devices to test so I don't know on that either way), and the iOS simulator.

Secondly, the same overall code base, on iOS 5, is stalling out pretty badly. According to the Instruments tool it's losing a lot of time in glInvalidateFramebuffer (about 6ms per frame), which is a function I'm not even calling directly, so I figure it must be part of the frame blit, and maybe it just thinks the function is stalling because that's where it's actually doing all of the command flushes. No other per-frame operations are taking any significant length of time, everything else in the top 10 in terms of "average time consumed" is one-off things like texture loads. This is happening on an iPad 3 with 5.5.1, and NOT an iPad 3 with 7.x, so I almost want to think it's an OS/Driver problem. But that doesn't really help me fix the issue since I don't really want to require people to update past 5 just to fix a weird performance problem that shouldn't even be occurring.

Anybody have any ideas on how to solve/investigate either one of these problems?

UraniumAnchor fucked around with this message at 06:23 on Aug 20, 2014

UraniumAnchor
May 21, 2006

Not a walrus.
Is there a way to retrieve standard iconography? Specifically I want to grab the texture for the "share" button and load it into an OpenGL texture. Or am I better off just taking a screenshot and faking it?

UraniumAnchor
May 21, 2006

Not a walrus.
e: Never mind, found something on CocoaPods.

Does anybody know of it's possible to get the latest AdMob SDK to not crash apps on iOS5 devices? I'm trying to maintain compatibility with old devices because the apps in question are kinda old themselves.

I can get the apps to link and run but they crash shortly after startup with a "objc_msgSend" related error which seems to be because the of deployment target incompatibilities.

Alternately, does anybody know where I can get version 6.12.2 of the SDK, which is the last one that had iOS5 compatibility? I don't see a way to download it off the official site and googling didn't turn up anything either.

UraniumAnchor fucked around with this message at 10:06 on Apr 7, 2015

UraniumAnchor
May 21, 2006

Not a walrus.

Doc Block posted:

AdMob dropped support for anything earlier than either iOS 6 or 7. They don't guarantee iOS 8 compatibility on anything but the most recent versions of their SDK.

iOS 5 is used by less than 1% of users. Is supporting it is worth the hassle?

The number of people still using these apps on an iPad 1 (which can run 5.1.1 and no higher) within the last month is about 5%, so I'd prefer not to leave them out in the cold.

These are old apps that still sell a small amount so I'm trying to make them more attractive to users of new devices without breaking them for older ones.

Adbot
ADBOT LOVES YOU

UraniumAnchor
May 21, 2006

Not a walrus.
Discovered something fun tonight. As part of a project I have, there's a script that dumps about 8500 lines worth of physics setup code (because I can't be arsed to write a proper parser for the data file). This is C++.

Up until Xcode 6.x (iOS8.x) this was fine.

While trying to fix some iOS9 issues, trying to call this function when compiled for a 64-bit device would result in a crash that the debugger said was occurring on the opening brace line, which made no sense whatsoever. I even put a logging line as the first line of the function and it died before hitting it, but not before trying to call the function.

Moving the function, renaming the function, changing the function into an instance method instead of a free function, none of it helped. Function works in 32-bit mode, so at first I think there's some pointer somewhere that's getting corrupted.

Commenting out the #include? Game starts and runs (but you fall through everything for obvious reasons).

I think I must have hit some upper limit on how big a function can be, because I ended up splitting in into two functions and now it works fine again. This wasn't a problem previously, so I'm going to guess it's some weird new bug in clang.

Wasted so many hours trying to figure out why this was broken. Gah.

UraniumAnchor fucked around with this message at 07:35 on Nov 25, 2015

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply