• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.
    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

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

TheUninvited

New Coder
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.
 

Malcolm

Administrator
Administrator
Verified
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.
 

Jon50

New Coder
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:

Malcolm

Administrator
Administrator
Verified
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.
 

Jon50

New Coder
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!
 

Malcolm

Administrator
Administrator
Verified
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! :)
 
Top Bottom