Fucking hate programming...sometimes
Posted: May 4th, 2019, 7:38 am
So, I'm working on a game for a change and am reminded why I haven't finished a single game yet. IT'S FRUSTRATING AS HELL!!!!!!!!!
So my design is as follows.
I have a maze. The maze has rooms. The rooms have tiles.
Basically, instead of creating a HUGE tile map, I break it down into rooms. To get a specific tile, I do some math to find the room, then do some more math to calculate the index of the tile for that room, a bit of a pain, but that part works.
Was completely stumped for about 2 days. I went back and watched the old intermediate series where chili covers handling collision between two rectangles and let me tell you, I miss the old chili videos. That one was about three and a half hours long and I had to take in sections. So chill, voice was soothing, random expletives...those were the days.
Now back to the experience. The problem was my character would either teleport through walls or the program would crash for accessing some out of bounds area. I finally found a piece in the video that helped me out and I dismissed it at first, but finally put it all together and I'm partially excited to continue and partially drained and dreading to continue. This is where I usually call it quits on a project. When it takes me days to find a solution to a problem, I'm usually so wiped out that I lose interest in all the upcoming issues I'm going to be facing. I have a little better grasp of some things I was doing wrong, but I know there are going to be more gotchas.
I'm using my dim2d library and I think that is the cause of some of my frustrations. While it works well in some cases, it's very restrictive in others or just flat out doesn't fit the situation so there are still parts I'm going to need to use nested for loops. I think I'll be fine as long as I don't try to force the use of the algorithms.
Right now, there's nothing to show really. I have a maze generated and a sprite moving around with collisions, so let me get a little further before I share.
So my design is as follows.
I have a maze. The maze has rooms. The rooms have tiles.
Basically, instead of creating a HUGE tile map, I break it down into rooms. To get a specific tile, I do some math to find the room, then do some more math to calculate the index of the tile for that room, a bit of a pain, but that part works.
Was completely stumped for about 2 days. I went back and watched the old intermediate series where chili covers handling collision between two rectangles and let me tell you, I miss the old chili videos. That one was about three and a half hours long and I had to take in sections. So chill, voice was soothing, random expletives...those were the days.
Now back to the experience. The problem was my character would either teleport through walls or the program would crash for accessing some out of bounds area. I finally found a piece in the video that helped me out and I dismissed it at first, but finally put it all together and I'm partially excited to continue and partially drained and dreading to continue. This is where I usually call it quits on a project. When it takes me days to find a solution to a problem, I'm usually so wiped out that I lose interest in all the upcoming issues I'm going to be facing. I have a little better grasp of some things I was doing wrong, but I know there are going to be more gotchas.
I'm using my dim2d library and I think that is the cause of some of my frustrations. While it works well in some cases, it's very restrictive in others or just flat out doesn't fit the situation so there are still parts I'm going to need to use nested for loops. I think I'll be fine as long as I don't try to force the use of the algorithms.
Right now, there's nothing to show really. I have a maze generated and a sprite moving around with collisions, so let me get a little further before I share.