#Do you think it would be possible to
1 messages · Page 1 of 1 (latest)
I don't know what all "have it done" means per say... but a simple game-scene like that? Sure if you are a competent C# coder and have experience with Unity, that's probably a weekend game jam 20 hour project. If you are new to Unity/coding I'd say more like a month.
Oh I see, thanks
I highly recommend getting into some of the tutorials I mentioned. Codemonkey is great and you can learn a lot just watching the videos.
Most of my professional coding friends do nothing but watch tutorials for the first few weeks before actually attempting anything on their own.
It helps get a feel for why you'll want to do something. Where everything is located and best practices.
Actually do you think I could use the normal physics but make it so that the ball can only collide with an enemy if it's small enough? Like disabling it's collider until it's small enough? Or I was thinking about using an if statement w/ two conditions: if the bullet is small enough and if it's overlapping an enemy (and maybe just keeping the bullets and enemies on different layers?)
Idk man I've been working on this game for a while and it's due friday + I have to add sounds and animations
A basic 2D game has physics and you can just setup colliders to handle it.
You can have the code issue a callback on collision and then do whatever logic to see if it hit or not.
I don't understand what you're saying
Well this is why tutorials to learn the basics of Unity components is important. Your plane will be a game object with sprite renderer and animation components. You'll want to make a custom monobehavior component, let's call it "plane" that holds some important metrics about it. The game object will also have a rigidbody and exist on a layer. You'll then setup bullets in a similar manner. There's a couple ways to handle this but its not something I can just describe or you can do without learning a good bit about Unity in the process.
In my game, for example, I have NPCs wandering around a top-down 2D map. I have doors that I want to open automatically when they get close. So the doors do a circlecast every 250ms to look for NPC nearby. If it detects on, the door opens. When it no longer detects one, the door closes. You could use something similar with a raycast going down from the bullet into the Z-axis to see if it hits a plane and then only do damage if the plane is in the right location.
ie, the plane spawns at distance -1000 with a speed of 25. Every tick you add 25 to the 1000 and animate it moving towards the player. Then you'll setup some logic where the plane is in the right distance for damage from bullets if its between -500 and -100 or something.
Game design pulls fairly heavily from math and problem solving which takes time to develop.
Hmm I suppose you're right. I didn't know I could sent a raycast down from the bullet into the Z-axis, I'll look into that.
With game engine physics you can usually either get a callback when one collider intersects another. Or you can do periodic ray/circle/boxcasts to check for intersections with something else. There's pro's and cons to each.
I'd worry more about first spawning/animating the planes and spawning/animating the ship and its guns.
Get that looking/working well, then you can focus on detecting a hit.
I actually already have a scene that has working enemy movement and shooting and everything but my teacher didn't like it
So once I get this to work then I can just carry over what I already made
This class sounds quite strange heh. Is it a part of a school curriculum or something?
Yes... 🥹
Did they not have several weeks to instruct on Unity basics, with tutorials the prof helped walk you through to do things in the engine first?
Not really
We just studied a bunch of notes to prepare to get our certificate for most of the time
Which I don't get, what's the point of having a certificate if you can't make games?
You get a Unity certificate when you are done with the class?
https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg this is the tutorials I had mentioned.
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C# taught by a Professional Indie Game Developer.
Watch the free Video Tutorials or learn from my complete Step-by-step Courses
https://unitycodemonkey.com/courses
Check out the official website to download the free Project Files a...