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 - Ігри
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!
👌
@@trotyl1432 java
No need to apologize
Welcome back man!
@@trotyl1432 english
Those 3D particles look awesome. The game feels much more "alive" with them
Absolutely mate
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¢.
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.
The leaf on Rufus' face as he looked at the camera melted my heart
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.
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.
Awesome, thank you so much for the response!
@@RobertjrPlays you’re welcome
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 :))
Honestly, I'm just mezmerized by the beautiful morph shots at 5:55 and 10:27
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!
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
That's exactly what he does? He takes a collection of (component)classes, and calls all their update() methods one after another.
@@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
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!
Seeing a glimpse of Socuwan again after all this time was very cool :)
Rare Socuwan mention! I started watching during its development
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.
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.
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.
Yeah I agree, something like that would definitely be good. Thanks!
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
I love how these videos are one part Dev log, one part lifestyle vlog, with really high production values across both
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 :)
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!
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...
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
beautiful work, u never fail to impress us.
Thanks!
@@ThinMatrix No you thanks for the awesome content!
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
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 :)
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.
what forums are you going on... o.O
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.
Thanks, that sounds good, I'll give it a try!
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.
Omg this game looks so beautiful now. I was no expecting the particle effects to be so useful.
Man, Rufus is a cool guy. Loved when he had a leaf on his face. 10/10 video.
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.
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
I was going to suggest the same thing!
how is it possible to have your life this well put together. i feel like i would go insane with this much order
I didn't know what was missing before but, yes: Just a little bit of "juice"! Looks great, especially the dust cloud bits.
So impressed by how far this is coming on. Loving the new effects!
Love your work!
I also love the style of your videos; I get inspired by you.
These look very good! Great job on the implementation and looking forward to playing this game
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.
Dust particles and especially wheat harvesting particles are amazing. Seed planting ones are nice too.
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!
You releasing a new video makes me so happy. Keep up the great work!
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!
What happens if the user stops holding mouse down before the animation is complete? Might look funny
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
Great job mate! I loved the harvesting effect especially.
Those effects look really really good! I also really like the art style 😊
Such a huge improvement in immersion. Love the 3D particles! ❤
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.
The new art style very much suits the particle system! Also I feel your devlogs are really unique. Waiting for the next one! :)
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.
Thanks for the suggestion, I'll try and tweak the effects a bit :)
I love all the plants at your set-up. I wish I had a nice big window like that. Keep up the awesome work!
Love the 3d particle effects! They make the game look so lively 😊
Very nicely done. I especially like the watering effect!
I loved the transitions between screen and video. good video, you always inspire me
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
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
Dude, the particles look AMAZING!!!!
Mixture of 2d and 3d particles looks amazing!
Amazing addition to the game. They look so smooth and fit the style perfectly. Love it!
Thank you ^^
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!
upload notification from you make my day, i love seeing all these systems come together to make this game a lot more beautiful.
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.
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 😊👍
It's a privilege to learn few design principles along the vlog.
Wow this is really cool. The particles look great! Nice video
i gotta say i really like how particle effects look now! very satisfying to watch... Good luck on your further development! 🔥
Looks awesome! The game is coming along well :)
Nice touch with the particle effects, they really add an extra layer of vividity to your game. Awesome content as always 👍
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.
Amazing work as always!
Glad to see the shadow moving along with the wind as we discussed in your last video ! Great work !
Wow! The game looks fantastic!
hey man ! your doing some really great stuff. so excited to buy this. good things come slow, so take your time! loved the video
Thanks :)
Big props for using Eclipse, my man!
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.
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!
@@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
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!
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.
Great devlog. The particle effects look very nice!
Thank you!
I'm envious of your coding and cooking skills! 😜
I love the particle system, good job ❤
Omg, the particles looks so cool and the editing program is something that would be really usefu 👍l. Youre also so inspirational ❤️
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 :)
The particles made the game so much better.
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.
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.
Thanks ^^ And yes I agree, I'll be working on the terrain very soon :)
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
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
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.
Great progress!
Awesome work mate, looks great. Don't try hard too much, it's super satisfying alteady
Amazing progress, love the art direction ^^3 in terms of editing particles, maybe hotloading the .cba is easier than making an editor interface ✌️✨
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!
Damn the spooky paprika is genius, I'll make some myself this week 🤤
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 :)
nice job ! keep up the good work
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!
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'.
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 📝)
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!
Thanks! And yes, that's what I plan on doing :)
Been waiting for a Thin Matrix video for sooo long, Missed you fam
Wow, this is really shaping up :)
What a cute little dog you have. Progress is looking great too!
Amazing as always!!
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. :)
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.
That does seem like a pretty good solution. Definitely easier than making an entire editing app. I'll give it a try!