3. Setting Up Our Class Hierarchy | Making a 2D Game Engine with FNA

  Рет қаралды 3,694

Michael Hicks

Michael Hicks

Күн бұрын

Пікірлер: 22
@CoolModderJaydonX
@CoolModderJaydonX Жыл бұрын
I recommend making an ECS (entity-component system) where every GameObject has a list of GameComponents and can be updated and drawn separately. Hell, you can make the SpriteRenderer one of them.
@andrewmartin2341
@andrewmartin2341 4 жыл бұрын
Whew! What a long video :D After going through the debugging, I had to back track because apparently I had another error that was causing my character to not show up. When setting up layerDepth I set it to 5f instead of .5f. woopsie :D great video. Thank you.
@michaelartsmedia
@michaelartsmedia 4 жыл бұрын
Haha yeah that will do it, it only goes from 0 to 1 xD Glad you got it! Keep it up!
@andrewmartin2341
@andrewmartin2341 4 жыл бұрын
@@michaelartsmedia out of curiosity are you still working with FNA or making games? I checked out the two you have on steam. Nice work.
@michaelartsmedia
@michaelartsmedia 4 жыл бұрын
Thanks for checking them out! Yeah I am! I'm currently working on two new games, which is the main reason my KZbin isn't super active. I'll probably always use FNA, because I think it's the best way to make 2D games!
@andrewmartin2341
@andrewmartin2341 4 жыл бұрын
@@michaelartsmedia good to hear. I'm looking forward to seeing what else you do. Are you on the FNA discord?
@michaelartsmedia
@michaelartsmedia 4 жыл бұрын
@@andrewmartin2341 I think so, but I'm not on Discord much haha
@calebcornett9285
@calebcornett9285 6 жыл бұрын
Wow, I had no idea you could set breakpoints in VS while the application was running. Hovering over the variables to see their values is such a nice feature that I'm gonna use the heck out of. Thanks for including that debugging exercise and not editing it out. :)
@michaelartsmedia
@michaelartsmedia 6 жыл бұрын
That's awesome to hear! I've tried to make a point to leave all of my mistakes and debugging sessions in the videos because that's part of being a programmer lol. Thanks for watching!
@eindrius
@eindrius 2 жыл бұрын
Hey, Michael! After writing the code for keyboard readings on the player class, it doesn't work anymore for me. Do you have any idea why? The code is literally the same as yours and there's no error when I'm compilling the code, the character just doesn't react to the commands. Do you think it's something with the FNA latest releases?
@michaelartsmedia
@michaelartsmedia 2 жыл бұрын
I have one of the latest FNA versions and the input is working the same as it always has on my end! It could be some kind of deeper compatibility issue with your keyboard? I unfortunately have no idea. I'd set up a bare minimum project that tests input and if that doesn't work try asking in the FNA discord!
@eindrius
@eindrius 2 жыл бұрын
@@michaelartsmedia Okay, I'll to do that. Thanks for the answer!
@Stan10785
@Stan10785 6 жыл бұрын
learning things each session!
@michaelartsmedia
@michaelartsmedia 6 жыл бұрын
That's great to hear =-D
@mechap7612
@mechap7612 4 жыл бұрын
you are amazing !
@GarrethandPipa
@GarrethandPipa 6 жыл бұрын
regarding @10:46 I would suggest altering how you handle required properties if (Image != null) { Origin = new Vector2(Image.Width / 2, Image.Height / 2); return; } throw new Exception(); to draw this object you will require the origin so there should never be a silent return on a requirement. At the very least set it to 0,0. I know you see tons of videos where folks do this but it isn't a good idea and could save you some debugging time... always fail loudly. If this logic should be moved to a full property is a religious debate but "gracefully handling exceptions" ie not handling exceptions is a crazy train of pain and suffering. That no one debates.
@michaelartsmedia
@michaelartsmedia 6 жыл бұрын
Hey thanks for the comment! That's a better route for a beginner video like this, but in my own games I prefer a silent treatment of this because a lot of times on large levels I'll only load the first section the player is in, then thread the rest of the image loading to speed things up. So that's why I don't use loud exceptions for variables related to the images. Of course, in a series like this I should have done it but I didn't think of it because I was taking code from my own engine. Thanks again!
1. Setting Up A New FNA Project | Making a 2D Game Engine with FNA
26:15
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 321 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
11. Adding Our Editor | Making a 2D Game Engine with FNA
37:02
Michael Hicks
Рет қаралды 2,8 М.
2. Drawing A Sprite | Making a 2D Game Engine with FNA
22:54
Michael Hicks
Рет қаралды 8 М.
Dear Unity Devs C++ is NOT that Hard
8:33
The Game Dev Cave
Рет қаралды 39 М.
Bitcoin Soars, Hedge Funds Lose Billions on Tesla | Bloomberg Technology
44:21
Bloomberg Technology
Рет қаралды 1,7 М.
C# GAME ENGINE BY 16-YEAR-OLD! // Code Review
49:06
The Cherno
Рет қаралды 312 М.
6. Bullets and Decorations pt. 1 | Making a 2D Game Engine with FNA
41:16
Learn Bevy 0.11 By Making a Game! (part 1)
13:01
Logic Projects
Рет қаралды 45 М.
Advanced solutions for CRISPR gene editing
40:53
GenScript USA Inc.
Рет қаралды 90
Should I use GDScript or C# in the Godot game engine?
5:09
GDQuest Q&A
Рет қаралды 60 М.
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН