Adding Animals with COMPLEX AI and a new weapon to my game! - Nanoplanet Devlog 2

Поділитися
Вставка
  • Опубліковано 22 гру 2024

КОМЕНТАРІ • 145

  • @JayZireael
    @JayZireael 2 роки тому +29

    Your pathfinding algorithm is super interesting! I love programming stuff like that

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +3

      That’s honestly my favorite type of stuff to program

    • @dustinmetzger
      @dustinmetzger 2 роки тому +2

      @@ZacMarvinGameDev Agreed, that’s a super interesting solution. I’d happily watch a more in depth explanation of the code if you ever decide to make it. I can easily see something similar as an implementation for npc dynamic pathing and interactions.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      @@dustinmetzger good to know! I may make a AI tutorial video at some point

  • @cripplebum4792
    @cripplebum4792 2 роки тому +12

    I love devlogs where you actually learn new stuff along with the dev, rather than just "look what I've added". Definitely earned a sub.
    Also, your voice is pleasant, not cringey. :p

  • @VoltecGames
    @VoltecGames 2 роки тому +3

    Hi! I'm a game dev too and wanted to say, that the AI shown in your video is very well made!

  • @diegoteran
    @diegoteran 2 роки тому +15

    Love the animals and the AI! This game has a bright future :)

  • @Skeffles
    @Skeffles 2 роки тому +5

    It's awesome seeing AI running about the game world. It really adds life to your game!

  • @goosechasing
    @goosechasing 2 роки тому +3

    I'm a fellow indie developer. Your game looks awesome. Love the space theme and your sprites
    I'm currently also making a top down pixelart farming game.
    I'm looking forward to following your game dev series.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      That’s awesome! I’d love to see your game as well! Are you making videos on it?

  • @WorldAquariumSingapore
    @WorldAquariumSingapore 2 роки тому +2

    cool keep up the good works

  • @tbage2210
    @tbage2210 2 роки тому +2

    I'm quite jealous of this. Been working on my game for nearly 18 months soon to release.. but this project is so much better planned out. What you're doing is insanely ambitious and I can easily see it taking 2 - 3 years if you're doing it solo.
    I agree.. doing art is a lot of work. I love detail, so my game has 3 zones, all with their own art, 32 buildings with 3 "overlays" (sand, grass, vines) and some have animations. Even though I've done hundreds of frames I'm pretty sure your game already has more than mine. Really great work.
    Good luck!

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      That’s so cool! Good on you for sticking with your game for 18 months. I planned on spending a year on this game before release but you know they always say to double time estimates so I’ll probably spend between 12 months and 24 months. It really just depends on how much I can get done outside my day jobs

    • @tbage2210
      @tbage2210 2 роки тому +1

      @@ZacMarvinGameDev Yeah I wouldn't be surprised if this keeps you occupied for a very long time. Nothing more satisfying than making progress all of your own back though!

  • @walldoffstudios
    @walldoffstudios 2 роки тому +1

    Very enjoyable devlog, the AI was very satisfying as well! :)

  • @jemios
    @jemios 2 роки тому +3

    Very good job! I' d love to play this game.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Thank you! Be sure to join the discord. I’ll be sending out alpha versions of the game at the next devlog

  • @thenapoleonlover113
    @thenapoleonlover113 2 роки тому +1

    These kind of videos keep me motivated. Thanks!

  • @blameyourm8519
    @blameyourm8519 2 роки тому +2

    AI always fun to watch, hope you improve it even more, never enough

  • @Bo-kq8tn
    @Bo-kq8tn 2 роки тому +1

    This looks like a cool spin on a farming/virtual genre game, the plants remind me a bit of vilmonic :) and THANK YOU for letting the player pet the animals, but I really hope a petting animation will be added in the future. It feels strangely impersonal to just run up to an animal and stare at it to pet it haha. Even if the player character waved their hand in the air a little bit relatively near the animal, it would be nice :)
    The explanation of pathfinding was also really interesting and easy to understand! Same with state machines, it just made me realize I've been unknowingly coding them forever with FF12's technicks system, omg.
    Also, will players ever be able to automate filling the food/water bowls? It sounds nice to do for a little while, but I worry it may become more chore-like than fun. It would be nice to have the equivalent of a stardew valley sprinkler upgrade. So feeding/watering animals is still something that needs to be done by hand occasionally, but the player could work to earn their "free time" back through earning automation items somehow

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Great points! I definitely plan to add a pet animation. And as far as automation goes, I plan on having drones that fly around and water and refill bowls :)

  • @abbyblancett4070
    @abbyblancett4070 2 роки тому +2

    Dude this is awesome 😁 I absolutely love the idea

  • @TheDahevos
    @TheDahevos 2 роки тому +8

    Looks fantastic ! As for me, making one sprite is so hard that when I see all the frame that you had to make, that’s just demotivating :-( anyway congrats and looking forwards your progress !

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +5

      Don’t be demotivated. That art part can be fun! Just remember to account for it in planning how long it will take to make the game

  • @luizinniziul2976
    @luizinniziul2976 2 роки тому +1

    your game looks so full of life! love it.

  • @diamonddrawsthegoat
    @diamonddrawsthegoat 2 роки тому +2

    Hey! Just found your channel. I gotta say this looks awesome! This game has a bright future.

  • @OCTsecond
    @OCTsecond 2 роки тому +1

    Love the art style, really want to play your game !

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Thank you! Hopefully I’ll have a demo available by the next devlog

  • @durrium
    @durrium 2 роки тому +1

    Your art is soooo nice :D love it

  • @booleancube01
    @booleancube01 2 роки тому +1

    those sprites look fantastic

  • @uerbastudio
    @uerbastudio 2 роки тому +1

    Keep it going mate, It looks great!

  • @myhead3
    @myhead3 2 роки тому +1

    this was well thought out , n explains a lot about ai.

  • @jonaspot8562
    @jonaspot8562 2 роки тому +1

    Bro, this is AWESOME!!! Keep it up!

  • @surprisestudiosgames
    @surprisestudiosgames 2 роки тому +1

    love the art style! :)

  • @boerbol9422
    @boerbol9422 2 роки тому +1

    Super interesting!! Subbed immediately!

  • @CumuloWinter
    @CumuloWinter 2 роки тому +2

    There's a way to optimize the animals color part. Instead of making sprites for each color, you could make a single one and use shadergraph to make a color switching shader along with materials for each color. That's how I go about skintones in my own game. Making a spritesheet for each tone drove me crazy way too early
    Hope this helps!

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Thank you! I’ll definitely consider switching to a process like that!

  • @stickyhairlesscats
    @stickyhairlesscats 2 роки тому +5

    Good stuff! You could have reduced the amount of art needed by drawing each animal once and then using a shader to replace the colors based on type.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Thanks I actually have a plan to implement a shader like that

  • @RobLang
    @RobLang 2 роки тому +5

    Really good descriptions of your algorithms and improvements! How often do the animals recalculate the path finding? On change of state or is it more often?

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      I have a variable in there that tunes how often it updates the pathfinding, I want to say it’s about 5 times a second right now. But I can tune that as I see fit. Thank you for the question!

  • @casinhamagica6383
    @casinhamagica6383 2 роки тому +4

    now make them able to feel real pain

  • @STARmod
    @STARmod 2 роки тому +1

    U could have done just 1 grayscale sprite variation for each animal and then tint the animals by a custom material shader to do the rest of them.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Yea I thought of that but with contrasting colors the tint would have applied to the entire sprite. I have since thought about separating the eyes for instance and any body parts that would be a different color and then tint individual body parts. But another big factor I considered is my game is using a very strict color palette and if I did the tint method, I would like be no longer sticking to that

  • @ggrandfatherr2294
    @ggrandfatherr2294 2 роки тому +3

    How far can the animals wander? I'm wondering how they'd be able to find other species if they're far away

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Good question. Currently They wander for 7 seconds in any direction and then stop and then wander for 7 seconds in another random direction. That is until one of the higher priority needs/behaviors take place

  • @folkusonme
    @folkusonme 2 роки тому +1

    a hybrid of ray and a*
    that's so cool

  • @Tenduere
    @Tenduere 2 роки тому +1

    It was probably said before, but it would be easier to make whitish sprites with the zones with different colors divided (sheep skin, wool, eyes, nails etc) then add the colors in-code, this way you would've had much more variation with a bunch less work

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Thank you! It has been mentioned and I’ve since built a shader to recolor them for me

  • @haytalktome
    @haytalktome 2 роки тому +1

    Hay zac i was just wondering where you said you had to draw each color variation for the sprites couldn't you use a shader to change it's color dependent on which variation it is?
    Also sidenote i like the idea of the animals herding i don't think im aware of any games which perform this behaviour - it's a nice detail.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Thank you! I like the herding mechanic too. And yes others mentioned using a shader as well. I now have a shader built from shadergraph to handle color variants. I'll probably mention something about it in the next video

    • @haytalktome
      @haytalktome 2 роки тому +1

      @@ZacMarvinGameDev awesome! i look forward to hearing about it ;)

  • @BruPezao
    @BruPezao 2 роки тому +1

    Really great work on the game and video! Just one thought: should I concern with the animals breathing oxygen? 😂

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Haha actually the lore of the game will be that the animals still breathe oxygen, there is just much less oxygen on that planet.

  • @zachariusd6473
    @zachariusd6473 2 роки тому +1

    When this game is released, I'll probably just spend it all getting and taking care of animals

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Haha 😂 that’s one way to play!

    • @zachariusd6473
      @zachariusd6473 2 роки тому +1

      @@ZacMarvinGameDev Also, I see you have a dome you can expand... what if you could make separate domes and hallways between them? This could let you lure, when added, enemies and have animals and enemies in your base but separated!

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      @@zachariusd6473 yup I actually plan to add base building elements in the devlog after next!

  • @daviOpombo
    @daviOpombo 2 роки тому +1

    you could use the same colorless sprites to change in the engine itself using urp

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Thank you! I’ve actually just added a shader to my game that recolors them for me. Wish I would of thought of it before this video

    • @daviOpombo
      @daviOpombo 2 роки тому

      @@ZacMarvinGameDev Even very good as you think of doing this AI without using navmash , it really gives a touch that was better dedicated

  • @canadianblitz3468
    @canadianblitz3468 2 роки тому

    I believe I saw a video tutorial on animating sprites in grayscale, and then the color is programmed via shaders. That way you can do the animation once and apply as many different color themes as you want

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Others mentioned using a shader as well. I now have a shader built from shadergraph to handle color variants. I'll probably mention something about it in the next video

  • @thanosks
    @thanosks 2 роки тому +2

    nice

  • @alexbrandt
    @alexbrandt 2 роки тому

    Have you needed to update your pathfinding logic at all? I implemented something very similar, but run into issues when there are tight corners, or small maze-like corridors.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      For my use case there won’t really be any maze like corridors it’s more of an open world and map so I haven’t encountered those issues. I would lean more towards a star for that use case

  • @alexchesterman1757
    @alexchesterman1757 2 роки тому +1

    check out procedural animation. you build the 3d animal model. and animate it with code. you can get a pixelated style by reducing the camera resolution. and a toon shader for style if u want. its really cool stuff

  • @nothanks9159
    @nothanks9159 2 роки тому

    I may be missing something (and apologies if it's already been asked), but if you wanted non-grid-based pathfinding, couldn't you use a probabilistic roadmap and then A* to pathfind from there? It's possible this wouldn't be as efficient as your algorithm since it uses a larger graph and a lot of random sampling, but on the other hand the algorithm is less likely to get stuck in tight spaces with no food easily visible.
    That all said, great work!

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      I've never header of probablistic roadmaps before, but I did some research after looking at your comment and I think you're right. It might be less efficient but better and getting out of tight spaces. I'll probably stick with what I have because I dont think its too big a deal if the animals cant find the food in tight spaces and I dont want to sacrifice their performance. BUT i may use this pathfinding algorithm for enemies in the future. Thank you for bringing it up!

  • @kiyasuihito
    @kiyasuihito Рік тому +1

    10/10 - "can pet animals"

  • @irishbruse
    @irishbruse 2 роки тому +1

    You should really have made the animals gray scale and used a shader to set the pallet of the animal would save you redrawing the sprites every time lol

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Yea I thought about it. But I have a strict color palette and contrasting colors. So it would take a lot of work to split the sprites up into contrasting parts and precision to get everything to look right and match the color palette

  • @RialuCaos
    @RialuCaos 2 роки тому

    You might look into making/copying a palette swap shader for sprites so that you don't have to create different sprites for different colors. Might save you some time in the long run.

    • @RialuCaos
      @RialuCaos 2 роки тому +1

      Just read the comments and realized like 5 other people suggested the same, my bad.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Thanks! I hadn’t considered a palette swap *shader* actually. I think most other comments are just referring to tinting the entire sprite with the image color attribute. I wonder if there is a way to replace colors with specific colors from my pallette with a shader 🤔 I’ll look into it

    • @RialuCaos
      @RialuCaos 2 роки тому +1

      @@ZacMarvinGameDev There is a way, because I've done the same thing in Unity in my projects. I had to look up a few resources to get it working. I know that simply color-tinting isn't enough to get the right colors due to how different colors require different shadows, midtones, and highlights. (Plus it doesn't allow for selective color-swapping for patterns and such.)
      Eventually what I landed on was a shader which reads the red values of the original palette and uses those values as indices on a texture map to replace them with different colors from the texture map. And then you can use another index for multiple palettes on the same texture.
      If you Google "How to Use a Shader to Dynamically Swap a Sprite's Colors", that tutorial might help get you started.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      @@RialuCaos thanks so much! I’ll definitely dive into this!

  • @kacperxt371
    @kacperxt371 2 роки тому +1

    wouldn't be easier to make them grey and color them using code?

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Yea it would but it wouldn’t match the color palette perfectly and some sprites are contrasting colors. So I’d have to split up the sprites into pieces based off contrasting colors. I did consider that though

  • @EnderElohim
    @EnderElohim 2 роки тому +2

    You don't need to draw left and right movement so you have up, down and either right or left because mostly you can flip on X to make it looks like other direction. So it would be 324 animation

  • @nickculpin
    @nickculpin 2 роки тому +1

    you could do a color replacement script, that would save all the color swaps in your sprite sheets. You wouldn't need to x4 every thing. easily done in python or maybe you could do it in the render. Anyways good stuff, +1 sub.

  • @wiesiolak
    @wiesiolak 2 роки тому +1

    There is color replacement in Aseprite :D shift + R. Hope next time it'll save You a while ;)

  • @canadianblitz3468
    @canadianblitz3468 2 роки тому

    Are you going to introduce any sort of eugenics or gene-manipulation?

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Honestly now that I know you can manipulate sprite colors with shaders, I have some ideas on how to make some really cool creatures with shaders and splitting the sprites into body parts. It's definitely something I'm considering

  • @curioSEOty
    @curioSEOty 2 роки тому +1

    sounds super cool, is your AI open source?

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      I’m not officially sharing it anywhere but if you’d like to see it, join my discord and I’ll send it to you there

  • @zachariahm.kemper7406
    @zachariahm.kemper7406 Рік тому +1

    Why didn't you just make one set of each animal and change the color palettes

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  Рік тому

      That’s pretty much what I did. I drew each animal the did a color replacement on each color for the different variations. Since then though, I’ve created a color replacement shader in unity so it does all this for me in the future

  • @he2he
    @he2he 2 роки тому +1

    A* works on any graph an is not restricted to any kind of grid.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Hmm, care to explain? From every implementation I’ve seen, you are just comparing distances to surrounding tiles

    • @tbage2210
      @tbage2210 2 роки тому

      Even though it might not make grid like movement all the time, is it not the case you still need distances and therefore split the world into some kind of grid? If you wanted complicated stuff like steepness on hills then you'd obviously make the distances higher but without somewhere for it to check it won't be able to find its way around.
      I've implemented this before, I had to generate a grid for the algorithm but the sprites still move smoothly across the grids.

    • @he2he
      @he2he Рік тому

      @@ZacMarvinGameDev I just found a video called "The hidden beauty of the A* algorithm" by polylog which gives a pretty good intuition for how A* works on any graph.

  • @davekachel
    @davekachel 2 роки тому +1

    these are very earthly animals for a foreign planet

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      There’s a reason for that, you will find out about later!

  • @clipboardchannel99
    @clipboardchannel99 2 роки тому +1

    I love cute animals 🥰

  • @aniceto11
    @aniceto11 2 роки тому +1

    if you used a single sprite per species and, at runtime, you changed the color pallete using programming, maybe your work would be easier.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      That is true and that is something I considered and tried to implement. I couldn’t get the contrasting colors to cooperate. But maybe if I split up the sprite into pieces by color like you mentioned it might work out. Ill be implementing some more colorful ai in the next couple devlogs. I’ll give it another try. Thanks for the idea!

  • @TarkTheConlanger
    @TarkTheConlanger 2 роки тому +1

    the whole process of refilling the food/water bowls for animals seems really tedious to me? maybe make so that once you put water into the water filtering machine, it empties itself automatically into a neighboring empty water bowl?

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Good point! I think it could definitely use some refinement. Maybe it just automatically adds the filtered water to the players inventory instead of them having to click on it again. Definitely some improvements can be made

  • @RafaMartinelli
    @RafaMartinelli 2 роки тому +1

    Love what you’ve done! Your game has a lot of potential!
    On the dopamine hook idea, I really hope you look into how bad that actually can be for people’s mental health and overall wellness, and that you decide on a more compassionate strategy to keep your players interested!
    That is my wish for the gaming industry in general, stop abusing human psychology and actually leverage it for the players’ benefit!

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      I 100% would not do anything predatory or negative with human psychology. It was more just a play on words. What I really meant is I’ll be building out the core gameplay loop. Nothing truly addictive in nature. My game will have 0 elements of gambling, addiction, microtransactions, etc. I appreciate your concern with the mental health subject though. I actually made a game for a Xbox game internship program this spring, and it was solely based on mental health awareness

    • @RafaMartinelli
      @RafaMartinelli 2 роки тому +1

      That’s fantastic! Happy to see developers aware of this 😊

  • @radpunch
    @radpunch 2 роки тому +2

    an interesting technique that could save you a ton of time in the future would be using lookup textures to procedurally color your animals based on a gradient texture. This would allow you to only create one set of animations per animal type, with potentially infinite color varieties.
    essentially you would create your animals in greyscale, with each value corresponding to a pixel on a gradient texture.
    some good videos to explore this type of thing:
    ua-cam.com/video/KfphtLRoUB0/v-deo.html
    ua-cam.com/video/HsOKwUwL1bE/v-deo.html

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Thank you! Others have recommended that as well. I’ve now got a working shader that turns sprites from gray scale to colored sprites

  • @Tanicorn
    @Tanicorn 2 роки тому

    In terms of the animal sprite sheet you might've been better off creating modular sprites. Especially since some of them only have a color change which you could just change with code. This method cuts down a lot of time on simple repeated sprites.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      Thank you, I’ve since built a shader to do the recoloring

  • @ami7mina
    @ami7mina 2 роки тому +1

    HOW CUTE! your game.. wish I am good at coding. ZERO level using code.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      Thank you!!

    • @ami7mina
      @ami7mina 2 роки тому +1

      @@ZacMarvinGameDev You can also make them cuter since they are aliens. make them like stuffed toys.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому +1

      @@ami7mina great idea!

  • @Wylie288
    @Wylie288 2 роки тому

    How did you get 36 animals? You have 9. You drew 250 frames. And recolored them 3 times with tools that can do them all in a matter of a minute or two. In fact. You didn't even need to do that. That could have been a simple script.

    • @ZacMarvinGameDev
      @ZacMarvinGameDev  2 роки тому

      9 animals * 4 color variations = 36 animal variations. It may be quick(ish) to replace colors in the spritesheets (which is what I did) but hooking up the animations was time consuming. Also I didn’t show all the animations in the video, only about half. I have since replaced this workflow with a shader that replaces the colors. This sped up the process quite a bit. Wish I would have learned this method before that devlog though

  • @grind-v3s
    @grind-v3s 9 місяців тому +1

    Oh finally my sister.got mad at me when I kept petting the cats in Hogwarts legacy instead of letting her have a.turn on here account and now a game where it's important to pet them yaaa👌