Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I am going to write exams tomorrow and on thursday in school so I will be taking a look at it tomorrow, learning again on Wednesday and then I should be ready on from Tuesday on :) 

Wish me luck guys 😂 

Sounds good. Good luck.

(1 edit)

Thanks a lot

Hey I've been looking through the code a bit now and I don't really see through all of it how about sitting together in a discord server or something and talk about it.
Another thing I would like to mention is that it might be better to use box2D as our physics engine instead of all the self made bounding box stuff that would not only keep the code a lot cleaner it also would work even better because as you metioned in the readme there is a lot of glitching around for example if you get under a platform or throw the power unit it can get stuck in a wall.
my discord username is T0x1C_Byte#8833

And I need push access to the repo my Github is T0x1CByte

(1 edit)

Ok. I'll get you added on github.

Yes, I've been having an inner debate, and I think I agree- the game is turning more into a physics puzzle platformer than I originally was thinking. I used box2d for my last game, it certainly would work well for most objects. My only thought is for character movement might do a few things unique there as I hate the way true physics feels for jumping and character movement! But probably can get it close with some tuning. When I started I was thinking more traditional platforming, less physics and interactions!

What I did in my last game was get the "platforms" tile layer and based on the flags turn those into box2d static objects in the world, then did a simple common method for taking the sprites bounding box (roughly) and creating the body with that. I'll grab some code from my old project and give it a try quick. I'll try to do one more push with whatever I get done on this tonight at some point.

I'm traveling for work, I won't probably get back online (coding wise) on this until later in the week.

Here's a few tips on reading the code:

Anything in the gamelib package is really my re-usable game library code I framed up on top of libGDX. A lot like Scene2d in some ways - layers, etc.

The game itself for the most part is in the gameoff package and right now is only a few files.

gameoff.java is where things boot up, it then adds the SplashScreenLayer and runs that, then does the TitleScreenLayer, then from there it loads up MainLayer.java where in loadLevel is the magic where it loads the tmx file and builds and has the game logic/main game loop. MainLayer is where we'd step the world etc for Box2D.

You can see in loadLevel I grab the "objects" layer from the tmx file/Tiled level, then for each object, I use the Type property and reflection to instantiate an instance of the object- for example "Platform" or "Block". Then I call init on it with the properties from the object in tiled, and it initializes. Then in each objects update is it's main logic. I had the idea that all the game objects would inherit from GameMapObject - which is where the physics live for most objects currently and other common things.

I'll have a look at Discord, I've ever used it, but I can get it installed. I probably can't jump on a call until later this week.

- Grant