Jump to content




[CC Latest] MoarPeripherals


  • This topic is locked This topic is locked
243 replies to this topic

#21 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 25 June 2014 - 10:39 AM

A portable monitor, but interactive (input-output)
And I have a idea for portable monitor (pocket terminal)
The attached computer will the ID#0
The attached portable terminal is the ID#0, too, and less code, because computers with same ID has shared files and monitor, input etc.
But if you open up the portable terminal the startup don't start, but there could be a file called 'IfPortableTerminal' in computer, and that could run when opening from portable terminal

#22 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 June 2014 - 10:50 AM

okay well that would require me to reimplement a lot of ComputerCraft's code, so for now, unless I can think of a way to do it I'm going to say no. I could make a remote, that can control a computer, but that's as far as I'll go for now as it doesn't require re-implementing any of the ComputerCraft core.

#23 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 07 July 2014 - 09:13 AM

Okay people, I updated the thread yesterday, had an awesome post typed out to give an update to you all, and the forums went down; so this one won't be as awesome or formal as yesterday's one was :P

First order of business. I've moved away from GitHub hosting my downloads across to MediaFire — it allows me to track things a little better — if your host, or country, has blocked MediaFire please alert me of a mirror I could use that your country does not block.

Second order of business. I've moved to a new versioning system. All files will now have a new version tag similar to that of Minecraft Forge. It will look similar to this, 1.6.4-1.63-1.0.1 which details the versions of Minecraft, ComputerCraft, and MoarPeripherals; where the example provided would be MoarPeripherals version 1.0 build 1, for Minecraft 1.6.4 and ComputerCraft 1.63, I hope this will clear things up for people, and ultimately make the experience of downloading correct versions easier.

Last order of business. I have been slaving away over the last few days or so in order to finalise the implementation of the Iron Note Block, I am pleased to announce that this is complete and there will be a release within the hour containing the block! As per usual the Iron Note block can be enabled/disabled in the config file, you'll also notice another setting, range, however due to some unforeseeable bugs in — what seems like — Minecraft, this feature doesn't work, I will still try to get it working, but it is not looking promising.
I am also pleased to announce that I have been collaborating with Bomb Bloke over the past week or so to bring you an optional program to MoarPeripherals called Note (yeah I know, boring name :P ) the aim of the Note program is to play songs created with Minecraft Note Block Studio on the Iron Note Block. The Note program, it's associated help file, as well as a few demo songs are not included with the mod, however are available to you via a resource pack (download in OP). To run the program after installing the resource pack you can simply type note into the terminal, you can also read up more information about the program by typing help note, and finally the demo songs are located within rom/songs/

I hope you enjoy this update, as well as the fantastic program made by Bomb Bloke & myself.

What's next? Well I am currently working on the new printer, fun times ahead with this one, if there's anyone out there that is good with textures your help would be greatly appreciated. :)

#24 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 07 July 2014 - 11:12 AM

View Posttheoriginalbit, on 07 July 2014 - 09:13 AM, said:

(yeah I know, boring name :P )

Says the guy who didn't name it... :lol:

#25 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 07 July 2014 - 02:06 PM


Edited by Bomb Bloke, 15 July 2014 - 02:06 AM.


#26 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 07 July 2014 - 02:10 PM

View PostBomb Bloke, on 07 July 2014 - 02:06 PM, said:

-video snip-
Thank you! awesome! I'll add that to OP now :)

#27 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 07 July 2014 - 04:05 PM

Okay so I'm well on the way to the better printer.

tonight I implemented the item for the ink cartridges. however sadly I'm not great at textures at such a low resolution, and this is the resultant item
Ink Cartridge Item

so looking at that I decided I didn't like it at all, and I needed to do something better, and then it struck me, make a 3D model, which resulted in the following
Ink Cartridge 3D Model

I liked this, but it still didn't look quite right to me; it needed to be less boxy. so with some more playing around in Techne and Photoshop, I ended up with this
Ink Cartridge Final 3D Model

Now for those of you that are FPS conscious, do not worry, you can turn off the model in the config file, in which case the item is rendered with the first texture :(

#28 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 08 July 2014 - 03:00 AM

awwwww you shoulda clicked on a pink floyd song... I'm disappointed :C

View Posttheoriginalbit, on 07 July 2014 - 04:05 PM, said:

Okay so I'm well on the way to the better printer.

tonight I implemented the item for the ink cartridges. however sadly I'm not great at textures at such a low resolution, and this is the resultant item
Ink Cartridge Item

so looking at that I decided I didn't like it at all, and I needed to do something better, and then it struck me, make a 3D model, which resulted in the following
Ink Cartridge 3D Model

I liked this, but it still didn't look quite right to me; it needed to be less boxy. so with some more playing around in Techne and Photoshop, I ended up with this
Ink Cartridge Final 3D Model

Now for those of you that are FPS conscious, do not worry, you can turn off the model in the config file, in which case the item is rendered with the first texture :(
make each cartridge cost 1 diamond block + 8 of the dye and only yield 1 page to be realistic... xD. I'm kidding.

Edited by Geforce Fan, 08 July 2014 - 03:01 AM.


#29 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 08 July 2014 - 03:25 AM

View PostGeforce Fan, on 08 July 2014 - 03:00 AM, said:

awwwww you shoulda clicked on a pink floyd song... I'm disappointed :C
there were a few things that Bomb Bloke didn't cover in the video, but that's okay.

View PostGeforce Fan, on 08 July 2014 - 03:00 AM, said:

make each cartridge cost 1 diamond block + 8 of the dye and only yield 1 page to be realistic... xD. I'm kidding.
oh don't worry, I have everything worked out. Cost wise it won't be too bad, one ink cartridge will hold 1000mB of ink, a single dye will be 125mB, and current plans are printing a character will cost 4mB.

#30 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 08 July 2014 - 03:43 AM

Bomb Bloke has just alerted me that the Note program's resource pack included an outdated version of the program, as such I have updated it. Unlike the mod itself I will not be keeping previous versions of the resource packs available for download (so use the same download link) unless there's a major change in MoarPeripherals that would mean new versions of the program won't work in the old versions of MoarPeripherals.

#31 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 July 2014 - 05:09 AM

View Posttheoriginalbit, on 08 July 2014 - 03:25 AM, said:

View PostGeforce Fan, on 08 July 2014 - 03:00 AM, said:

awwwww you shoulda clicked on a pink floyd song... I'm disappointed :C

there were a few things that Bomb Bloke didn't cover in the video, but that's okay.

Long videos annoy me. They should get a point across, then end. I get no end of frustration out of the fact that most of the "demonstration" videos on YouTube spend the first few minutes talking about what they're going to show you.

Yes, I know what your videos are about, that's why I'm skipping through them in the hopes of getting the ten-seconds-worth of information you were too much of an *** to just type out...

Ahem.

Some of the music files available are better than others, which has a lot to do with the limited sound-sets available within MineCraft. I didn't think much of those Floyd ones.

I'd point you towards the pack I got them from in the Note Block Studio thread, but, and I'm totally not kidding about this, the entire thread is missing from the MineCraft forums as of about... I dunno... a few hours ago?

Well that's a bit of a head scratcher.

Given that last night the thread starter's profile said he hadn't been active in months, and now it's saying he was last online a few hours back, I'd imagine he had something to do with it. I've PM'd him, but in the meantime, this link's still good.

Edited by Bomb Bloke, 08 July 2014 - 05:20 AM.


#32 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 08 July 2014 - 05:16 AM

View PostBomb Bloke, on 08 July 2014 - 05:09 AM, said:

Long videos annoy me. They should get a point across, then end.
well you didn't click the seek bar. haha.

#33 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 July 2014 - 05:19 AM

... I forgot. I did almost re-record and re-upload when I figured that out. I still might.

#34 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 08 July 2014 - 06:25 AM

Ok, so some more details on the "note" script...

It can be downloaded on its own from pastebin:

pastebin get Zs0JAs1b note

... though it's unlikely there'll be any changes to the paste in the near future (I for one am off to Japan for a month starting tomorrow), so the resource pack (with the included songs) is probably the way to go.

Those taking a look at the source (or paying attention to other recent posts of mine) will notice that you can either run the script, or you can load it as an API in order to control musical playback via other scripts.

Details as to how to use said API are commented into the source. But still, I thought it worth providing a quick tutorial as to how I implemented it into my Tetris game:

First, check that you've got access to CC 1.6, an Iron Note Block, and the API itself. If everything needed is available, load the API.

The check is optional if you want to mark those things as "requirements" for your script, but if you want users to be able to use your code with or without music, you'll need to do it. In case of my Tetris script, which runs under CC 1.5 up, the check is needed; it looks like this:

-- Load the music player, if possible.
if peripheral.find and peripheral.find("iron_note") and fs.exists("note") and fs.exists(pathToMusicFile) then os.loadAPI("note") end

Next up is starting the songEngine in parallel with your own code. This function is what handles the music decoding and playback, and because it has to trigger and pull a ton of timer events to do it, the only practical method of using it alongside whatever it is you write is to launch it in parallel.

In my case, the bulk of my script is managed by a simple "while true do" loop at the bottom:

while true do
  drawBorder()  -- Draw basic screen fluff.
  menu()        -- Query the user as to how they want to play.
  game()        -- Start a game of Tetris.
end

This gets changed to run the song engine alongside the game, if the note API was loaded:

while true do
  drawBorder()
  menu()
  if note then parallel.waitForAny(game, note.songEngine) else game() end
end

Inside the game function, the songEngine can be controlled by queuing events for it to catch. Think of this process like sending rednet messages to another system, only you don't need to worry about getting any replies back - just fire and forget:

local function game()
  os.queueEvent("musicPlay", pathToMusicFile)
  os.queueEvent(playMusic and "musicResume" or "musicPause")  -- "playMusic" is a boolean I get the value of via an INI file; if it's false, then the music still loads but just doesn't play yet.

If the song engine is loaded, then on your next yield it'll load the file and start playing it. If it's not, then nothing happens. You don't need to constantly check whether it's there or not when implementing music control into your script; no need to worry about calling undefined functions. :)

The body of the game consists of another loop which waits for events (timers, key presses, mouse input and so on). To loop the music, an additional event check was thrown in:

    -- Stuff that happens while a block falls.
    while falling do
      myEvent = {os.pullEvent()}

      if myEvent[1] == "timer" and myEvent[2] == flickerTimer and curBlock > 13 then
            ... etc

      -- Repeat music.
      elseif myEvent[1] == "musicFinished" then  -- the song engine throws this event when the track ends.
        os.queueEvent("musicPlay",musicFile)

      elseif etc...

Finally, a pause toggle was added to stop playback if the user wishes:

      -- Toggle music playback.
      elseif pressedKey(keys.m) or (user mouse clicked the music toggle button) then
        playMusic = not playMusic
        os.queueEvent(playMusic and "musicResume" or "musicPause")

And, well, yeah. Adding music to the game was pretty much exactly that easy.

Edited by Bomb Bloke, 08 July 2014 - 06:36 AM.


#35 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 09 July 2014 - 01:52 AM

Wait, isn't this just http://www.computerc...peripherals-33/ for 1.6.4?
I might use this mod for audio for PokeCC, though in the format for the old ccTunes thing because there's already a battle song included.

Edited by Geforce Fan, 09 July 2014 - 01:57 AM.


#36 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 09 July 2014 - 02:35 AM

View PostGeforce Fan, on 09 July 2014 - 01:52 AM, said:

Wait, isn't this just http://www.computerc...peripherals-33/ for 1.6.4?
no it's not. Yes it is reimplementing three of the blocks that people liked (my self included) but there's plans to go well above and beyond what MiscPeripherals added, you should be able to tell that just by the planned features.

View PostGeforce Fan, on 09 July 2014 - 01:52 AM, said:

I might use this mod for audio for PokeCC, though in the format for the old ccTunes thing because there's already a battle song included.
well if you use the ccTunes format you'll have to write your own playback API, the note API is only compatible with the NBS format.

#37 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 09 July 2014 - 05:05 AM

View Posttheoriginalbit, on 09 July 2014 - 02:35 AM, said:

View PostGeforce Fan, on 09 July 2014 - 01:52 AM, said:

Wait, isn't this just http://www.computerc...peripherals-33/ for 1.6.4?
no it's not. Yes it is reimplementing three of the blocks that people liked (my self included) but there's plans to go well above and beyond what MiscPeripherals added, you should be able to tell that just by the planned features.

View PostGeforce Fan, on 09 July 2014 - 01:52 AM, said:

I might use this mod for audio for PokeCC, though in the format for the old ccTunes thing because there's already a battle song included.
well if you use the ccTunes format you'll have to write your own playback API, the note API is only compatible with the NBS format.
wrong, musicplayer works just as well as it did on the other mod, if not better... probably better.
I wasn't implying it's a bad thing, it's great you've reimplemented lost features. I'm glad, really.

Edited by Geforce Fan, 09 July 2014 - 05:06 AM.


#38 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 11 July 2014 - 05:04 PM

I did bring it up with theoriginalbit last night, but it seems that there's a problem with the note program playing the right instruments. For some reason, Bass Drum and Double Bass gets mixed up. But I've let him know of the issues, and he'll apparently talk to Bomb Bloke about it, since it's mostly his program.

I do have a suggestion however, if this is possible. Perhaps add an option for the iropn noteblock (disabled by default in the config) to act much like the new way commandblocks would work, being able to play a sound file from a resource pack (or frmt he vanilla sound list). There is currently a need out there for a "sound producing block", and I think it would be a nice addition to the peripheral. Considering there's no way to play sounds from the resource pack without the commandblocks right now.

Edited by Cranium, 11 July 2014 - 05:04 PM.


#39 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 12 July 2014 - 01:34 PM

View PostCranium, on 11 July 2014 - 05:04 PM, said:

There is currently a need out there for a "sound producing block", and I think it would be a nice addition to the peripheral.
well the main thing about that 'need' is that the person that wants a sound producing block doesn't want to actually install a peripheral mod to do so.

#40 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 13 July 2014 - 08:38 AM

A block, that turns on computers when loading chunk would/starting game would be good.
If somrbody makes adventure maps controlled by computers, who's playing that map have to turn on computers, this have to be changed.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users