Ork Slayer Gamedev
Ork Slayer Gamedev
  • Видео 51
  • Просмотров 254 152
Level Up Your Python Games With RNG - ASCII Battle Tutorial #2
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/OrkSlayer . You’ll also get 20% off an annual premium subscription. (let me know if the link doesn't work properly!)
ALSO TAKE PART IN THE CHALLENGES! I'm waiting for your results in the comments. Let's upgrade our turn-based battle framework with cool little features and a bunch of RNG related stuff!
Find the code I made for the video here 👇👇👇
github.com/orkslayergamedev/python-classes-text-battle
Use the master (default) branch to start coding with me!
### Thanks to Freepik for all the amazing icons in the video!
www.flaticon.com/authors/freepik
×oOo×-----------------------👽SOCIALS👽-----------------------×oO...
Просмотров: 109

Видео

Same Roguelike in Two Different Styles - Python ASCII vs Pygame
Просмотров 3,7 тыс.3 месяца назад
I show you the process of creating a game with the same logic with both ASCII (using native python) and Pygame. If you want to try it out, check the repo below. REPO: github.com/orkslayergamedev/roguelike-ascii-vs-pygame ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_freak/ (out of office ...
EASY Random Map Generation - Python ASCII Tutorial
Просмотров 6 тыс.5 месяцев назад
Here's my simple idea of how anyone can create random maps for their ASCII games without complicated algorithms! NOTE: I simplified the logic of tile objects by deprecating the "colored" parameter. The "color" parameter can also be used for the same purpose. 👇👇👇 REPO: github.com/orkslayergamedev/random-ascii-map-generation ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 🎮 TRY OU...
How to Create PARTICLE EFFECTS in Python - Pygame Tutorial
Просмотров 3 тыс.6 месяцев назад
Did you know that creating particles are actually really easy? Let me show you how to do it the simplest and most effective way in Pygame using the built-in sprite module! NOTE: I made a mistake as I used Particle instead of FloatingParticle at the end, although it works the same way as we made no modifications in the subclass. Find the fixed version on my GitHub :) REPO: github.com/orkslayerga...
Powerful Laser Beams in My Space Shooter - Python/Pygame Devlog #3
Просмотров 5147 месяцев назад
Want to know how I incorporated a powerful laser-shooting spaceship into my game? Take a look! Feel free to drop a question or suggestion in the comments! ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_freak/ (out of office at the moment) 📸 Instagram: orkslayergamedev 🐱 GitH...
Menus & Screens of My Space Shooter - Python/Pygame Devlog #2
Просмотров 4527 месяцев назад
Let's go over the screens of Field Trip and see how they connect! In this video you'll get gamedev insights about: - a mockup of how I manage screens - switching between game states - specific screens like: menu, options, pause, game, upgrade, game over, etc. Feel free to drop a question or suggestion in the comments! ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ (not expectin...
Recreated My Space Shooter in 9 Months - Python/Pygame Devlog #1
Просмотров 2,1 тыс.8 месяцев назад
Join with me along the journey of recreating my Pygame Space Shooter from scratch! The original minigame had great ideas, so I took the concept and made a standalone game with much more functionality upon a better frame! 🛸 In this video you'll get gamedev insights about: - how to make your game style consistent - how to separate your sprites into different layers - achieve pixel-perfect collisi...
Learn Python Classes With a Text-Based Battle - OOP Tutorial
Просмотров 130 тыс.10 месяцев назад
I'll guide you through object-oriented programming in Python, featuring classes, objects, attributes, methods, inheritance and subclasses - all in a fun way of creating a text-based ASCII battle scene! Find the code I made for the video here 👇👇👇 github.com/orkslayergamedev/python-classes-text-battle ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ (be the first one ever, lol) 👾 P...
EASY Health Bars for BEGINNERS - Python ASCII Tutorial
Просмотров 3,8 тыс.11 месяцев назад
Health Bars, Mana Bars, Experience Bars... you name it! Watch the video to find out the most simple way of creating bars for your ASCII game written in Python! Find the code I made for the video here 👇👇👇 github.com/orkslayergamedev/ascii-health-bars-beginners ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ (be the first one ever, lol) 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_...
Will I Ever Release My Game? (Pursuing Pygame Perfection)
Просмотров 754Год назад
IT'S ORK SLAYING TIME! Jk, no orks yet. Watch the video to find out more about my dream game. ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ (be the first one ever, lol) 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_freak/ (out of office) 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ (100% free) Instagram: orkslayergamedev GitHub: github.com/orkslayergamedev/ Reddi...
Space Shooter from Scratch in One Minute (Python/Pygame)
Просмотров 1 тыс.Год назад
I created a(nother) SPACE SHOOTER from scratch in Python/Pygame. Focusing on nice visuals, cool upgrades and immersive gameplay. Like and Subscribe for DEVLOG series where I can show even cooler features! 🛸 ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_freak/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ Instagram: orks...
Survive the Asteroid Belt! (Satisfying Space Shooter In Python/Pygame)
Просмотров 601Год назад
I just realized the video is 4:20 long, lol. Last game of the Skinwalker Ranch minigames. DOWNLOAD LINK: orkslayergamedev.itch.io/skinwalker-ranch/ ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_freak/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ Instagram: orkslayergamedev GitHub: github.com/orkslayergamedev/ Reddit: ...
Anyone Could Make This Simple Game! (Hanoi Tower in Python/Pygame)
Просмотров 594Год назад
Third game of the Skinwalker Ranch minigames. DOWNLOAD LINK: orkslayergamedev.itch.io/skinwalker-ranch/ ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 👾 PM FOR COMMISSIONS: www.fiverr.com/astral_freak/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ Instagram: orkslayergamedev GitHub: github.com/orkslayergamedev/ Reddit: www.reddit.com/user/orkslayergamedev/ ×oOo× ...
Can YOU Beat This Game? (Shooter in Python/Pygame)
Просмотров 523Год назад
Second game of the Skinwalker Ranch minigames. Tell me in the comments if you want a tutorial for such a game! DOWNLOAD LINK: orkslayergamedev.itch.io/skinwalker-ranch/ ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 👾 I TAKE COMMISSIONS: www.fiverr.com/astral_freak/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ Instagram: orkslayergamedev GitHub: github.com/orksl...
The Shortest Game You'll Ever Play (Runner in Python/Pygame)
Просмотров 777Год назад
First one of the Skinwalker Ranch minigames. Tell me in the comments if you want a tutorial for an endless runner! DOWNLOAD LINK: orkslayergamedev.itch.io/skinwalker-ranch/ ×oOo× 👽SOCIALS👽 ×oOo× ☕ SUPPORT ME: ko-fi.com/orkslayergamedev/ 👾 I TAKE COMMISSIONS: www.fiverr.com/astral_freak/ 🎮 TRY OUT MY GAMES: orkslayergamedev.itch.io/ Instagram: orkslayergamedev GitHub: github.com/o...
Pixel Art Minigames in Python/Pygame (Skinwalker Ranch Trailer)
Просмотров 814Год назад
Pixel Art Minigames in Python/Pygame (Skinwalker Ranch Trailer)
Should I Turn This Into a Pygame Mini-Game? (Septembit 2022)
Просмотров 661Год назад
Should I Turn This Into a Pygame Mini-Game? (Septembit 2022)
EASY Typewriter Effect for BEGINNERS - Python ASCII Tutorial
Просмотров 3,1 тыс.Год назад
EASY Typewriter Effect for BEGINNERS - Python ASCII Tutorial
HEALING in my PYGAME RPG! (Ork Slayer Indie Game Devlog #10 - Healing)
Просмотров 728Год назад
HEALING in my PYGAME RPG! (Ork Slayer Indie Game Devlog #10 - Healing)
Drawing OUTLINES with PYGAME! (Ork Slayer Indie Devlog #9 - Outlines & Masks)
Просмотров 669Год назад
Drawing OUTLINES with PYGAME! (Ork Slayer Indie Devlog #9 - Outlines & Masks)
Turn-Based Battles in my PYGAME RPG with a TWIST! (Ork Slayer Indie Devlog #8 - Combat Mechanics)
Просмотров 907Год назад
Turn-Based Battles in my PYGAME RPG with a TWIST! (Ork Slayer Indie Devlog #8 - Combat Mechanics)
When a PYGAME RPG Starts to Look Good... (Ork Slayer Indie Devlog #7 - Design, Animations, Stats)
Просмотров 653Год назад
When a PYGAME RPG Starts to Look Good... (Ork Slayer Indie Devlog #7 - Design, Animations, Stats)
Better Foundations for my PYGAME RPG! (Ork Slayer Indie Devlog #6 - Resolution & Scaling)
Просмотров 946Год назад
Better Foundations for my PYGAME RPG! (Ork Slayer Indie Devlog #6 - Resolution & Scaling)
How to CHANGE TRANSPARENCY in Python - Pygame Tutorial
Просмотров 6 тыс.2 года назад
How to CHANGE TRANSPARENCY in Python - Pygame Tutorial
MY NEW ASCII GAME! (Bane of Orks - Free on Itch.io)
Просмотров 2,1 тыс.2 года назад
MY NEW ASCII GAME! (Bane of Orks - Free on Itch.io)
PYTHON GAMES THAT MY AUDIENCE MADE! (Gamedev Challenge Entries)
Просмотров 3,5 тыс.2 года назад
PYTHON GAMES THAT MY AUDIENCE MADE! (Gamedev Challenge Entries)
Python ASCII RPG Tutorial #4 (Shop, NPC, Boss Fight)
Просмотров 6 тыс.2 года назад
Python ASCII RPG Tutorial #4 (Shop, NPC, Boss Fight)
Python ASCII RPG Tutorial #3 (Enemies, Battle, Potions)
Просмотров 8 тыс.2 года назад
Python ASCII RPG Tutorial #3 (Enemies, Battle, Potions)
Python ASCII RPG Tutorial #2 (Stats, Map, Movement)
Просмотров 11 тыс.2 года назад
Python ASCII RPG Tutorial #2 (Stats, Map, Movement)
Python ASCII RPG Tutorial #1 (Basics, Main Menu, Saving)
Просмотров 25 тыс.2 года назад
Python ASCII RPG Tutorial #1 (Basics, Main Menu, Saving)

Комментарии

  • @orkslayergamedev
    @orkslayergamedev 23 часа назад

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/OrkSlayer . You’ll also get 20% off an annual premium subscription.

  • @mickomoo
    @mickomoo 2 дня назад

    I found WarriorJS wishing there was something similar for Python, then accidentally ended up here. Awesome!

    • @orkslayergamedev
      @orkslayergamedev 10 часов назад

      Cool, I'm glad you found me! Thanks a lot, happy coding to you 🙌🏻

  • @stephenmackenzie9016
    @stephenmackenzie9016 2 дня назад

    Hero dropped his fists…

    • @orkslayergamedev
      @orkslayergamedev 10 часов назад

      Take a look at the video at 10:20 again, as I hint an optional coding challenge for the viewers to implement a safety feature that prevents the hero from dropping the default weapon. Easy as that 👇🏻 def drop(self) -> None: if self.weapon != self.default_weapon: print(f"{self.name} dropped the {self.weapon.name}!") self.weapon = self.default_weapon

  • @briandomingo7670
    @briandomingo7670 4 дня назад

    Can I ask how did you create the progress bar?

    • @orkslayergamedev
      @orkslayergamedev 11 часов назад

      Sure! It's actually rather simple. You need a variable that you update each round with the time (time passed between frames multiplied by some speed factor, to make it greater). You also need a constant to track when will the bar fill up. To make it scaleable, you also need the length of the bar, which is a constant again. I'm typing this on my phone so apologies if it's not perfect: PBAR_LEN = 500 PBAR_MAX = 100 PBAR_SPD = 10 pbar_current = 0 level = 1 while True: ... if pbar_current < PBAR_MAX: pbar_current += dt * PBAR_SPD else: pbar_current = 0 level += 1 So you update the progress variable until it fills up, then you reset it and apply game logic (eg. next level) To display, you can use a pygame rectangle pbar_ratio = pbar_current / PBAR_MAX rect_len = PBAR_LEN * pbar_ratio pygame.draw.rect(screen, "white", (0, 0, rect_len, 10)) Change the coordinates and dimensions according to your needs. These code pieces alone won't work, it's just for the idea demonstration. Let me know if it helped!

  • @ambrishdubey2241
    @ambrishdubey2241 5 дней назад

    Hello orky, this video is awesome. Would like if you create these type of vdos on other topics of python like variables, decorators, loops and many more and a bonus project based on them. This would definitely help your channel reach a bigger audience as well. Hope you read this and think about it. Thanks man!

    • @orkslayergamedev
      @orkslayergamedev 10 часов назад

      Hey! Thanks a bunch for the helpful feedback 🙌🏻 I'm aware that similar videos would reach bigger audience, so I'm slowly trying to incorporate such ideas! Thanks again for your thoughts 🙏🏻

  • @briandomingo7670
    @briandomingo7670 7 дней назад

    Hello can I ask how did you code the asteroids, I'm making a project for our school and your game peaked my interest so I created one base on yours. I created my own background and ufo's the only thing that I need to create is the asteroids but I don't know how to generate it.

    • @orkslayergamedev
      @orkslayergamedev 11 часов назад

      Hey! Sorry for the late reply. I created an asteroid factory method that is called with fix intervals (eg. every second) using a builtin pygame timer. To randomize it, you can add a random conditional before the timer. Here's a little draft: class Asteroid: def __init__(self, pos, direction): self.pos = pos self.direction = direction ... def move(self, dt): ... def draw(self): ... def update(self, dt): self.move(dt) self.draw() asteroids = [] det spawn_asteroid(pos, dir): a = Asteroid(pos, dir) asteroids.append(a) while True: ... x = SCREEN_W + 100 y = random.randint(0, SCREEN_H) x_dir = random.uniform(-1, 0) y_dir = random.uniform(-0.5, 0.5) direction = pygame.vector.Vector2(x_dir, y_dir) # timer goes here ... self.spawn_asteroid((x, y), direction) Using lists for storing objects works well, but I'd rather advise looking up pygame Sprites and Groups as they handle this task much better! If you want to learn about them, you can also check out my Pygame Particles Tutorial. I typed all this on my phone so sorry it it's not perfect. Hope it helps!

  • @nobody5674
    @nobody5674 11 дней назад

    What did you do at 5:58?

    • @orkslayergamedev
      @orkslayergamedev 11 часов назад

      I simply formatted the content with hand and cut the video, but there are code formatter plugins that helps you do this automatically! If you're interested, I can recommend the one named "black"

  • @Blackronin357
    @Blackronin357 11 дней назад

    I learned alot from this video about classes and being able to put it together in visual manner really helps students like us grasp it better.

    • @orkslayergamedev
      @orkslayergamedev 11 часов назад

      Thank you so much for the valuable feedback, I really appreciate it! 🙏🏻

  • @LenCedeno
    @LenCedeno 11 дней назад

    Why is the code so blurry? Hard to read much!

    • @orkslayergamedev
      @orkslayergamedev 11 часов назад

      Thanks a lot for highlighting the issue! I only noticed it when cutting my upcoming video. Unfortunately OBS was set to medium compression meaning the saving quality is a bit worse then the original. I've set it to lossless, so the videos after the new one will look sharp!

  • @LBCreateSpace
    @LBCreateSpace 15 дней назад

    Great explanations

  • @lucaslima7759
    @lucaslima7759 19 дней назад

    If you don't learn about classes with this video, just forget about it 😂. Cleanest video about classes that I ever watched

    • @orkslayergamedev
      @orkslayergamedev 11 часов назад

      Haha, right - game concepts with visual representation can be understood so much better! Thanks a lot for the amazing feedback, happy coding to you 🙏🏻🙌🏻

  • @aligunaydn9912
    @aligunaydn9912 20 дней назад

    Where did you learn to draw? Can you recommend a site where I can draw?

    • @orkslayergamedev
      @orkslayergamedev 19 дней назад

      I mostly learned drawing by myself, using references - but there are handful of great pixel art tutorials on the internet! What I can wholeheartedly recommend is Aseprite, a pixel art drawing software for PC. There's a small price but it surely pays off :)

    • @aligunaydn9912
      @aligunaydn9912 17 дней назад

      @@orkslayergamedev thanks

  • @ixgames
    @ixgames 20 дней назад

    hi. what color sheme do you use?

    • @orkslayergamedev
      @orkslayergamedev 19 дней назад

      Hey! It's the One Dark Italic style from the One Dark Theme plugin. You can find it here: plugins.jetbrains.com/plugin/11938-one-dark-theme

    • @ixgames
      @ixgames 19 дней назад

      @@orkslayergamedev tks

  • @pionayd277
    @pionayd277 20 дней назад

    Better than my CS teacher

  • @homeoffice3524
    @homeoffice3524 22 дня назад

    That's for showing up in my feed. I'm on my journey to learn Python from scratch and I hate and find really boring all this math based tutorials. But you are totally different. Games dude! Thanks a lot and it still includes everything what programmers should know.

    • @homeoffice3524
      @homeoffice3524 22 дня назад

      Oww and I have other question. Can you please make some tutorial(same basic one) how to put this py file in between HTML or something like that to be able share on internet?

    • @orkslayergamedev
      @orkslayergamedev 22 дня назад

      I'm glad to hear that you enjoy the tutorials! 🐍 Learning programming through game development (the same way I did as well) can make it so much more engaging and practical. I'll keep bringing more game-related content to help you learn while having fun. Thanks for the support, and happy coding! 🙌

    • @homeoffice3524
      @homeoffice3524 21 день назад

      @@orkslayergamedevHi. One more question. Last night I discovered py-script. Only I can't get my py content fit the screen. Idk if it's even possible. And inputs are not working at all. Did you ever try it? Are they should work and I am just stupid or py-script is extremely limited?

    • @orkslayergamedev
      @orkslayergamedev 19 дней назад

      Hey! As for the first question my repository is already available on the internet on GitHub: github.com/orkslayergamedev/roguelike-ascii-vs-pygame If you'd like to share your own work you can create an account and install git onto your computer! I might make a tutorial sometime in the future. Hope I understood the question right :) As for the second one, I never tried py-script before. These browser-based code editors have their limitations, I'd rather recommend a desktop application like PyCharm or Visual Code Studio. I also haven't found anything about screen configuration in the documentation, probably the best way to zoom is crtl + scroll-up or ctrl + plus :)

  • @ElGreco15
    @ElGreco15 22 дня назад

    I'm trying to make a static map, and between the last video and this one there is a step I am missing. How do I display the map I created in the last video using gamemap = [[Tile(plains), Tile(mountains)...etc] I do not want the batches or procedural creation. I just want to see the map from the previous in this playlist.

    • @orkslayergamedev
      @orkslayergamedev 22 дня назад

      Hey! I hope I understand the issue correctly. Here's a simplified version of the modules you want to use: ## --------------- tile.py --------------- ## ANSI_RESET = "\033[0m" ANSI_YELLOW = "\033[33m" ANSI_GREEN = "\033[32m" ANSI_BLUE = "\033[34m" ANSI_RED = "\033[31m" ANSI_WHITE = "\033[97m" ANSI_MAGENTA = "\033[35m" ANSI_CYAN = "\033[36m" class Tile: def __init__(self, symbol: str, color: str | None = None): self.symbol = f"{color}{symbol}{ANSI_RESET}" if color else symbol plains = Tile(".", ANSI_YELLOW) forest = Tile("8", ANSI_GREEN) pines = Tile("Y", ANSI_GREEN) mountain = Tile("A", ANSI_WHITE) water = Tile("~", ANSI_CYAN) ## -------------------- ## -------------------- ## ## --------------- map.py --------------- ## from random import randint from tile import Tile, plains, forest, pines, mountain, water class Map: def __init__(self, width: int, height: int) -> None: self.width = width self.height = height self.map_data: list[list[Tile]] def display_map(self) -> None: frame = "x" + self.width * "=" + "x" print(frame) for row in self.map_data: row_tiles = [tile.symbol for tile in row] print("|" + "".join(row_tiles) + "|") print(frame) ## -------------------- ## -------------------- ## ## --------------- main.py --------------- ## from map import Map import os os.system("") def run() -> None: while True: game_map.display_map() input("> ") if __name__ == "__main__": # considering you have a complete map that you created manually map = Map(5, 5) map.map_data = [ [forest, forest, forest, mountain, mountain], [plains, forest, forest, pines, mountain], [plains, forest, forest, pines, pines], [plains, plains, forest, forest, forest], [plains, plains, plains, plains, plains], ] run() ## -------------------- ## -------------------- ## With these 3 simplified files, you can display your map if you run "python main.py" from the console in the directory where these modules are located. Let me know if this solved your problem!

    • @ElGreco15
      @ElGreco15 21 день назад

      @@orkslayergamedev map.py in display_map row_tiles =[tile.symbol for tile in row] ^^^^^^^^^^^^ AttributeError: 'str ' object has no attribute 'symbol' I don't know if maybe there's a difference in the latest version of python and yours, but this is the exact line that's been stopping me

  • @WinMacLinux772
    @WinMacLinux772 26 дней назад

    add enemy aliens pls in this shooter game!

    • @orkslayergamedev
      @orkslayergamedev 22 дня назад

      I have a huge progress with the game since I last posted devlogs about it, including 7 enemy ships and a boss as well! They are called Drone, Bomber, Cloaker, Pirate, Charger, Trapper, and Flamer. I'll post updates soon :) 🚀

  • @wilsonliu1716
    @wilsonliu1716 28 дней назад

    love it! btw what's theme is this? I like the way of highlighting style

    • @orkslayergamedev
      @orkslayergamedev 22 дня назад

      Thank you! 🙌 I recently switched from this one but I believe it was the One Dark Italic style from the One Dark Theme plugin. Here's the link: plugins.jetbrains.com/plugin/11938-one-dark-theme

  • @ddkrscovers4163
    @ddkrscovers4163 29 дней назад

    Köszi a segítséget! Mindig újra és újra belekezdtek a Python programozásba, de mindig megakadok amikor jön egy nehezebb feladat és a végén feladom. Remélhetőleg ezúttal sikerül megtartani a motivációt. Eddig nagyon tetszik a channel, remélem lesznek még videók. Könnyen érthető a magyar akcentussal. :DD Az elején fogalmam sem volt hogy magyar vagy, aztan a videó felénél klikkelt az agyam.

    • @orkslayergamedev
      @orkslayergamedev 22 дня назад

      Szívesen! 😊 Ne aggódj, gyakran futunk falakba, ami elég gyorsan alá tudja ásni a tanulás iránti elkötelezettségünket. 5 év tapasztalattal sincs ez máshogy - ilyenkor egy lépés hátra és meg kell próbálni vagy máshonnan megközelíteni a problémát, vagy esetleg kisebb lépésekben haladni. Őszintén örülök, hogy rám találtál és hogy tetszik a csatorna! Lassan, de biztosan érkeznek az új tartalmak :) Addig pedig keress bátran bármilyen kérdéssel, igyekszem figyelni a kommenteket minél gyakrabban. Sok sikert a Pythonhoz! 🙌🐍

  • @x4tra557
    @x4tra557 Месяц назад

    Hey, I know it's quite an old video but I have a question. It would be really helpful if you would be able to answer! So, Why did you put 'self' everywhere? What does it do? (I know it's a rookie question but I'm just getting into this stuff)

    • @orkslayergamedev
      @orkslayergamedev 22 дня назад

      Hey there! No worries at all; there are no rookie questions here. I'm happy to help! The keyword self is used in Python class methods to refer to the instance of the object it"self". Whenever you define a method inside a class, you need to include self as the first parameter so you can access the instance's attributes and other methods. When you use self, you're telling Python which object's data to access or modify (again, the data of the object itself). Furthermore, you could name it anything else, self is just a naming convention. This would work as well... class Hero: def __init__(the_object_itself, name): the_object_itself.name = name But when you actually create an object, you don't need to pass that self-referencing argument... hero = Hero("John") When you want to access the name of the hero object like... hero.name ...what Python does is it looks into the object and searches for self.name (or the_object_itself.name in this case). Hope this helps a bit! Let me know if you have further questions, I'll keep an eye out for your comment! 🐍

    • @x4tra557
      @x4tra557 22 дня назад

      You made it so much clearer to understand. Thank you so much!

  • @YDV669
    @YDV669 Месяц назад

    I just realized after watching this video that history truly cheated us by denying us the existence of a knight in full armour wielding an RPG.

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      I definitely forgot about that part - thanks for the good laugh! 😂

  • @djciregethigher
    @djciregethigher Месяц назад

    Wow!! Thank you. That was a quick, concise, and extremely educational demonstration of OOP! Cheers!!

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      I'm glad you found it educational and helpful - part 2 coming soon! Until then, happy coding! 🙌🐍

  • @Balance080
    @Balance080 Месяц назад

    Great vid Ork, very educational and informative, could you help with one error i got at the very end: self.health_bar = HealthBar(self, color="blue") TypeError: HealthBar() takes no arguments | any help would be appreciated, thanks.

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Hey there! Thanks again for the feedback, much appreciated! I replied to your other comment with the solution, please take a look and tell me if it helped! 🙌

    • @Balance080
      @Balance080 Месяц назад

      @@orkslayergamedev Hi Thnaks for the reply, and sorry for commenting on the wrong vid, had both open and commented on that one by mistake. As for my Init(s), i double checked all of them, and all of them are __Init__ (double underscored) no exceptions. still get it. Here's the relevant code: CHARACTER CLASS class Hero(Character): def __init__(self, name: str, health: int) -> None: super().__init__(name=name, health=health) self.default_weapon = self.weapon self.health_bar = HealthBar(self, color="blue") HP CLASS def __init__(self, entity, length: int = 20, is_colored: bool = True, color: str = "") -> None: self.entity = entity self.length = length self.max_value = entity.health_max self.current_value = entity.health self.is_colored = is_colored self.color = self.colors.get(color) or self.colors["default"] I don't think any typos are causing this, if you have any idea i would appreciate it? Thanks for your time. EDIT: one very strange thing is that once hover over the color in "HealthBar(self, color="blue")" it says "(function) color: any", but the init in hp class says "(parameter) color: str". This is the only place this happens all other inits. are correctly taking paramaters and all calls are sending paramaters to the class constructor, is it possible there's some inbuilt color function that's colliding with my paramater

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      No problem buddy, hope we can figure this out. This issue is strange indeed. I copied the snippet you sent me to a fresh file and added minimal extra code to make it exectuable. When I hover over to the color argument of HealthBar in Hero, I get the right and expected hints. Please copy the following to a new file and try to run it with python <name of the file.py> in the console. If all is correct, you should see no messages on the screen. Give it a try. class HealthBar: colors: dict = {"red": "\033[91m", "purple": "\33[95m", "blue": "\33[34m", "blue2": "\33[36m", "blue3": "\33[96m", "green": "\033[92m", "green2": "\033[32m", "brown": "\33[33m", "yellow": "\33[93m", "grey": "\33[37m", "default": "\033[0m" } def __init__(self, entity, length: int = 20, is_colored: bool = True, color: str = "") -> None: self.entity = entity self.length = length self.max_value = entity.health_max self.current_value = entity.health self.is_colored = is_colored self.color = self.colors.get(color) or self.colors["default"] class Character: health_bar: HealthBar def __init__(self, name: str, health: int, ) -> None: self.name = name self.health = health self.health_max = health self.weapon = "" class Hero(Character): def __init__(self, name: str, health: int) -> None: super().__init__(name=name, health=health) self.default_weapon = self.weapon self.health_bar = HealthBar(self, color="blue") if __name__ == "__main__": char = Hero(name="dummy", health=10) assert char.health_bar

    • @Balance080
      @Balance080 Месяц назад

      @@orkslayergamedev Done, it does work and show no error messages, only needed to add 2 more underscores to the if _name_ (i assume the youtube commets are deleting some underscores) As for this ""self.health_bar = HealthBar(self, color="blue")" hovering over color=blue now correctly shows "(parameter) color: str" and not function

  • @Balance080
    @Balance080 Месяц назад

    Hi Ork great vid and very educational and helpful, however i got a issue at the very end: Traceback (most recent call last): File "d:\Desktop\Python\main.py", line 4, in <module> hero = Hero(name="Hero", health=100) File "d:\Desktop\Python\character.py", line 24, in __init__ self.health_bar = HealthBar(self, color="blue") TypeError: HealthBar() takes no arguments Any ideas how or why this happened, any help would be appreciated, used Python 3.10.9, it worked until the hp bars were added and my code should be the same as the one in the vid, i compared it a couple of times and saw no significant differences.

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Hey, thanks a bunch for the feedback! I think I see the issue. Based on the line you showed (File "d:\Desktop\Python\character.py", line 24, in _init_), it seems there might be a typo in how you defined the constructor method. You should use double underscores on both sides (__init__) instead of _init_. Because it's written as _init_, Python doesn't recognize it as the constructor, and it defaults to a built-in __init__ method that accepts no arguments. Hence the TypeError. Try changing _init_ to __init__ in your HealthBar class, and that should fix the issue. Please let me know if this resolves the problem! Cheers! 🐍

  • @gamerchristian3679
    @gamerchristian3679 Месяц назад

    Subscribed, finnaly understand classes, thanks mate!

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      That's fantastic to hear! 🙌 Thanks for subscribing and happy coding! 🐍

  • @joekhames4161
    @joekhames4161 Месяц назад

    Woooow I am 5 min in and it's amazing how it makes sense and easy it's to understand, keep up the good work ❤

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Thank you so much! ❤ I'm happy to hear it's helping you out. Keep your eyes open as there's more to come soon! 🙌🐍

  • @tjb3171
    @tjb3171 Месяц назад

    awesome, thanks!!

  • @user-jx1ke4ek1g
    @user-jx1ke4ek1g Месяц назад

    no code????

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      I really appreciate your interest in the code! The reason I haven't included it directly is that I wanted to upload a clear and comprehensive tutorial out of this game. Unfortunately, with all the inquiries and responsibilities I've been managing, I haven't been able to wrap it up as quickly as I hoped. Thanks for your patience and understanding!

  • @cleomenezesjr
    @cleomenezesjr Месяц назад

    Just understood it now

  • @apkaless
    @apkaless Месяц назад

    wow thats the video i were waiting for, thanks man

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      So glad to hear that! I appreciate your feedback! 🙌

  • @micha5781
    @micha5781 Месяц назад

    Instant sub mode: ON

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Awesome, welcome to the channel! 🙌 Thanks for subscribing! 🐍

  • @emirhancalskan665
    @emirhancalskan665 Месяц назад

    good video😎

  • @thomaskottke6112
    @thomaskottke6112 Месяц назад

    Nice video, I appreciate you example was more realistic than a lot of other class tutorials I have seen.

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Thank you! I’m happy to hear you found the video useful! 🙌 Stay tuned for more! 🐍

  • @theosouza165
    @theosouza165 Месяц назад

    can you explain the: else ' ' :part of the code in the draw method for health bar. self.color if self.is_colored else '' im confused on exactly what this bit of code is doing

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Hey! I apologize for the late reply, hope you figured out by now. If not, don't worry, let me explain. The expression you mentioned decides if the text after that row (the bars of the health bar) should be colored or not. If the self.is_colored is True, then the color code will be applied, coloring the health bar. Otherwise, if the self.is_colored is False, we'll leave an empty string there that does nothing. This way the bar won't be colored. Let me know if it's clear for you now! 🐍

  • @switbitz
    @switbitz Месяц назад

    I love how you implemented game development in a python oop tutorial.

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Thanks a lot! My aim is to make coding fun! 🐍

  • @valfredovictor
    @valfredovictor Месяц назад

    In this line, "flag = pygame.SCALED" will scale all elements drawn on the screen to the monitor size, preserving the coordinates as if they were in the original resolution, it works in the entire code # Windowed mode : screen_surface = pygame.display.set_mode(size = (original_resolution.w, original_resolution.h), flags = pygame.SCALED) # Fullscreen mode : screen_surface = pygame.display.set_mode(size = (original_resolution.w, original_resolution.h), flags = pygame.SCALED | pygame.FULLSCREEN)

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Exactly! Using pygame.SCALED allows the window to automatically scale all drawn elements to fit the monitor size while maintaining the layout and proportions set for the original resolution. This feature is particularly useful when you want your game to be adaptable to different screen sizes without manually adjusting every element. Fun fact: Did you know that you can use pygame.display.toggle_fullscreen() to dynamically switch between fullscreen and windowed modes? 🐍

    • @valfredovictor
      @valfredovictor Месяц назад

      @@orkslayergamedev thanks bro you help me a lot, love your videos <3

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      @@valfredovictor I'm really happy to hear this! More stuff coming soon, happy coding to you 💚

  • @JasperPloum
    @JasperPloum Месяц назад

    here is the full bar icon he used █

  • @veljkopocuca1907
    @veljkopocuca1907 Месяц назад

    can we get the code? mby github :C

  • @PabloSanDev
    @PabloSanDev Месяц назад

    Thank you for this great tutorial, i'm very happy with it.. this game logic, architecture is exactly what i wanted to learn i followed along by using C# to challenge myself amazing again tysm.

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Wow, that was surely a great challenge, good job! I appreciate your feedback and thanks for joining us! 🙌🏻

  • @bence8103
    @bence8103 2 месяца назад

    1000%-ig biztos vagyok abban, hogy magyar vagy. :D

  • @goldengungaming4248
    @goldengungaming4248 2 месяца назад

    leaving this for lazy people

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Sure buddy, thanks! Be sure to check out my github repo if you're tired of typing, I have the whole project uploaded 🙌🏻

  • @goldengungaming4248
    @goldengungaming4248 2 месяца назад

    biome = { "plains": { "t": "plains", "e": True}, "forest": { "t": "forest", "e": True}, "fields": { "t": "fields", "e": False}, "town": { "t": "town", "e": False}, "hills": { "t": "hills", "e": True}, "mountain": { "t": "mountian", "e": True}, "cave": { "t": "cave", "e": True}, "shop": { "t": "shop", "e": False}, "bridge": { "t": "bridge", "e": True}, "major": { "t": "major", "e": False}, }

  • @goldengungaming4248
    @goldengungaming4248 2 месяца назад

    map = [["plains", "plains", "plains", "plains", "forest", "mountain", "cave"], # y = 0 ["forest", "forest", "forest", "forest", "forest", "hills", "mountain"], # y = 1 ["forest", "fields", "bridge", "plains", "hills", "forest", "hills"], # y = 2 ["plains", "shop", "town", "major", "plains", "hills", "mountian"], # y = 3 ["plains", "fields", "fields", "plains", "hills", "mountian", "mountian"]] # y = 4

  • @nicj_art
    @nicj_art 2 месяца назад

    I really don't like this tutorial. As a beginner this really glosses over a lot of fundamentals that go way over my head. Would not recommend using this unless you already have a fundamental understanding of coding, python and how to use its modules in general

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      Thank you for sharing your feedback, even if it leans towards the negative side. Starting your coding journey with OOP without a solid understanding of programming fundamentals is not the most effective approach - I've been there too and had to try again with the topic later. I encourage you to look for beginner-friendly resources and establish a strong foundation before delving into more advanced topics like OOP. Once again, thank you for taking the time to provide feedback. Good luck! 🐍

  • @zd4w9
    @zd4w9 2 месяца назад

    This video really helped me understand to the point where I could go back and find my mistakes on my own. Thanks a lot!!

    • @orkslayergamedev
      @orkslayergamedev Месяц назад

      I'm glad my video was helpful to you! Good luck with coding! 🐍