Thursday, March 27, 2014

Day 18 - "Procedural" Challenge


Today's goal was to generate procedurally increasing challenge : spawn forever more and more small walls with progressively less space between them. When Taco hit a small wall, i also properly restart the game from the beginning difficulty.

I has some trouble with Array (apparently there's no basic push() or pop(0 function in c#), so i tried to use List. I almost succeed but there was too much references errors, which i don't want to put time in because i won't learn much... so i fixed by using static multiple variables rather than a list (sigh...). It's crappy, but it works! so everything's fine =)

2 comments:

  1. Array[] is not dynamic. List<> is dynamic and use "arrays" in the back end. It supports indexation and Add/Remove. For easy use you can convert from List.ToArray() and iterate it like an old "C-style" array.

    ReplyDelete
    Replies
    1. Where can i find a good free C# reference? (a generic syntax one, not unity ref.)

      Delete