0

Need ideas and help on my tile game project.

So I have been building a tile game in my free time for about a month. I ran into a little issue with arrays on how I can remove an exact index in an array without leaving empty holes. I wanted to reach out to the community and see some syntax and examples on how to achieve this. Thanks in advance.

3rd Aug 2021, 8:53 PM
Anthony Johnson
Anthony Johnson - avatar
7 odpowiedzi
+ 1
What do you mean by "removing an exact index in an array without leaving empty holes", any example please!?
3rd Aug 2021, 9:10 PM
Abhay
Abhay - avatar
+ 1
I figured it out. Thanks for your time.
3rd Aug 2021, 9:36 PM
Anthony Johnson
Anthony Johnson - avatar
+ 1
array.splice(position,number-of-elements-to-remove)
18th Aug 2021, 9:20 PM
bell
bell - avatar
0
I have to iterate over an array containg objects to find a matching parameter and remove that object from the array.
3rd Aug 2021, 9:17 PM
Anthony Johnson
Anthony Johnson - avatar
0
Thanks man. Ill check them out. Sometimes all this code gets overwhelming but i end up figuring it out lol.
4th Aug 2021, 12:39 AM
Anthony Johnson
Anthony Johnson - avatar