C# Need help I wanted to implement a keybinding system, and I don't know if what I did is more complex

TheUninvited

New Coder
Jul 6, 2019
27
4
3
c#
So this is a question of a friend:


Hi there, one of the projects for my school is to create a Space Invaders clone, and I wanted to implement a keybinding system, and I don't know if what I did is more complex than it should be and I'm afraid it would negatively impact on the final score.

So I would like to ask if some of you could spare some time and do some code review, I'd really appreciate it.

https://pastebin.com/mGzY6vi2
https://github.com/Jon50/Invaders
 
D

Deleted member 205

Guest
I've added the Need Help label to this thread so that it has a significant importance when being filtered for.
 
D

Deleted member 205

Guest
TheUninvited said:
what do you mean by format ?
In computing, when we reference "format", we mean by changing the document. When we say change, we mean:
  • Fixing spelling and grammar errors.
  • Changing colours of text.
  • Adjusting and re-aligning images.
And of course, if there's any code then you put it into a code-block/snippet so that it displays clearly that it's a piece of code.

If I'm correct, @Malcolm is asking that you reformat this question so that it's easier to understand.
 

Master Yoda

Administrator
Administrator
Verified
Jan 2, 2018
1,317
349
95
Canada
codeforum.org
In computing, when we reference "format", we mean by changing the document. When we say change, we mean:
  • Fixing spelling and grammar errors.
  • Changing colours of text.
  • Adjusting and re-aligning images.
And of course, if there's any code then you put it into a code-block/snippet so that it displays clearly that it's a piece of code.

If I'm correct, @Malcolm is asking that you reformat this question so that it's easier to understand.
Exactly, what I meant. Thanks @Daniel.
 
  • Like
Reactions: Deleted member 205

Jon50

New Coder
Jan 13, 2020
2
2
4
Thanks @TheUninvited for the help. I'm a beginner and I have a limited skills on C# and Unity. This is a school project, a Space Invaders clone, in which I believe it is very important to have keybindings even though it is not requested to do in the exercise. The few tutorials out there are string based, which in my opinion are simple but bad on code terms. So my concern is if the system I have done is way too complex for such a simple game that uses only three keys and I don't know if the code is readable enough. I'd like to know if it's okay as it is or should use the simplest string-based approach. Do you think the way it is now would negatively affect the final score?

I'd be much appreciated if you'd take a look at it.
 
Last edited:
  • Like
Reactions: TheUninvited

Master Yoda

Administrator
Administrator
Verified
Jan 2, 2018
1,317
349
95
Canada
codeforum.org
Thanks @TheUninvited for the help. I'm a beginner and I have a limited skills on C# and Unity. This is a school project, a Space Invaders clone, in which I believe it is very important to have keybindings even though it is not requested to do in the exercise. The few tutorials out there are string based, which in my opinion are simple but bad on code terms. So my concern is if the system I have done is way too complex for such a simple game that uses only three keys and I don't know if the code is readable enough. I'd like to know if it's okay as it is or should use the simplest string-based approach. Do you think the way it is now would negatively affect the final score?

I'd be much appreciated if you'd take a look at it.
If it what makes it works then I think it’s good but it’s never a bad thing to go over your code to make it better! But, in regards to your score I’m not entirely sure. It depends on how it’s being graded.
 
  • Like
Reactions: Jon50

Jon50

New Coder
Jan 13, 2020
2
2
4
If it what makes it works then I think it’s good but it’s never a bad thing to go over your code to make it better! But, in regards to your score I’m not entirely sure. It depends on how it’s being graded.
Thank you for taking your time. Yeah, I guess I'll take a second look at it, and as it is not in the requirements list, I might even take it down or I could just ask my professor. :thinking: Haha!
Anyways, thank you again for your time!
 
  • Like
Reactions: Master Yoda

Master Yoda

Administrator
Administrator
Verified
Jan 2, 2018
1,317
349
95
Canada
codeforum.org
Thank you for taking your time. Yeah, I guess I'll take a second look at it, and as it is not in the requirements list, I might even take it down or I could just ask my professor. :thinking: Haha!
Anyways, thank you again for your time!
You’re welcome! Code Forum is always here to help! :)
 
  • Like
Reactions: Jon50