Yeah nice Blackjack, looks like good progress. Also it’s cool you’re using github
I agree with hh re the first program. What if your while loop began on line 13?
Yeah nice Blackjack, looks like good progress. Also it’s cool you’re using github
I agree with hh re the first program. What if your while loop began on line 13?
Is it better now? I moved the while loop to line 14, and I deleted the else statement.
Yeah nice it’s improved. I think also you don’t need both && numberofTriesLeft>0 in the while loop and the if statement on line 16 right? As they are both doing the same thing, might be more elegant just to have one of them.
//Update on 26 October 2019
I have set up SDL2, and I’m going to follow tutorials about it. (I want to understand how to use SDL2 before making a pong clone)
*Double necro post.
I recently started my Source Mod; however I am confused about setting up an online repo.
https://developer.valvesoftware.com/wiki/Setting_up_an_online_repository
It says GitHub doesn’t host for free, yet I haven’t found that info anywhere else.
Can someone confirm?
That page has just a bit outdated information. Github used to charge money for private repositories, but the changed that some time ago so that you can now have private github repo for free as long as you don’t need too many team members with access to it. Public github repositories have always been free and without member limits.
Next C# program, I’ll do some dumb $hit.
It’s a good start but you should consider trying to move to making a bit more difficult programs.
You are going to have a fun time with C# where everything is a reference (a fancy pointer), except when the type is a struct.
So for example if you have a function like:
public void DoSomethingWithAnObject(SomeType a){
a.Property = 1;
}
Depending on if SomeType is a class or struct the effect is different.
Classes are always passed as reference so if you call that function with an instance of a class, the object will get modified.
But if SomeType is a struct, it is passed by value (not by reference which is a disguised pointer) , so in that case your instance that you pass to the function is not modified.
I realize I might not be the best at trying to explain this. I just wanted to highlight a difference between C++ where you explicitly know if multiple variables actually are connected to the same object (SomeType*
and SomeType&
versus SomeType
), but in C# you just have to know if the type is a reference (class) or a value type (struct) in order to figure out if your changes to an object might interfere with other codes’ use of the same object.
(In C# of course)
Well, explicitly you won’t. But instead you’ll always be using the equivalent of pointers.
And that makes it easy to make bugs due to random functions changing the properties of objects they shouldn’t. To fight that you need to understand the semantics of pointers (ie. multiple variables that access the same object).
Did you do like a 1-to-1 following of the tutorial, or close to it? If you did that, then you might want to next try to add some small new features to the project you made to make sure you truly understood what the code does.
Update: Now, I’ll be working on my gamemode on Garry’s Mod.
I’ll try out later.
Perhaps you could look at an existing gamemode that adds stamina. I’m sure I’ve seen gmod mods that add a sprinting stamina bar.
I have finished the barebones (like 4%) of the Formicarium Project. It has a run time of 18 seconds, the link below has the Python file and incase you don’t trust me (you shouldn’t download python files from people you don’t trust) I have all the code in ‘formicarium_project_non_pyhton.txt’ that you can read and paste into a Python Shell. I have caught some errors and I am using one to cause Python to crash as a way to quit.
If this is against the rules, feel free to smite this post that breaks the rules off the forum.
What is this? was this discussed before?