Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!

Olof Hedman

Member Since 24 Aug 2011
Online Last Active Today, 12:21 PM

Topics I've Started

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



- Cross platform/Easy to port

- Fast



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?

Touchgrind Skate 2 - Realistic skateboarding on your iOS device (iPod, iPad & iPhone)

21 November 2013 - 07:21 AM

Just wanted to let you all know that we are releasing our new game today!


5 years ago we released Touchgrind, the first multitouch skateboarding title, which was very well received.

It was more of a virtual toy then a game though.


2,5 years ago we followed up with Touchgrind BMX, where we took similar controls and let you do big jumps with your bike.

It's also more of a game, with achivements, unlockables, gamecenter, etc


Today, its time to go back to skateboarding, with Touchgrind Skate 2!

Awesome trick physics, control scheme that maps to how tricks are actually performed in real life, 4 big skateparks, turn based online multiplayer, and more!


Here's the official release video:


More videos here:



Toucharchade has a "first look":



Pocketgamer review:



And finally, here is the app store link:


Touchgrind Skate 2 - multitouch skateboarding game in development.

16 July 2013 - 08:35 AM

Just wanted to let the community know that we are working on the third game in our Touchgrind series.
The first game was Touchgrind, the worlds first multitouch skate game, which have sold very well on the App Store for almost 5 years now.
The second was Touchgrind BMX where we adapted the control scheme to work with BMX bikes. It's at the moment no5 in the Sports Games genre.

Now it's time to go back to skating, with Touchgrind Skate 2!

It will be awesome ;)

Mr. Crab - Platform runner with a twist! :) (iOS)

16 April 2013 - 07:19 AM

Thought I should tell you we just released our latest game for iOS

It's a side project we put together when we had some slack in the planning for our big title on the way, Touchgrind Skate 2.

It turned out pretty fun though we think, and a lot of people seem to agree!

Got Editors Choice, and is right now in the top positions of the charts in several big markets :)


Release trailer:





Hope you'll like it :)