[CC Latest] MoarPeripherals
#21
Posted 25 June 2014 - 10:39 AM
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
Posted 25 June 2014 - 10:50 AM
#23
Posted 07 July 2014 - 09:13 AM
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
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.
#25
Posted 07 July 2014 - 02:06 PM
Edited by Bomb Bloke, 15 July 2014 - 02:06 AM.
#27
Posted 07 July 2014 - 04:05 PM
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
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
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
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
Posted 08 July 2014 - 03:00 AM
theoriginalbit, on 07 July 2014 - 04:05 PM, said:
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
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
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
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
Edited by Geforce Fan, 08 July 2014 - 03:01 AM.
#29
Posted 08 July 2014 - 03:25 AM
Geforce Fan, on 08 July 2014 - 03:00 AM, said:
Geforce Fan, on 08 July 2014 - 03:00 AM, said:
#30
Posted 08 July 2014 - 03:43 AM
#31
Posted 08 July 2014 - 05:09 AM
theoriginalbit, on 08 July 2014 - 03:25 AM, said:
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.
#33
Posted 08 July 2014 - 05:19 AM
#34
Posted 08 July 2014 - 06:25 AM
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
Posted 09 July 2014 - 01:52 AM
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
Posted 09 July 2014 - 02:35 AM
Geforce Fan, on 09 July 2014 - 01:52 AM, said:
Geforce Fan, on 09 July 2014 - 01:52 AM, said:
#37
Posted 09 July 2014 - 05:05 AM
theoriginalbit, on 09 July 2014 - 02:35 AM, said:
Geforce Fan, on 09 July 2014 - 01:52 AM, said:
Geforce Fan, on 09 July 2014 - 01:52 AM, said:
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
Posted 11 July 2014 - 05:04 PM
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
Posted 12 July 2014 - 01:34 PM
Cranium, on 11 July 2014 - 05:04 PM, said:
#40
Posted 13 July 2014 - 08:38 AM
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


This topic is locked











