New games every week!
JSE - The Complicated Type
22nd September 2021  
Yeah, yesterday didn't go too well..

-=-=-

Starting off with "That'll be easy.." BlitzTypes, I struggled to formulate a good way to do them.
The thing I hadn't considered is that I not only need to make references, but then also have to keep track of all of those references, too.

I'd originally thought "It's just like an array", so made an array! Seemed logical.
Type MyType
Field x
Field y
End Type

MyThing=New MyType


Would get converted so that MyType is an array with 2,n (where n can be expanded as necessary)
Then MyThing would be assigned the variable "%Type:MyType:n" (with n linking to the first object in the array)

That made sense in my head, but then I realised that if I add, say, 5 objects, and then shuffle/sort them, then I'd have to scan through every referenced variables currently in memory, for each and every object, and replace all of the matching n's with all of the shuffled n's. .. and vice versa.. without messing them up along the way.
Hmmm...

Yeah, I'll keep this on the backburner for now.
I've disabled everything I coded yesterday.

What a bloomin' waste of time!!

Views 42, Upvotes 0
Daily Blog , Jse
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - The Complicated Type - AGameAWeek