Hi all,
Just thought I'd open a thread to discuss Monkey projects in development, as well as provide help and support.
My main released game is a port of my GGJ 2010 entry WitchBlaster, playable at Monkey Coder. The only other thing I've spent any time on is a quick tech demo to experiment with pseudo isometric perspectives.
Does anyone else have Monkey projects in development that they'd like to discuss?
Not yet but I'll be going through the tutorials soon, I'll post if I run into any snags!
Alright I've got one for you, I'm new to OOP so bear with me:
I'm trying to make several instances of a class and store each in a seperate array index for later reference to update & draw them.
Eg:
For Local i:= 0 To 10
Field ParticleIns:Particle[i] = New Particle
Next
This concept of storing a whole object in a variable is new to me, I'm used to Game Maker's way of simply having an object ID, and instance number to reference objects.
Chances are I misunderstand this instancing thing, and there's probally a better way to keep track of your objects - I'd love to hear some suggestions!
Thanks
Hi Soup,
I generally like to store things in a list. For instance, in your main class you could declare
Field ParticleList:List<Particle> = new List<Particle>
You can add to the list like so:
ParticleList.AddLast(new Particle())
Finally, if your particle class has an update method, you can update the list like so:
for local p:Particle = eachin ParticleList
p.Update()
next
I haven't tested checked the code I just wrote but it should be fine.
Awesome solved it, thanks. There's a few things going on there I don't fully understand, but I'll work on it..