This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2010-12-31 03:43:23

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: the step from scratch to c#

sparks wrote:

I was sort of expecting a tutorial on how to move from scratch to C# here... This is kinda the opposite. Is it not extremely defeatist to tell a load of Scratchers that Scratch is easier than C#? That's why most of them are here...  tongue

Fixed it for you.  hmm


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#27 2010-12-31 06:18:52

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: the step from scratch to c#

We're putting things very different from what they really are over here! le me just clear it all up a bit:

first of all, you are not talking about C# but C#.NET since you are importing the System.dll and related libraries. That is making it a whole lot easier for you, basic C# is not easy at all (same with VB).

second, Scratch and C# (called C-sharp, btw) are different -- not harder or easier.
C# is a text language, Scratch is visual and uses blocks.
C# has advanced string manipulation, File I/O (well, the .NET framework does), and much better integration with the Windows and Mac system.
Scratch is cross-platform, limited to a single project and has some differences in code structure (but not too many).

third, C# is made to be easier thn C++. both are based on C, an assembly language.notice how they've added two plus signs each time  tongue



last, but not least, converting Scratch to C# and other languages and vice versa is dead easy. Let's take some more advanced coding:
http://i1027.photobucket.com/albums/y339/silvisoft/cex.gif
into VisualBasic would be:

Code:

Sub Main()
  If Rnd() = 23 Then
     Location = Location + New Point(10, 0)
  Else
     Dim dumdum As Integer
     dumdum = Rnd + 2
     whoo()
End Sub

Sub whoo()
   Print("I'm tired :S")
End Sub

In C#:

Code:

int main()
{if (Rnd() = 23) {
Location = Location + 10;} else {
int dumdum;
dumdum = Rnd() + 2;
whoo();}

int whoo() {
cout << "I'm tired :S";
}

Offline

 

#28 2010-12-31 10:14:22

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

markyparky56 wrote:

nxsupert wrote:

markyparky56 wrote:

1200%? No way! Maybe 10 or 20% at the most. It only starts to get confusing when you try using things like XNA.

well in c++ you need to make shore that there are NO errors or you might end up deleting everything on your computer(1 0f 20 bad things that can happen).

What kind of program were you creating?! If you stick to things not involving File I/O then you will never encounter something like that.

@nxsupert
Maybe start with things like getting the hang of using commands such as
Headers, like System and its sub-sections like System.IO etc.
Basic input/output like:

Code:

Console.writeline("Hello World!");
Console.read();

boring .
i do simulators , game editors , and A.I .
and it is called fstream in C++

Last edited by nxsupert (2011-01-05 11:11:14)


I am Back!

Offline

 

#29 2010-12-31 14:50:08

nerevar
Scratcher
Registered: 2010-05-30
Posts: 20

Re: the step from scratch to c#

Java isn't that hard either once you get the hang of it  wink

Code:

System.out.println("Hello World! What's your name?");
String name = new Scanner(System.in).nextLine();
System.out.println("Why hello "+name+"!");

Last edited by nerevar (2010-12-31 15:12:22)

Offline

 

#30 2011-01-03 09:16:42

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

i need feed back


I am Back!

Offline

 

#31 2011-01-03 09:49:36

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: the step from scratch to c#

That is very basic. Maybe you should add more blocks or make your own Scratch Like program in C#.


Here's a simple console number guessing game programed in vb.net.

To import it into your project open up a new console application and past this code in it.


a:
System.Console.Write("Original code Copyrighted (c) by what-the. Do not remove this message! " & vbCrLf)
        System.Console.Write(vbCrLf & " would you like to play a game? (y,n) ")
        If Console.ReadLine = "y" Then
            GoTo playagame
        Else
            GoTo pickrandom
        End If


playagame:
        System.Console.Write(vbCrLf & "Ok")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" I ")
        System.Threading.Thread.Sleep(100)
        System.Console.Write("will ")
        System.Threading.Thread.Sleep(100)
        System.Console.Write("think")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" of")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" a")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" number")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" between")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" 1")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" and")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" 100")
        System.Threading.Thread.Sleep(100)
        System.Console.Write(" and")
        System.Threading.Thread.Sleep(50)
        System.Console.Write(" you")
        System.Threading.Thread.Sleep(50)
        System.Console.Write(" have")
        System.Threading.Thread.Sleep(50)
        System.Console.Write(" to")
        System.Threading.Thread.Sleep(50)
        System.Console.Write(" guess")
        System.Threading.Thread.Sleep(50)
        System.Console.Write(" it.")

        System.Threading.Thread.Sleep(400)
        System.Console.Write(vbCrLf & "You will get ten guesses and I will tell you if it's higher or lower.")
        System.Threading.Thread.Sleep(400)
startguess:
        Dim Value As Integer
        Dim trys As Integer
        Dim r As New Random(System.DateTime.Now.Millisecond)
        trys = 1
        Value = r.Next(1, 100)
        System.Console.Write(vbCrLf & "I am thinking of a number between 1 and 100. What is it? ")

        Dim guess As Integer


        Do While trys < 10
            Try
                guess = Console.ReadLine
            Catch
                System.Console.Write(vbCrLf & "Please only enter numbers! Starting again.")
                GoTo startguess
            End Try

            If guess = Value Then

                System.Console.Write(vbCrLf & "Correct. You guessed the number in " & trys & " guesses")
                trys = 10
                System.Console.Write(vbCrLf & "Do you want to play again?(y,n) ")
                If Console.ReadLine = "y" Then
                    GoTo startguess
                Else
                    GoTo pickrandom
                End If

            Else
                If guess > Value Then
                    System.Console.Write(vbCrLf & "Lower ")
                Else
                    System.Console.Write(vbCrLf & "Higher ")
                End If
            End If
            trys = trys + 1
        Loop
        System.Console.Write(vbCrLf & "I win! Gameover. The number was " & Value & ". Do you want to try again? (y,n) ")
        If Console.ReadLine = "y" Then
            GoTo startguess
        Else
            GoTo pickrandom
        End If

pickrandom:


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#32 2011-01-03 12:01:31

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: the step from scratch to c#

Don't forget actionscript! Very easy to learn and free I think if you download a free version thing from adobe (I use Flash CS4). Every advanced scratcher should try AS!  big_smile

Last edited by Daffy22 (2011-01-03 12:01:48)


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#33 2011-01-03 19:07:55

songhead95
Scratcher
Registered: 2008-03-19
Posts: 100+

Re: the step from scratch to c#

why step into such a terrible language? Just go into python or something less bad.

Offline

 

#34 2011-01-04 11:40:58

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

I was planing on doing a tutorial to day but my c# editor isn't working.
pleas look at this
http://scratch.mit.edu/forums/viewtopic.php?id=53689


I am Back!

Offline

 

#35 2011-01-04 11:43:56

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

songhead95 wrote:

why step into such a terrible language? Just go into python or something less bad.

if you want to be a proper game maker you need to learn c#,c++, Java ext.


I am Back!

Offline

 

#36 2011-01-05 11:09:13

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

feed back needed.


I am Back!

Offline

 

#37 2011-01-09 09:55:57

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: the step from scratch to c#

nxsupert wrote:

songhead95 wrote:

why step into such a terrible language? Just go into python or something less bad.

if you want to be a proper game maker you need to learn c#,c++, Java ext.

depends what you go into, they teach C++ at most universities and colleges. Java and C# are probably quite common aswell.
I'm trying to concentrate on Python at the moment, its actualy really simple.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#38 2011-01-10 19:13:24

undacovabroda45
Scratcher
Registered: 2010-01-09
Posts: 40

Re: the step from scratch to c#

I think if that if scratch were to ever go to another language, it should be something like java or python, some language that can be used on EVERY computer. the well-known c# IDE is visual studios, developed by Microsoft, and SOLD--it is not free.


Here's a project that I think will really help people out
http://scratch.mit.edu/static/projects/undacovabroda45/1282323_sm.pnghttp://scratch.mit.edu/projects/undacovabroda45/1282323

Offline

 

#39 2011-01-11 02:51:58

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

undacovabroda45 wrote:

I think if that if scratch were to ever go to another language, it should be something like java or python, some language that can be used on EVERY computer. the well-known c# IDE is visual studios, developed by Microsoft, and SOLD--it is not free.

that is if you use the pro . it is free here http://www.microsoft.com/express/Windows/
___________________________________________________________________
every one i have found a really good 3d game maker :
http://unity3d.com/


I am Back!

Offline

 

#40 2011-01-11 02:55:26

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

LS97 wrote:

We're putting things very different from what they really are over here! le me just clear it all up a bit:

first of all, you are not talking about C# but C#.NET since you are importing the System.dll and related libraries. That is making it a whole lot easier for you, basic C# is not easy at all (same with VB).

second, Scratch and C# (called C-sharp, btw) are different -- not harder or easier.
C# is a text language, Scratch is visual and uses blocks.
C# has advanced string manipulation, File I/O (well, the .NET framework does), and much better integration with the Windows and Mac system.
Scratch is cross-platform, limited to a single project and has some differences in code structure (but not too many).

third, C# is made to be easier thn C++. both are based on C, an assembly language.notice how they've added two plus signs each time  tongue



last, but not least, converting Scratch to C# and other languages and vice versa is dead easy. Let's take some more advanced coding:
http://i1027.photobucket.com/albums/y33 … ft/cex.gif
into VisualBasic would be:

Code:

Sub Main()
  If Rnd() = 23 Then
     Location = Location + New Point(10, 0)
  Else
     Dim dumdum As Integer
     dumdum = Rnd + 2
     whoo()
End Sub

Sub whoo()
   Print("I'm tired :S")
End Sub

In C#:

Code:

int main()
{if (Rnd() = 23) {
Location = Location + 10;} else {
int dumdum;
dumdum = Rnd() + 2;
whoo();}

int whoo() {
cout << "I'm tired :S";
}

Code:

int main()
{if (Rnd() = 23) {
Location = Location + 10;} else {
int dumdum;
dumdum = Rnd() + 2;
whoo();}

int whoo() {
cout << "I'm tired :S";
}

???????????????????????????????????????????
that is c++


I am Back!

Offline

 

#41 2011-01-11 11:28:56

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: the step from scratch to c#

nxsupert wrote:

Code:

int main()
{if (Rnd() = 23) {
Location = Location + 10;} else {
int dumdum;
dumdum = Rnd() + 2;
whoo();}

int whoo() {
cout << "I'm tired :S";
}

???????????????????????????????????????????
that is c++

Do you really think there's that much difference between the two?
Tell me what part of that code is not C#

Last edited by LS97 (2011-01-11 11:29:07)

Offline

 

#42 2011-01-11 11:34:03

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: the step from scratch to c#

nxsupert wrote:

undacovabroda45 wrote:

I think if that if scratch were to ever go to another language, it should be something like java or python, some language that can be used on EVERY computer. the well-known c# IDE is visual studios, developed by Microsoft, and SOLD--it is not free.

that is if you use the pro . it is free here http://www.microsoft.com/express/Windows/

If you're interested in having the Professional version (I believe it's about £500) for free, and legal, I'm sure Microsoft wouldn't mind me sharing their site wit anyone interested: http://www.dreamspark.com/.
It's actually their site! If you're a student and can prove it, you've got it! Besides, you get loads of additional software free too.
It worked with me  big_smile

Offline

 

#43 2011-01-11 13:03:30

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

LS97 wrote:

nxsupert wrote:

Code:

int main()
{if (Rnd() = 23) {
Location = Location + 10;} else {
int dumdum;
dumdum = Rnd() + 2;
whoo();}

int whoo() {
cout << "I'm tired :S";
}

???????????????????????????????????????????
that is c++

Do you really think there's that much difference between the two?
Tell me what part of that code is not C#

all of it


I am Back!

Offline

 

#44 2011-01-11 13:21:33

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: the step from scratch to c#

nxsupert wrote:

LS97 wrote:

nxsupert wrote:

Code:

int main()
{if (Rnd() = 23) {
Location = Location + 10;} else {
int dumdum;
dumdum = Rnd() + 2;
whoo();}

int whoo() {
cout << "I'm tired :S";
}

???????????????????????????????????????????
that is c++

Do you really think there's that much difference between the two?
Tell me what part of that code is not C#

all of it

Don't be stupid. Tell me what you do not consider C#!

Offline

 

#45 2011-01-11 13:30:57

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

LS97 wrote:

nxsupert wrote:

LS97 wrote:


Do you really think there's that much difference between the two?
Tell me what part of that code is not C#

all of it

Don't be stupid. Tell me what you do not consider C#!

ok
int dumdum
dumdum = Rnd() + 2;
whoo()
are c#


I am Back!

Offline

 

#46 2011-01-11 14:16:46

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: the step from scratch to c#

nxsupert wrote:

LS97 wrote:

nxsupert wrote:


all of it

Don't be stupid. Tell me what you do not consider C#!

ok
int dumdum
dumdum = Rnd() + 2;
whoo()
are c#

And what about the int main() {} ? what's that got that you consder non-c#?

Offline

 

#47 2011-01-12 02:44:02

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: the step from scratch to c#

LS97 wrote:

nxsupert wrote:

LS97 wrote:


Don't be stupid. Tell me what you do not consider C#!

ok
int dumdum
dumdum = Rnd() + 2;
whoo()
are c#

And what about the int main() {} ? what's that got that you consder non-c#?

int main() {} ??????
i have never seen that before in c#.(i cant check at the moment . my computer is has gust had its recovery program , blue screens were showing when i did a download)


I am Back!

Offline

 

#48 2011-01-12 02:59:49

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: the step from scratch to c#

If anyone wants to proper games like on websites you need flash. (I think there is something called 'flux' by adobe which is free, I use Fl CS4  tongue  )
_____________
nxsupert, that is C#  tongue


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#49 2011-01-12 11:37:22

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: the step from scratch to c#

nxsupert wrote:

LS97 wrote:

nxsupert wrote:


ok
int dumdum
dumdum = Rnd() + 2;
whoo()
are c#

And what about the int main() {} ? what's that got that you consder non-c#?

int main() {} ??????
i have never seen that before in c#.(i cant check at the moment . my computer is has gust had its recovery program , blue screens were showing when i did a download)

You probably remember some like

Code:

void button1_click(Object sender, EventArgs e)
  {
     code here;
  }

which is exactly the same principle. Except that one is (generally) automatically done by your IDE and I've used lines breaks for it. But line breaks do not matter in C#..

Offline

 

#50 2011-01-12 13:28:05

undacovabroda45
Scratcher
Registered: 2010-01-09
Posts: 40

Re: the step from scratch to c#

Daffy22 wrote:

If anyone wants to proper games like on websites you need flash. (I think there is something called 'flux' by adobe which is free, I use Fl CS4  tongue  )

You might be talking about adobe flex


Here's a project that I think will really help people out
http://scratch.mit.edu/static/projects/undacovabroda45/1282323_sm.pnghttp://scratch.mit.edu/projects/undacovabroda45/1282323

Offline

 

Board footer