Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sprites like MJ's Trabajo Basura (not unregr. Fourspriter)
#13
britlion Wrote:Nope. Not even that much of proto-object oriented programming. More or less Sinclair Basic and raw assembly only - or any library subroutines that can be made from that.

I did read in another thread some qualms about introducing pointers and struct like things but I do think this is something that has to happen in zxbasic to make it a better language -- without them it makes it difficult to do certain things. The concept of a pointer can be hidden from the programmer by using references for non-native types as is done in Java and other languages that try to insulate the programmer from the machine. Boriel will be doing exactly that with Arrays for passing Arrays to functions.

Certainly something like a struct should be in there. Just one example of why can be found in the sp1 library... each sprite has 10 variables associated with it. With 10 sprites on screen, there would be 100 variables. A call to a move sprite function would involve passing 10 parameters. This is all a bit crazy when all that is needed is a way to aggregate the data into a single piece so that all the data can be referred to with a single variable. I suppose a non-struct version might try to have 10 arrays, one for each sprite variable and indexed by a sprite number. But this is actually a much more confusing and limited approach IMO.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)