(Solved)Would a game with a bunch of lemons be possible in AGS?

Started by doctorhibert, Mon 31/12/2018 02:06:36

Previous topic - Next topic

doctorhibert

So, here's my game idea. You got a bunch of lemons in a pile on the left, and a knife in the middle. You press the right arrowkey to move the lemon to the middle, then the bottom to cut it and then the right to move it to the right. You repeat this until all lemons are cut. What I'd like, is for you to be able to see each individual lemon, say 30, and for that lemon to move from the pile to the left to the one on the right, ending up with none on the left.
Now, the problem is that AGS has an object limit. Even if I changed the amount of lemons to the limit, correct me if I'm wrong, but that'd be pretty laggy with so many objects at once, right?
The other idea I had was to have 2 objects with a different sprite for the amount of lemons left, but having multiple animations for each lemon would massively bloat the filesize (again, correct me if I'm wrong)
Then there's the option of doing the generic videogamey thing and having a sprite of a box that changes every 5 lemons, but I don't really like this one, and besides, I'd have to make a different sprite at least for the first/last 5 lemons, which would be the same problem as the last point.

So, how would you lads solve this conundrum?

Edit:Thank you guys, will look into your answers

Khris

Afaik, limits like the objects per room limit were removed in recent AGS versions.

However, I'd simply do what AGS does under the hood anyway and draw sprites on the screen directly. That way you can have hundreds of objects, at least in theory.
All you need is a bunch of arrays and DrawingSurface.DrawImage()

Crimson Wizard

#2
Quote from: Khris on Mon 31/12/2018 09:41:15
Afaik, limits like the objects per room limit were removed in recent AGS versions.

Not yet, but this reminds me to look into this again...

Khris's solution above may be the best one, alternate ones are to use GUI and GUI buttons as objects, or room and Characters as objects (although characters take more program memory than anything mentioned before).

doctorhibert

I will look into the drawing surface option. One the other hand, if there's no more object limits anymore, would having 30 objects in a high resolution cause fps drops or can modern hardware handle that kind of stuff? Because if it can that seems a lot simpler than using drawingsurface.
Thanks for the help

Slasher


Cassiebsg

Well, your second option isn't that bad either.

1 object to the left = Lemons left : It'll require a sprite for each time you take a new lemon (or you can try and crop the sprite of the lemon taken)

1 object in the middle (moving) = Chopping animation of the lemon being cut

1 object to the right (?) = The chopped lemons (if you need/want these). Technic to add to the pile would be similar to the code to take/use the ones from the left.

This method requires a sprite for each lemon take, or a awesome coding to clip the lemon from the sprite.  ;)
There are those who believe that life here began out there...

SMF spam blocked by CleanTalk