• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

PokemonGDX open source pokemon engine

zingzags

PokemonGDX creator
536
Posts
15
Years
Hello everyone,
I took it upon myself to start a pokemon open source engine. Here is a link to the github: https://github.com/sjosegarcia/Pokemon
xYyEWJi.png
1bx9KFc.png
 
Last edited:

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
Isn't Essentials open-source as well? Everyone has the option too see, alter and contribute to the engine. Yet not too many people do. I wonder why...

Anyway, I can't access the guthub files, since I'm not on a computer. Would be cool if you included some media in your opening post.
 

zingzags

PokemonGDX creator
536
Posts
15
Years
Isn't Essentials open-source as well? Everyone has the option too see, alter and contribute to the engine. Yet not too many people do. I wonder why...

Anyway, I can't access the guthub files, since I'm not on a computer. Would be cool if you included some media in your opening post.
Yeah I also wonder why. I will later, as soon as I get some stuff done.
 

zingzags

PokemonGDX creator
536
Posts
15
Years
Right now I am working on both Collision Detection, and a better way to get the player centered properly with different dimensions.
But I managed to get the game to re-size properly without worrying of the screen size.
1bx9KFc.png
 

zingzags

PokemonGDX creator
536
Posts
15
Years
Alright so this is what I did to get the sprite image to dynamically center in the correct spot.
Code:
	public void addMapObject(PlayerRenderer player) {
		player.setMap(this);
		float divideWidth = player.getPlayerFrame().getRegionWidth() / (Constants.pixel / 2);
		float divideHeight = player.getPlayerFrame().getRegionHeight() / (Constants.pixel / 2);
		float checkWidth = player.getTexture().getWidth() / (Constants.pixel / 2);
		float offsetX = 0;
		float offsetY = 0;

		if (divideWidth % 2 == 1) {
			offsetX -=(Constants.pixel / (Constants.pixel / 2));
		}
		
		if (checkWidth >= (Constants.pixel / 2)-1) { //TODO this is for now, until I can find a better way.
			offsetX-= checkWidth;
		}
		
		if (divideHeight % 2 == 1) {
			offsetY -=(Constants.pixel / (Constants.pixel / 2));
		}
		
		player.setPlayerPosition(-x + offsetX, -y + offsetY);
		player.getBounds().set(x + (viewport.getWorldWidth() / 2) , y + (viewport.getWorldHeight() / 2), player.getPlayerFrame().getRegionWidth(), player.getPlayerFrame().getRegionHeight());
		mapObjects.addMapObject(player); //Need to make the actor class part of a "abstract life object class" and make PlayerRenderer a sub-class of that class to 
	}
 

zingzags

PokemonGDX creator
536
Posts
15
Years
Awesome Work !!!
Thank you.

UPDATE
Code:
 Brought over the entire PokemonGDX repository
- Created some XML's (Thank you Pokemon Essentials for providing the
data I needed to convert it to XML)
- Parsed most of this data
- Fixed some character movement animation issues
- Removed the use of Scene2D from the PlayerRenderer.java to allow more
flexibility
Sorry for the long wait, I was too busy to work on it because of school. I created the backbone of the parsing system with this update, so now I can fully implement pokemon data.
 

zingzags

PokemonGDX creator
536
Posts
15
Years
UPDATE
Code:
- Added logic for individual Pokemon
- Added Trainer Logic
- Renamed the main file from Pokemon to Game
- Added logic for Gender
- Changed some logic for PokemonParty
- Added PokemonPokedex and PokemonStorage to be expanded on in the
future
 
Back
Top