Indie game dev

posting things from the 160+ rss feeds I follow. You should see me post links in two chunks for when im reading stuff, once in the morning and once in the evening ET. If you want some of my sources for certain communities feel free to dm

Pfp is Lucie from battlerite

  • 199 Posts
  • 31 Comments
Joined 1 year ago
cake
Cake day: August 4th, 2023

help-circle
























  • I dont know how larger games do it but it mostly depends on what kinds of enemies and what genre of game youre doing.

    If you have a lot of enemies that will be spawned and despawned and they are mostly the same you can do an object pool where instead of destroying the object it gets hidden and added to the back of the pool for another enemy to spawn in as in the future by showing it and moving it to the correct spot

    In terms of when to spawn it usually (assuming youre doing most genres) you can just spawn it right outside the view of the player when they hit a trigger. In games I usually make enemies are spawned on a timer since it tends to be more arcade like and in that case you usually just spawn them outside the range of the player in a random location around a radius after X amount of time has passed

    Can give more specific things if I know the genre

    Also downvote is likely someone from the all feed
















  • When the draw function calls itself it yields control to that new function its calling. When that function ends it takes back control and continues doing what it was doing.

    This means all of the for loops in all of the functions will execute. Draw(1) will do the for loop and then return as it hits the end of the function (standard behaviour when you reach the end of a function even if theres no return statement). Then draw(2) will do the for loop as it gets back control now that draw(1) is done and then return, etc. all the way up

    All parts of a function are recursive, theres no such thing as a non recursive part