Programming Particle Effects in my Game Engine

Поділитися
Вставка
  • Опубліковано 1 лис 2022
  • Devlog video about "Homegrown", a casual farming game I'm creating using my own engine. This time I'm implementing particle effects into the game!
    Support the channel on Patreon and get access to the code for this game, the city-builder, and Equilinox:
    / thinmatrix
    My previous game "Equilinox":
    store.steampowered.com/app/85...
    You can follow the progress of the game on my social media:
    Twitter: / thinmatrix
    Instagram: / thinmatrix
    Facebook: / thinmatrix
    Trello: trello.com/b/W3zkIJTM/farm
    Email: thinmatrix@gmail.com
    Background music by Jamal Green:
    open.spotify.com/artist/50jTM...
    Outro music by Dannek Studio:
    / dannekstudio
    #devlog #Homegrown
  • Ігри

КОМЕНТАРІ • 406

  • @ThinMatrix
    @ThinMatrix  Рік тому +361

    Sorry it's been a while since the last upload! I was on holiday at the start of October and then had an annoying cold for a week or so, so progress was a little slower than usual last month. Back on track now though!

  • @10produz90
    @10produz90 Рік тому +288

    Those 3D particles look awesome. The game feels much more "alive" with them

    • @Anto-xh5vn
      @Anto-xh5vn 10 місяців тому

      Absolutely mate

  • @dukereg
    @dukereg Рік тому +174

    One bit of feedback about the placeholder digging effects when clearing the grass (as someone who has been doing it for real this morning 😄): when you take a green lawn and dig it up, you're usually lifting chunks of grass/soil held together by grass roots, which comes apart in chunks. It has relatively moist (dark& heavy) soil crumbling down off of it. It's full of worms and gives an impression of fertility and richness and life. Dry-looking dust effects billowing upwards give an impression of dead, infertile dirt that clashes with the green grass and probably with the mood of the game. Just my 2¢.

    • @Selrisitai
      @Selrisitai 9 місяців тому +1

      I'm surprised that this didn't get a response, at least a heart, as it's one of the most lucid and meaningful responses.

  • @KestrelQ
    @KestrelQ Рік тому +3

    The leaf on Rufus' face as he looked at the camera melted my heart

  • @RobertjrPlays
    @RobertjrPlays Рік тому +110

    Really nice work on the particle system, especially the cleanliness of the new code! Only thing I would suggest is for harvesting plants, you should have an animation of the plant being pulled up instead of particles that make it look like its being ruined/trashed.

    • @ThinMatrix
      @ThinMatrix  Рік тому +54

      Thanks! And yess, I definitely agree. I'm not really sure how I'll do that with the wheat, but I was planning on doing that for plants like the carrots and turnips.

    • @RobertjrPlays
      @RobertjrPlays Рік тому +3

      Awesome, thank you so much for the response!

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

      @@RobertjrPlays you’re welcome

  • @heavyhand27
    @heavyhand27 Рік тому +87

    The particles are looking amazing and really satisfying too. Can't wait to hear the sound effects to go along with them! I'm already imagining them each time you show the particles off in the video :))

  • @kurtisbradley5724
    @kurtisbradley5724 Рік тому +26

    Honestly, I'm just mezmerized by the beautiful morph shots at 5:55 and 10:27

  • @garytheblobfishdev
    @garytheblobfishdev Рік тому +53

    ThinMatrix, I want to say thank you for your content. The content you produce now gives me and others tonnes of insipiration for programming and your old OpenGL tutorials gave us a foundation for doing so. I know that I still have a lot to learn and hopefully I will get there someday making games to a similar standard to what your games are made at. Thank you!

  • @smjonas8616
    @smjonas8616 Рік тому +24

    To make the code for the different particle components even nicer, you could use the builder pattern so you can simply chain the different effects :D

    • @leoingson
      @leoingson Рік тому +2

      That's exactly what he does? He takes a collection of (component)classes, and calls all their update() methods one after another.

    • @sky01james28
      @sky01james28 Рік тому +5

      @@leoingson I think they mean “make the addComponent method return the instance instead of void” but it really doesn’t make a difference when the components are read from a file anyway

  • @marcruijs1039
    @marcruijs1039 Рік тому +9

    Holy cow did I ever underestimate the usefulness of particle systems. I never felt like they added much, so I never bothered with them. But seeing yours now, man, that’s a whole new level of immersion. Well done mate!

  • @jackdavenport5011
    @jackdavenport5011 Рік тому +2

    Seeing a glimpse of Socuwan again after all this time was very cool :)

  • @mathewmccloskey8242
    @mathewmccloskey8242 Рік тому +2

    Rare Socuwan mention! I started watching during its development

  • @megahombre24
    @megahombre24 Рік тому +2

    I hope BusfahrerWalter is doing allright, I miss him.
    Awesome video once again, so interesting and chill, I can't get anough of it, keep up the great work.

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

    That was an impressive pepper. With the name of "Homegrown" I'm guessing there will be a restaurant "frontend" with some kind of cooking in the game eventually? That would be a fun gameplay loop.
    Grow veggies > store in the kitchen > cook from what you have > serve guests
    It would just be your character to start, but you'd have to hire staff to cater to your garden, man the grills, serve guests, etc.

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

    I would suggest adding the ability to render text as a particle effect.
    Example of use: when you harvest corn, an additional particle effect will render "+2 corn" moving up the screen and fading away.

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

      Yeah I agree, something like that would definitely be good. Thanks!

  • @At-M
    @At-M Рік тому +2

    Just a quick idea for later, add the ability to set specific amounts of particles, regarding to the performance setting people choose.
    For example: If you have a good pc and set "particles" to high, it has 100% of the particles, medium has 50% and low something like 15% or so.
    I've had a few games just bog down on FPS when the amount of 3d particles is not correctly scaled with performance settings

  • @Keatosis_Quohotos
    @Keatosis_Quohotos Рік тому +3

    I love how these videos are one part Dev log, one part lifestyle vlog, with really high production values across both

  • @JohnSheppard92WasTakenThxYT
    @JohnSheppard92WasTakenThxYT Рік тому +24

    Nice system! I think you could improve it even further by implementing a way to randomize parameters within a given range. What you have basicly done here is creating a fairly simple way to make prefabs for your particle effects with the files you create for them. If you wanted to, at a later time, add some variation to an effect, it could mean you having to create multiple versions of it and choosing one of those versions each time you play the effect. If you instead implement some sort of way to put ranges for the parameters instead of hard numbers, you could make every particle effect just a little bit different. For example having the number of particles chosen at random between 50 and 100 instead of a fixed 75. You'd still have a great amount of control over all your effects but they would feel different each time without you actually having to create different versions of them. Maybe you already have added something similar to this though, since I do see some properties with "average" in their name. Hope it helps anyways :)

    • @ThinMatrix
      @ThinMatrix  Рік тому +15

      Thanks, and yes, I do already have support for that with most of the settings such as size, speed, life length etc. Most components have an average value and standard deviation value which I use to create some randomness. I haven't done it yet for the particle count though - I'll do that!

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

    I love the dust hiding the floor and also the mesh update; also, just make every vfx 3D, they look like they are part of the world, and it's so nice watching them react to the environment...

  • @erc0re526
    @erc0re526 Рік тому +4

    I love that you're making your own stuff, in Eclipse, Java, tools you know, tools that everyone online would tell you not to use because "they aren't performant" (bullshit), "old" (not true) and "not a game engine" etc. You don't let anything of the sort stop you, and you're making a beautiful game! Also those particles look cool. It's part of the polish people love to see in a game, I think

  • @morris4622
    @morris4622 Рік тому +8

    beautiful work, u never fail to impress us.

    • @ThinMatrix
      @ThinMatrix  Рік тому +2

      Thanks!

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

      @@ThinMatrix No you thanks for the awesome content!

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

    I'm sure it has been mentioned, but i LOVE the fact that this game is called "Homegrown" - its about growing plants at home, in an engine that was "homegrown". You're a genius, awesome video

  • @edsilver
    @edsilver Рік тому +6

    Your description of your component implementation makes me so excited to code something! Would love a video or two on the overall class structure of the game; would be invaluable. Otherwise, thanks for these calming videos, the farming game looks better everyday :)

  • @JN-hs5xl
    @JN-hs5xl Рік тому +3

    I love that you are making your game in Java. If you were to ask on any forum people would tell you Java is a terrible choice and you should use C++ instead (or Rust nowadays would probably be recommended). But Java is fun to use, IDEs work amazingly well, the performance is good.

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

    Hot reloading for your engine (will make you massively more productive, and should be a video!)
    1. Store your config files for your game engine in JSON file (or YML, doesn't really matter)
    2. In your game engine, instantiate your systems by reading from the config files
    3. When your game starts, run a file watcher to detect changes in your config files
    4. If a change is detected, iterate through your systems and re-read from the config files / refresh their state. If there's a difference, update the system attributes and/or component attributes.
    5. it should render the next frame according to your new data/configurations if you are using ECS framework.

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

      Thanks, that sounds good, I'll give it a try!

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

    Great example for component based architectur! The common descriptions are so uselessly abstract - in reality it is pretty simple, and makes a lot of sense.

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

    Omg this game looks so beautiful now. I was no expecting the particle effects to be so useful.

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

    Man, Rufus is a cool guy. Loved when he had a leaf on his face. 10/10 video.

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

    The 3D particles look so freaking good!! It's not something I would have guessed would have made much difference, but boy do they look better than flat 2D ones.

  • @casualdutchman
    @casualdutchman Рік тому +7

    Very nice particles. Awesome implementations. Maybe you could add a leaf color to crops and then use that color when the leafExplode particles are emitted. Could save you on making a ton of different systems

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

      I was going to suggest the same thing!

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

    how is it possible to have your life this well put together. i feel like i would go insane with this much order

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

    I didn't know what was missing before but, yes: Just a little bit of "juice"! Looks great, especially the dust cloud bits.

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

    So impressed by how far this is coming on. Loving the new effects!

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

    Love your work!
    I also love the style of your videos; I get inspired by you.

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

    These look very good! Great job on the implementation and looking forward to playing this game

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

    Always love these videos. Keep it up! Your code is looking so clean. Always brightens my day to see a new vid posted by one of my favorite game devs.

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

    Dust particles and especially wheat harvesting particles are amazing. Seed planting ones are nice too.

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

    I'm so glad I found your channel so many years ago. you're a huge inspiration and I can't wait to play your next game!

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

    You releasing a new video makes me so happy. Keep up the great work!

  • @andrewgallimore9521
    @andrewgallimore9521 Рік тому +3

    You should have the water bucket inside the well drop down as you are filling your watering can, it would just add more movement to the game. Even if it doesn't make sense that water is splashing from the well or that it is filling up without the bucket coming back up until after you release your mouse. It would hopefully be a small amount of eye candy & flourish to the game. Amazing work so far!

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

      What happens if the user stops holding mouse down before the animation is complete? Might look funny

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

      Your right, it would have to be some programed animation that can adjust to the users actions rather than pre-baked animation that just runs. So that it would lower withing 0.5 sec of clicking, and raise for 0.5 sec as soon as the user finishes clicking. It would look a little funny if you thought about how it would actually be getting you the water, so it would be more movement for movements sake in this case. :D

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

    Great job mate! I loved the harvesting effect especially.

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

    Those effects look really really good! I also really like the art style 😊

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

    Such a huge improvement in immersion. Love the 3D particles! ❤

  • @rubixkyoob2
    @rubixkyoob2 Рік тому +2

    Your devlogs always make me feel so cozy :D
    Awesome work on the particle system! It's always inspiring to watch your progress on this project.

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

    The new art style very much suits the particle system! Also I feel your devlogs are really unique. Waiting for the next one! :)

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

    I love it! Personally I'd suggest making the dirt and water particle effects a little more subtle. It's kind of distracting at the moment. Smaller particles for those effects, and maybe a level of transparency on the water effects would be beneficial, I think.

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

      Thanks for the suggestion, I'll try and tweak the effects a bit :)

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

    I love all the plants at your set-up. I wish I had a nice big window like that. Keep up the awesome work!

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

    Love the 3d particle effects! They make the game look so lively 😊

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

    Very nicely done. I especially like the watering effect!

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

    I loved the transitions between screen and video. good video, you always inspire me

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

    The game looks amazing! I cannot wait to see what else u do! Also can’t wait to buy the game when it is released always wanted a game like this

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

    All of your videos bring me os much peace! Another great update, the 3D particles are looking really cool! Can't wait to see what's to come

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

    Dude, the particles look AMAZING!!!!

  • @timbelion3765
    @timbelion3765 Рік тому +3

    Mixture of 2d and 3d particles looks amazing!

  • @otoS97
    @otoS97 Рік тому +3

    Amazing addition to the game. They look so smooth and fit the style perfectly. Love it!

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

    Great video as always! You've given me a lot of things to think about for the particles in my own game. I've been doing the monolith particle update like you were doing in equilinox, but I'm really keen to try out the component method!

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

    upload notification from you make my day, i love seeing all these systems come together to make this game a lot more beautiful.

  • @fmvlee
    @fmvlee Рік тому +4

    The particles look great and I like that each action has some sort of effect whether that be a small effect with planting seeds or a big effect when watering, they all give the user feedback. Thanks for explaining the component system you are using, it makes sense to create it that way and I can think of many use cases for that pattern having seen it here.

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

    I think these dev vlogs are wonderful.
    You have a very fluid, professional flow to your videos.
    Once everyone is able to play the game , people who have followed your vlogs will have a whole new respect for the amount of work that goes into the game.
    Every time we do a task in the game we will remember that we saw it being created.
    Enjoyed the update 😊👍

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

    It's a privilege to learn few design principles along the vlog.

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

    Wow this is really cool. The particles look great! Nice video

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

    i gotta say i really like how particle effects look now! very satisfying to watch... Good luck on your further development! 🔥

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

    Looks awesome! The game is coming along well :)

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

    Nice touch with the particle effects, they really add an extra layer of vividity to your game. Awesome content as always 👍

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

    I dig the particle effects, nice work. Slight suggestion / personal opinion: I feel like the watering plants particle effect is a bit too much all at once. maybe some type of swooshing of water back and forth like from one corner to another or from a few points might look nice. kinda how it would look as if you were actually watering an area of plants.

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

    Amazing work as always!

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

    Glad to see the shadow moving along with the wind as we discussed in your last video ! Great work !

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

    Wow! The game looks fantastic!

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

    hey man ! your doing some really great stuff. so excited to buy this. good things come slow, so take your time! loved the video

  • @ba-a-a
    @ba-a-a Рік тому

    Big props for using Eclipse, my man!

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

    Particles look very juicy!
    I think it would be also cool to have a 3d animation of the item when it is being used. Spawn it out of thin air, play a playful animation and have it disappear again. Would be a lot of work but in a game dedicated to gardening, this could make the fundamental interactions much more satisfying.

    • @ThinMatrix
      @ThinMatrix  Рік тому +2

      That is something I've been considering! It would mean though that I have to make a 3D model and animation(s) for every new tool that I add, and I'm planning on adding quite a lot of tools, so that is putting me off doing it a little bit. But I'll keep considering it!

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

      @@ThinMatrix this could also help justify the time it takes for an action to complete. Say for example a small and cheap watering can would play a much longer animation to water the same area compared to a big and expensive one. But yeah, for sure it would be a lot of work.
      By the way, thank you for all the great tutorials you have done. I managed to make a small game engine for my bachelor thesis with the help of your and theBennyBox's tutorials :D

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

    This series inspired me to finally get my head down with OpenGL and my own engine for a game. Particle systems is something I'll be getting to soon as well!

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

    When you first said you implemented support for 3D particles, I was doubting their potential usefulness.
    But the results really speak for themselves. It's a bit of an understatement to say they fit the art style... They almost redefine the art style into something new.

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

    Great devlog. The particle effects look very nice!

  • @MrOmega-cz9yo
    @MrOmega-cz9yo Рік тому

    I'm envious of your coding and cooking skills! 😜

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

    I love the particle system, good job ❤

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

    Omg, the particles looks so cool and the editing program is something that would be really usefu 👍l. Youre also so inspirational ❤️

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

    I really enjoy how you structured the particle class with component objects. Blowing my mind a little I can't wait to try out that style of OOP :)

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

    The particles made the game so much better.

  • @joeyc.7845
    @joeyc.7845 Рік тому

    To make the particle system match the plant, add a component where you pass the mesh of the plant. The particle system can then uses the mesh and material color to generate the particles.

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

    You are an inspiration. A little thing I noticed is you are using rounded corners for almost everything, so I think the farm should also have rounded corners instead of sharp edges. Thank you for making such good videos.

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

      Thanks ^^ And yes I agree, I'll be working on the terrain very soon :)

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

    In every single one of your videos, the thing I am most jealous about is your ability to just casually make good meals lmao. I feel like its a struggle just to make a bowl of cereal

  • @JC-jz6rx
    @JC-jz6rx Рік тому

    5:56 -5:57
    I see what you did there, getting slick with the editing skills on that transition I see. Thank you for the update on the project

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

    The particle effects look great and really help making the world feel alive.
    Thank you for your work, your OpenGL tutorials have helped me a lot and I can only wish you the best for this game.

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

    Great progress!

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

    Awesome work mate, looks great. Don't try hard too much, it's super satisfying alteady

  • @MaximSchoemaker
    @MaximSchoemaker Рік тому +4

    Amazing progress, love the art direction ^^3 in terms of editing particles, maybe hotloading the .cba is easier than making an editor interface ✌️✨

    • @ThinMatrix
      @ThinMatrix  Рік тому +6

      Thanks :) And that's true, I hadn't really considered hotloading but I guess it would be a pretty good solution. I'll give it a try!

  • @vrojak7636
    @vrojak7636 Рік тому +2

    Damn the spooky paprika is genius, I'll make some myself this week 🤤

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

    It's lovely and funny to see how your decisions remind me of how Unity have their CPU based particle system implemented as well❤love your game-dev-vlogs, keep it up :)

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

    nice job ! keep up the good work

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

    Even though the game isn't complete, I'd totally buy it at this state already! It already looks super polished and I just love your cute low poly style!

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

    This looks great. The new art style screams "fluffy, bouncy animations" to me. The dust particles are great, definitely not too much. Hell, you could even go one step further and make the ground 'bounce' when you do it. Like my old art director used to say, 'Sometimes less is more, but often more is more'.

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

    for all those years that i've been watching these devlogs, the cooking part is one of my favorites. definitely wasn't expecting the halloween edition! (also, carefully taking notes 📝)

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

    Love the progress so far! My thought on the leaf particles per plant: you could make your leaf object white, add a property to your particle system for a tint or color then assign each plant a "leaf color" property. That way you could use the same particle system for every plant but the colors of the particle system would dynamically change as needed!

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

      Thanks! And yes, that's what I plan on doing :)

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

    Been waiting for a Thin Matrix video for sooo long, Missed you fam

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

    Wow, this is really shaping up :)

  • @1Tasteless
    @1Tasteless Рік тому

    What a cute little dog you have. Progress is looking great too!

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

    Amazing as always!!

  • @sharat.achary
    @sharat.achary Рік тому

    The particle system looks amazing. Please do add few dried or relevant leaf meshes along with the mud crumble meshes, when you execute the weed particle system. The watering, the dust and the harvesting particle systems are good additions. Wishing you the best ahead. :)

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

    Looks great. You should add hot reloading (using file watching apis) of the particle files so you can edit the file and see the changes in the game immediately, would save on iteration time without having to build an editor.

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

      That does seem like a pretty good solution. Definitely easier than making an entire editing app. I'll give it a try!