Thursday, October 10, 2019

ReGenesis

When I last worked on the arcade-style space mining game I had achieved an endless universe of randomly generated planets and elements. Minerals and fuel could be gathered. Fuel was burned up and the game ends if the player ran out. Planets could be landed on (Their topography was randomly generated) and walked around. There were enemy bases and the player could shoot.

But I had HUGE problems doing collisions. There were major issues with the navigation and position detection portions of the code. These issues were at the core of the game's logic. They were so bad that I didn't even want to attempt to code enemies.

Now that I am circling back to it I felt that a rewrite was necessary. So tonight I built the core game loop and the coordinate logic. I also coded a movement class and game element class. Wrapping when going off screen is simply a flag same with random repositioning on wrap (For the starscape). Reverse movement is also a flag so that the player can stay in the center and the background moves opposite the key direction for the illusion of the player moving.

I've created a test element to verify the moving etc works. Next I will code the collisions to ensure position checking etc is now good.

Once collision is coded I will begin building the various level types, starfield, planet, maybe even inside bases. Then I will build all the random generation / restoration logic.

So far it is going FAR smoother than the previous attempt.

No comments:

Post a Comment

From Shotcut to Kdenlive

So I've been using Shotcut for a while now, for my YouTube videos... and music videos. I love the application. Slicing clips, doing fade...