• momorprods

    And it’s back again, even with some fixes!

    posted in Pythonista read more
  • momorprods

    @mikael thank a lot, I’m happy your daughter likes it.

    At the end of the hunt, the score is displayed - when you touch the screen at this point it should restart the hunt.

    posted in Pythonista read more
  • momorprods

    Hi, when creating your adventure you will be asked to set, for each hint, the question itself, 4 possible replies and the correct reply.

    Very basic ;-)

    posted in Pythonista read more
  • momorprods

    Hi,

    I have just released on Github a Treasure Hunt / Scavenger creator application. In a few words, the app allows you to create your own scavenger hunts, play them and share them with your friends.

    Source is here :

    https://github.com/momorprods/TreasureHunt

    This was my very first experiment in Pythonista, started a few years ago. I just thought I should update it a bit and release it to the community.

    Pythonista is really a mind-blowing app. Treasure Hunt was designed & coded using my iPhone, and nothing else, which is so cool.

    Please be indulgent with the design & the code though, this was my very first app started in 2014!

    Feel free to share, use, comment, and even upgrade it!

    posted in Pythonista read more
  • momorprods

    great job @cvp ! currently working onto loading collada files, might take most of my upcoming oversea flight! I’ll keep you posted.

    posted in Pythonista read more
  • momorprods

    ah sorry my bad, In my tests I tweaked badly my SCNVector3 using c_double instead of c_float. Fixed and working now.

    posted in Pythonista read more
  • momorprods

    @cvp I think there is still something weird, as the coordinates of the vertices really don’t match what’s expected. The triangle totally disappear if I just scale the Z value of the 1st vertice, which is not normal.

    And overall the size of the triangle is not what it should be (confirmed this by overlapping a cube box and also by estimating through the ARKit rendering).

    Since it shows the triangle, the indexing part of the code must be ok - it probably deals with the SCNVector3 array. Perhaps I’m wrong, but SCNVector3 looks like an ObjC class, not a C record?

    posted in Pythonista read more
  • momorprods

    guys you are genius. Not sure why the vertex order did change something, probably it needs to be defined clockwise or something like that.

    Thanks for all of your help, you are awesome!

    posted in Pythonista read more
  • momorprods

    @cvp @JonB thanks for your help, I am going to investigate that empty scene stuff.

    posted in Pythonista read more
  • momorprods

    Making some good progress thanks to your help. But I’m getting a last crash on the very last instruction - any idea?

    #triangle generation
    verts=[SCNVector3(0, 0, 0), SCNVector3(1, 0, 0), SCNVector3(0, 1, 0)]
    verts_array = (SCNVector3 * len(verts))(*verts)
    
    src = ObjCClass('SCNGeometrySource').geometrySourceWithVertices_count_(
        verts_array,len(verts),
        restype=c_void_p,
        argtypes=[POINTER(SCNVector3), c_ulong],)
        
    indexes=[0,1,2]
    indexes_array = (c_ulong*len(indexes))(*indexes)
    datIndexes = ObjCClass('NSData').dataWithBytes_length_(indexes_array,len(indexes_array))
     
    ele=ObjCClass('SCNGeometryElement').geometryElementWithData_primitiveType_primitiveCount_bytesPerIndex_(datIndexes,SCNGeometryPrimitiveTypeTriangles,1,4)
       
    # CRASH Here: 
    geo = ObjCClass('SCNGeometry').geometryWithSources_elements_(src,ele)

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!