First 8 hours of the Pokemon game
Added 2024-03-30 08:09:06 +0000 UTCThe Pokemon style game is nearly done, if you want to start here are the first 8 hours. I still need to add an intro and timestamps but I guess it's watchable already
The files are available here: https://drive.google.com/drive/folders/1yR1EqEbbrHEhtyNFnD-TpwpeiVCEPWBY?usp=sharing
Comments
I saw the first 8hs of the course, I think it is really cool, amazing job, only 1 thing to say, the most complex thing on this games are cutscenes, for example on Pokémon talk with an npc triggers multiple events… move the npc, show dialog, give you an item, mark a story flag for quest, etc, this is really complex stuff that could be amazing to be added… that why the tiled base movements, also handling the code into states make it easy to read, overworld state, menu state battle state and so on… 😊👌🏻
Ezequiel Camezzana
2024-04-04 15:43:38 +0000 UTCI'd like to start off by saying that I'm super excited to go through this course regardless of the movement style. Thanks, Clear Code, for putting so much time and effort into making your content so great! Yes, all of the core series Pokemon games featuring 2D player sprites had tile-based movement. They even kept it when they first moved to 3D, though they added diagonal movement. I think the first core series game to move away from this style of movement was Sun and Moon in 2016. There were some types of puzzles and some game mechanics (like counting steps) that utilized the tile-based movement. Also, some fans just prefer this style of movement for their own reasons, though Pokemon games are (for the most part) just as good without it. Below is how I've tried to replicate 2D Pokemon style movement in the past. This doesn't handle animations or collisions and is also prone to issues where the player may end up on the same tile as another entity. The player's starting position always has to be aligned with the tile map as well. I'm sure there is a lot of other improvements to be made here, as I'm just a novice. *Note: I haven't dived into this course yet, so I don't know how well this aligns with the project as a whole. I just thought some people might be interested.* (I'm importing some stuff like TILE_SIZE from a settings file.) (Vector2 can be imported from pygame.math) class Player(pygame.sprite.Sprite): def __init__(self, pos, groups): super().__init__() self.image = pygame.Surface((TILE_SIZE, TILE_SIZE)) self.image.fill((0, 128, 255)) self.rect = self.image.get_frect(center=pos) self.is_moving = False self.move_speed = 150 self.target_pos = self.rect.center def input(self): # Input is done with if/elif's to prevent diagonal movement keys = pygame.key.get_pressed() if keys[pygame.K_UP]: self.move(Vector2(0, -1)) elif keys[pygame.K_DOWN]: self.move(Vector2(0, 1)) elif keys[pygame.K_LEFT]: self.move(Vector2(-1, 0)) elif keys[pygame.K_RIGHT]: self.move(Vector2(1, 0)) def move(self, direction): self.is_moving = True self.target_pos = (self.rect.centerx + (direction.x * TILE_SIZE), self.rect.centery + (direction.y * TILE_SIZE)) def update(self, dt): # Only check for input if player isn't moving if not self.is_moving: self.input() # Move the player if self.is_moving: direction = self.target_pos - Vector2(self.rect.center) distance = direction.length() if distance > 0: direction = direction.normalize() movement = direction * self.move_speed * dt if movement.length() < distance: self.rect.center += movement else: self.rect.center = self.target_pos self.is_moving = False
FiestaSlim
2024-03-31 02:47:14 +0000 UTCI wonder, I have gotten a similar comment multiple times by now, is the tile based movement an actual thing for Pokemon games? I never heard about it before.
Christian Koch
2024-03-30 21:31:33 +0000 UTCwow thanks a lot!!!! Some early feedback: in Pokemon games (at least the Gameboy ones) the movement is tiled based and you cannot walk diagonally.
drpaneas
2024-03-30 13:22:40 +0000 UTC