#Do you think it would be possible to

1 messages · Page 1 of 1 (latest)

dense steeple
#

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.

graceful nova
#

Oh I see, thanks

dense steeple
#

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.

graceful nova
#

Idk man I've been working on this game for a while and it's due friday + I have to add sounds and animations

dense steeple
#

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.

graceful nova
#

I don't understand what you're saying

dense steeple
#

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.

graceful nova
#

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.

dense steeple
#

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.

graceful nova
#

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

dense steeple
#

This class sounds quite strange heh. Is it a part of a school curriculum or something?

graceful nova
#

Yes... 🥹

dense steeple
#

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?

graceful nova
#

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?

dense steeple
#

You get a Unity certificate when you are done with the class?

graceful nova
#

I already got one

#

I took the exam a while back

#

🧍‍♀️

dense steeple