Jump to content

  • Log In with Google      Sign In   
  • Create Account

Olof Hedman

Member Since 24 Aug 2011
Online Last Active Today, 05:52 AM

Topics I've Started

"Load more topics" doesn't work

18 February 2016 - 09:11 AM

Instead of loading more topics, it seems to load the same topics again.

 

Happens for me on all forums. No idea if it ever worked, I think it was the first time I pressed it :)

 

I'm using Chrome Version 48.0.2564.109 (64-bit) on OSX 10.11.3 if that is relevant.


Fun with Android NDK

22 September 2015 - 08:35 AM

Again, I'm tasked with getting our games to run on android.

 

Much fun, the NDK is an endless source of weird and wonderful bugs.

Somehow I missed this one, the last time I ported stuff to android, but it is now my "favorite":

https://code.google.com/p/android/issues/detail?id=16391

 

in system/core/run-as/package.c:

/* This should be large enough to hold the content of the package database file */
#define PACKAGES_LIST_BUFFER_SIZE 8192

 

Who in their right mind thinks that is a good idea?!

 

A quick check on a few of my devices does not show a single one with a packages.list file less then 8kb. (my Samsung S6 is about 17kb, and its brand new)

The smallest I've found is about 9kb.

 

This means if your app happens to be after those 8kb, on any of the affected devices, its impossible to ndk-debug it.

 

Fan-tas-tic!

 

Oh. And in some versions, they messed up the rights for packages.list and/or run-as so it is again impossible to ndk-debug until you root your device and fix it.

 

In 5.0, or possibly 5.1, there seems to be a new run-as bug on samsung devices, since again, its impossible to ndk-debug.

 

You think upgrading tools might be a good idea? Think again, on r10e (the latest), the ndk-gdb script is broken, so running it is useless until you patch it.

And in any case, if you try build with v21+, it will not run on any device with android version less then 5.0, because they moved location of cstdlib...

 

I so love to have to debug my tool chain, and can't wait for what weird and wonderful bugs they can come up with for the next release.

 

Sorry, just had to vent a bit smile.png

(And if I post some posts with a bad attitude on any of the other subforums, you now know why... I'll try to avoid it)


Join the adventure and find the Treasures of Nono Islands! (iOS game)

09 July 2015 - 01:06 PM

Just wanted you to know we have released another game for iOS!

Hopefully you will like it, and find the business model fair! (free to play, no ads, with purchasable check points)

Like most our games, it is casual but a bit on the hard side, I dare you to try to 100% it for free! (it is possible)

Then unlock all checkpoints for a measly 3 bucks and set some world record times replaying the levels!

 

It is kind of an action puzzle in a hexagonal world (not entirely sure how to classify it actually, you tell me! biggrin.png)

Yours truly is responsible for implementing the game play, and the UI framework we are using.

(It's platform independent, so if the game is well received, an Android version is not far away!)

 

Currently Editors Choice on the App Store!

 

 

Join the expedition to the Nono Islands on a quest for long lost treasures. But be aware, the islands are far from uninhabited! The treasures are heavily guarded by the Nonos and their army - the spiders, the sharks, the jumping skulls and many others. And if you in some way manage to get past them, the hidden traps will get you for sure. Good luck avoiding the spikes, flying darts, sawblades and boulders. Good luck, that's all we can say. Good. Luck.

 
Get it for free on the App Store: https://itunes.apple.com/app/id988752315?mt=8

C++ Ternary operator ?: surprising conversion rules.

22 April 2015 - 08:30 AM

I thought I knew how the ?: operator worked, but today someone surprised me by telling me this code does not compile:

class A {
};
 
class B : public A {
};
 
class C : public A {
};
 
A* example1(bool condition) {
  return condition?new B():new C();
}

LLVM says "Incompatible operand types (B* and C*)"

 

 

 

Doing this works fine:

A* example2(bool condition) {
  return condition?new A():new C();
}

Searching a bit tells me that the second operand must be convertible into the third, or vice versa, which B and C obviously isn't.

 

But what is the logic behind this?

Why is it not "enough" that they can be converted to a common base type?

Why do they need to be converted into each other anyhow, isn't it enough to convert the result, if needed?

 

I'm sure all this has a very logical explanation, anyone who wants to enlighten me? smile.png


Nice fast XML parsers with validation?

27 January 2015 - 10:16 AM

I have this little cross platform UI framework I'm working on. 

It uses XML as layout definitions.

 

Currently, I'm using TinyXML since that is what we have always used, it's simple and fast, and I didn't need any advanced XML features.

Getting to it's limits now though, so I'm looking for nice alternatives, hoping the community can give some tips! smile.png

 

Must have features:

- C or C++ API (prefer fairly modern C++)

- Schema validation through DTD or XSD (anyone has anything to say about which of the two to prefer?)

- Good error handling, so I can output nice and readable error messages when people mess up their XML

- License to use for commercial closed source projects

 

Preferable:

- Cross platform/Easy to port

- Fast

- DOM

 

Wild wish:

- parsing/compiling binary XML (for speed and space savings)

 

 

If its easy to port and fast, I might be able to use it for parsing the XML on device (iOS, Android, WhateverOS), if not, it could be ok if I just run it in a tool on the desktop dev computer.

 

 

A quick search have turned up two alternatives:

Xerces-C++  (Seems dead though? last update on homepage is 2010...)

libxml2  (from Gnome)

 

 

Anyone who has any tips for other alternatives, or something to say about either of the  two above?


PARTNERS