Jump to content




Useful Tutorials & Resources


26 replies to this topic

#1 Advert

    Custom Title

  • Moderators
  • 459 posts
  • LocationLondon

Posted 20 February 2012 - 02:34 PM

View this list on Google Drive

              • I don't see what I'm looking for here! Unfortunately, since this thread is young, it does not have a wealth of knowledge to share. Create a new thread; or post a topic asking! More stuff will be added as it is created. Tutorials wanted:
              • Installing Programs To Your Computer
              • Saving/writing to files
              • Making some commonly requested programs: i.e 'Lock' program, ...
              Updates:
              1/29/2013: Corrected link for Keycode list.
              3/6/2012: Added Keycode list.
              2/20/2012: Moved How to Create an API to it's own thread.
              2/26/2012: Added Modem tutorial; Fixed error due to forums eating numbers.

              Edited by Bubba, 02 August 2013 - 10:45 AM.
              Added nice google spreadsheet with sorting


              #2 FuzzyPurp

                Part-Time Ninja

              • Members
              • 510 posts
              • LocationHarlem, NY

              Posted 20 February 2012 - 02:46 PM

              Sticky?

              #3 Advert

                Custom Title

              • Moderators
              • 459 posts
              • LocationLondon

              Posted 20 February 2012 - 03:12 PM

              View PostFuzzyPurp, on 20 February 2012 - 02:46 PM, said:

              Sticky?
              Once I add some more stuff to it, I guess ;)/>

              #4 Espen

                Curious Explorer

              • Members
              • 708 posts

              Posted 20 February 2012 - 05:31 PM

              I'm currently rewriting / improving my post about preventing program terminations, including an explanation for the reasons and an additional solution.
              Initially I planned on just posting it in the old thread as a followup.
              Shall I post it as a tutorial for your list instead? I'd PM it to you beforehand.

              #5 Advert

                Custom Title

              • Moderators
              • 459 posts
              • LocationLondon

              Posted 20 February 2012 - 05:40 PM

              View PostEspen, on 20 February 2012 - 05:31 PM, said:

              I'm currently rewriting / improving my post about preventing program terminations, including an explanation for the reasons and an additional solution.
              Initially I planned on just posting it in the old thread as a followup.
              Shall I post it as a tutorial for your list instead? I'd PM it to you beforehand.
              That would be awesome; but you need not PM it to me (I wouldn't mind proof-reading it, though), you can post a thread in the tutorial section, then I'll update this with a link to it ;)/>

              #6 luza

              • New Members
              • 43 posts
              • LocationGermany

              Posted 21 February 2012 - 01:24 PM

              Anyone has got problems if I translate some of them to german so that non-english speakers can use them too?

              #7 Advert

                Custom Title

              • Moderators
              • 459 posts
              • LocationLondon

              Posted 21 February 2012 - 02:05 PM

              View Postluza, on 21 February 2012 - 01:24 PM, said:

              Anyone has got problems if I translate some of them to german so that non-english speakers can use them too?
              I don't have a problem with you translating my stuff; but you should ask each author individually.

              #8 FuzzyPurp

                Part-Time Ninja

              • Members
              • 510 posts
              • LocationHarlem, NY

              Posted 21 February 2012 - 02:58 PM

              View Postluza, on 21 February 2012 - 01:24 PM, said:

              Anyone has got problems if I translate some of them to german so that non-english speakers can use them too?

              Web browsers should auto translate or ask to their native language. May be unnecessary.

              #9 Advert

                Custom Title

              • Moderators
              • 459 posts
              • LocationLondon

              Posted 21 February 2012 - 02:58 PM

              View PostFuzzyPurp, on 21 February 2012 - 02:58 PM, said:

              View Postluza, on 21 February 2012 - 01:24 PM, said:

              Anyone has got problems if I translate some of them to german so that non-english speakers can use them too?

              Web browsers should auto translate or ask to their native language. May be unnecessary.

              No. Just no. Have you seen what that translation comes up with?

              #10 FuzzyPurp

                Part-Time Ninja

              • Members
              • 510 posts
              • LocationHarlem, NY

              Posted 21 February 2012 - 02:59 PM

              View PostAdvert, on 21 February 2012 - 02:58 PM, said:

              View PostFuzzyPurp, on 21 February 2012 - 02:58 PM, said:

              View Postluza, on 21 February 2012 - 01:24 PM, said:

              Anyone has got problems if I translate some of them to german so that non-english speakers can use them too?

              Web browsers should auto translate or ask to their native language. May be unnecessary.

              No. Just no. Have you seen what that translation comes up with?

              Haha no, i only know English & Spanish.

              #11 luza

              • New Members
              • 43 posts
              • LocationGermany

              Posted 21 February 2012 - 03:17 PM

              View PostAdvert, on 21 February 2012 - 02:58 PM, said:

              View PostFuzzyPurp, on 21 February 2012 - 02:58 PM, said:

              View Postluza, on 21 February 2012 - 01:24 PM, said:

              Anyone has got problems if I translate some of them to german so that non-english speakers can use them too?

              Web browsers should auto translate or ask to their native language. May be unnecessary.

              No. Just no. Have you seen what that translation comes up with?
              exspecially because all the programming terms are in english and the browser will try to translate them aswell.

              #12 schrolock

              • Members
              • 62 posts

              Posted 29 February 2012 - 03:22 PM

              is it awaylable to code a program with that you can send a redstone signal for a time and than set pause and start again after a time??

              #13 Espen

                Curious Explorer

              • Members
              • 708 posts

              Posted 29 February 2012 - 03:33 PM

              @schrolock:
              This will turn on the redstone output on the back of the computer for .5 seconds and then turn it off again.
              Then it will wait for 1 second and repeat the process. It will do all of this in an infinite loop.
              local pulseLength = 0.5 -- Length of redstone pulse in seconds.
              local delayLength = 1   -- Length of delay between pulses in seconds.
              local side = "back"	 -- Side of the computer we want to control redstone signals for.
              
              while true do
                redstone.setOutput( side, true )
                sleep( pulseLength )
                redstone.setOutput( side, false )
                sleep( delayLength )
              end

              Now, if you want to be able to listen for events while the redstone pulses, then it gets a bit more complicated.
              Because sleep() waits itself for an event, we can't use it if we wait for events ourselves.
              Well, we could, but then our event loop wouldn't be interactive and we would always have to wait until sleep() finishes.
              Therefore we can implement sleep() ourselves by making use of os.startTimer() instead:
              local pulseLength = 0.5 -- Length of redstone pulse in seconds.
              local delayLength = 1   -- Length of delay between pulses in seconds.
              local side = "back"	 -- Side of the computer we want to control redstone signals for.
              
              local pulseTimer = os.startTimer( pulseLength )
              local delayTimer
              redstone.setOutput( side, true )	-- Redstone initially turned on (will be turned back off after the first time pulseTimer fires).
              while true do
                local sEvent, param = os.pullEvent()
              
                if sEvent == "timer" and param == pulseTimer then
              	redstone.setOutput( side, false )   -- Turn off redstone output
              	delayTimer = os.startTimer( delayLength )   -- (Re-)Start delayTimer.
                end
              
                if sEvent == "timer" and param == delayTimer then
              	redstone.setOutput( side, true )	-- Turn on redstone output
              	pulseTimer = os.startTimer( pulseLength )   -- Restart pulseTimer.
                end
              
                if sEvent == "char" and param == "q" then break end
              end
              

              Yet another (and for some use cases easier) way would be to make use of the 'parallel' API and let both the redstone pulse and our own event listener run in spearate threads.
              We have to wrap their respective code in functions then, though:
              function redstonePulser()
                local pulseLength = .5 -- Length of redstone pulse in seconds.
                local delayLength = 1   -- Length of delay between pulses in seconds.
                local side = "back"	  -- Side of the computer we want to control redstone signals for.
              
                while true do
              	redstone.setOutput( side, true )
              	sleep( pulseLength )
              	redstone.setOutput( side, false )
              	sleep( delayLength )
                end
              end
              
              function eventProcessing()
                local side = "back"	 -- Side of the computer we want to control redstone signals for.
                local maxProgramTimer = os.startTimer( 60 )
              
                while true do
              	local sEvent, param = os.pullEvent()
              	
              	if sEvent == "char" and param == "q" then   -- 'q' breaks out of the loop, ends the function and therefore the whole program.
              	  break
              	end
              	
              	if sEvent == "timer" and param == maxProgramTimer then  -- After 60 seconds, breaks out of the loop, ends the function and therefore the whole program.
              	  break
              	end
                end
              end
              
              parallel.waitForAny( redstonePulser, eventProcessing )
              

              Edited by Espen, 29 February 2012 - 04:00 PM.


              #14 Wolvan

              • New Members
              • 384 posts
              • LocationIn the TARDIS

              Posted 13 March 2012 - 08:41 AM

              I start translating this post after school. Into german
              Sry for double posting but here is the translation

              #15 Wolvan

              • New Members
              • 384 posts
              • LocationIn the TARDIS

              Posted 13 March 2012 - 02:06 PM

              • Verschiedene Dinge
              • Ich finde nicht was ich suche!
                Da der Thread noch jung ist gibt es hier noch nicht soviel Wissen.
                Erstelle einen neuen Thread; oder schreibe ein Thema Posting!
                Mehr Sachen werden hinzugefügt wenn etwas geschrieben wird.
                gesuchte Tutorials:
              • Programme auf Computer installieren
              • Speichern/Schreiben von Dateien
              • Ein paar gefragte Programme erstellen, zum Beispiel Passwort-Schlösser, ...
              Updates:
              6.3.2012: Keycodeliste hinzugefügt.
              20.2.2012: How to create an API in eigenen Thread verschoben.
              26.2.2012: Modemtutorial hinzugefügt; Fehler von verschwunden Nummern behoben.


              Translation Updates:
              13.03.2012: Erstmals veröffentlicht; Links behoben

              Translation into german by Wolvan



              #16 Advert

                Custom Title

              • Moderators
              • 459 posts
              • LocationLondon

              Posted 13 March 2012 - 02:08 PM

              You killed some links :mellow:/>.

              #17 Wolvan

              • New Members
              • 384 posts
              • LocationIn the TARDIS

              Posted 16 March 2012 - 01:47 PM

              View PostAdvert, on 13 March 2012 - 02:08 PM, said:

              You killed some links :D/>.
              Sry but no. I fixed them already

              #18 theoriginalbit

                Semi-Professional ComputerCrafter

              • Moderators
              • 7,332 posts
              • LocationAustralia

              Posted 16 December 2012 - 01:10 AM

              View PostAdvert, on 20 February 2012 - 02:34 PM, said:

              Tutorials wanted:
              • Installing Programs To Your Computer
              • Saving/writing to files
              • Making some commonly requested programs: i.e 'Lock' program
              when you say installing programs, what do u mean? as in getting from pastebin? or having one program load another program onto like a turtle?

              #19 AngelMalus

              • Members
              • 17 posts
              • LocationTokyo, Jpn

              Posted 29 December 2012 - 02:39 PM

              View PostAdvert, on 20 February 2012 - 02:34 PM, said:

              Tutorials wanted: [/list]
              • Installing Programs To Your Computer
              • Saving/writing to files
              • Making some commonly requested programs: i.e 'Lock' program, ...

              Same question, Installing programs to your computer? Do you mean the actual physical computer? like /appdata/minecraft/saves... folder?
              Saving/writing files. Do you mean the fs api, like saving and loading data? or backing up files?
              and could you provide a commonly requested programs list?

              #20 Doyle3694

              • Members
              • 815 posts

              Posted 28 January 2013 - 04:37 AM

              Lyqyd, I saw you added keycode map, link to the one on CC wiki rather than MC wiki, it is more correct(numpad enter)





              1 user(s) are reading this topic

              0 members, 1 guests, 0 anonymous users