Today I played around with rewriting everything from scratch in C++. It ended up being object oriented but a pain to use, so I went back to my C implementation. The map system I reimplemented in layers ( a wall layer and a floor layer right now). Trouble is, it still doesn’t detect collisions. I found out that my problem was lack of planning. My player_x and player_y variables use NCurses-relative coordinates, whereas the wall[y][x] is map-relative. So now I will rewrite that one more time and get it working. If I have too much more trouble I may try using LISP despite having 2 days less and being somewhat unfamiliar with the language.
Posts tagged ‘coordinates’