Simple help needed! (Spamming objects)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
jojomickymack
Prole
Posts: 45
Joined: Tue Dec 26, 2017 4:52 pm

Re: Simple help needed! (Spamming objects)

Post by jojomickymack »

Hi,

I really liked your artwork in the original post and got inspired to do this. Download the love file, rename it a .zip and look at the source code, it's heavily commented.

It occurred to me that other people getting started might see this thread and want a working example of how to send some arrows flying across the screen. There's an arrow class and a table containing a bunch of instances, each having unique angles, velocities, and accelerations.

Also, when the arrows go too far of the screen to be seen anymore, they get replaced with new arrows back on the other side, ready to fly by again.
arrows.gif
arrows.gif (228.39 KiB) Viewed 1911 times
Attachments
arrow_fly.love
(7.1 KiB) Downloaded 72 times
User avatar
Tricky
Citizen
Posts: 75
Joined: Thu Dec 18, 2014 4:07 pm
Location: Breda, the Netherlands
Contact:

Re: Simple help needed! (Spamming objects)

Post by Tricky »

You are very kind. But you you are right, this is a good example code demo (and as well in GW-BASIC,Pascal, Lua, BlitzBasic, BlitzMax, php and Go, I did learn a lot by code analysis. Trying to see how others did it).
loser123
Prole
Posts: 6
Joined: Fri Dec 29, 2017 4:55 pm

Re: Simple help needed! (Spamming objects)

Post by loser123 »

Thank you so much jojomickymack!!
(Sorry for not answering, I was travelling :c )
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 39 guests