- ComputerCraft | Programmable Computers for Minecraft
- → martin509's Content
martin509's Content
There have been 41 items by martin509 (Search limited from 10-February 22)
#158616 Drawing Monochrome Graphics.
Posted by
martin509
on 30 December 2013 - 10:18 PM
in
Ask a Pro
Sorry if this is a painfully stupid question.
#102077 Sending Tables?
Posted by
martin509
on 26 March 2013 - 09:58 AM
in
Ask a Pro
Here's my code:
--Sender Code
local rednetoutputs = { up = 0, down = 0, diffselected}
rednet.open("bottom")
--unrelated code
diff = io.read()
if diff == "5" then gDiff = 500
rednetoutputs.diffselected = "5"
rednet.send(26, textutils.serialize(rednetoutputs))
end
--Receiver Code
rednet.open("bottom")
os.pullEvent("rednet_message")
local id1, difftable, dist1 = rednet.receive()
textutils.unserialize(difftable)
diff = rednetoutputs[diffselected]
if diff == "5" then gDiff = 500
I'm working off of Casper's Pong as a code base.
#101622 Post code tricks here!
Posted by
martin509
on 25 March 2013 - 11:35 AM
in
General
I'll start:
I made an arcade conversion of Hurdles, and in order for it to restart, when the game exited its final line was os.reboot().
Then, I made a startup program to run hurdles again on the monitor. I thus worked around having the program directly use the monitor in its code, and saved a ton of hassles.
So anyway post your Lua tricks here!
#101620 Hurdles - Arcade Edition
Posted by
martin509
on 25 March 2013 - 11:28 AM
in
Programs
I want to continue Tekkit coding so if you want touch support code it yourself, I can't imagine it being too hard.
#101227 Minemail
Posted by
martin509
on 24 March 2013 - 02:12 PM
in
Programs
No offense rhysjack7, but making an OS is a little over your head. Try modding code first, such as graphical replacement or bolting new functionality onto existing programs. Games especially, since they are easy to work with and generally don't have any small nuanced bugs that totally break your Turtle Army Coordination Empire Mining Company - Diamond Edition.
Still, I'm not really an advanced coder and can't really offer any help more than that.
#100704 Hurdles - Arcade Edition
Posted by
martin509
on 23 March 2013 - 03:26 PM
in
Programs
It was very simple and not too impressive, with a player jumping over an endless number of hurdles while out on a run. It is controlled with one button, nothing fancy.
I decided to make an 'arcade' version, modding its code so it would run on a monitor(I used 4x3) , be controlled with buttons, and restart at a title screen when you die.
Redstone input from the button is on the left, monitor is on top.
Main Game:
http://pastebin.com/7RTQYgB4
Single-line startup program, also needed:
shell.run("monitor", "top", "hurdles")
Screenies!



Especially as I've got some more games lying around, among them Pong (Jasper version) and Tunnel.
#100661 "Too long without Yielding"
Posted by
martin509
on 23 March 2013 - 01:45 PM
in
Ask a Pro
Button-press jumping
restart on monitor via separate one-line startup program that starts monitor with hurdles
"while true do" loop before game starts that waits for redstone input with a "Press Button" notification on screen in order to start game.
All this works well, except the loop. Instead of running indefinitely, the OS terminates it because it went too long without "yielding"
What?
Can I have some help here? How can I make an indefinite "wait for input" sort of loop?
By the way, here is the loop itself.
while true do
term.setCursorPos(x/2,y/2)
write("Press Button")
if redstone.getInput("left") == true then
break
end
end
The error is"Pressbios:83: Too long without yielding"
So, yeah.
#92810 bundleAPI making RedPower bundle cables EASY!
Posted by
martin509
on 03 March 2013 - 03:08 AM
in
APIs and Utilities
The colours api used to be for bundled cables specifically.
#92807 Arrow to the screen causes touch event
Posted by
martin509
on 03 March 2013 - 02:57 AM
in
Suggestions
Or even, gasp, a special touch glove or stylus to trigger touch events?
Nah. That would handicap players to one touch at a time.
#92801 [1.51]file protection
Posted by
martin509
on 03 March 2013 - 02:40 AM
in
Suggestions
That's more of an OS thing, though. I don't think this is feasible at all.
Also, about Java.
Java programs have to get compiled into Assembly and made into a exe for other users to edit them.
Unless they know assembly.
Java doesn't encrypt, it obfuscates.
Just wanted to let you know.
#92735 Cloud Computing?
Posted by
martin509
on 02 March 2013 - 05:45 PM
in
Ask a Pro
Lyqyd, on 02 March 2013 - 05:34 PM, said:
#92720 Wolf3d-style 3d engine (proof of concept)
Posted by
martin509
on 02 March 2013 - 04:17 PM
in
Programs
Also, maybe add some things like slash+dash lines on the outer edges of polygons, to give it texture.
Oh, and maybe take it a step further with walls of varying height.
#92718 Game engines?
Posted by
martin509
on 02 March 2013 - 04:11 PM
in
General
Still, I want a game engine. No. Lots of them.
Also, on the standard PC if you can.
Here is my petulant "I want games!" shopping list:
RPG engine
-fairly self explanatory
-top down, Zelda style
-multiple maps with doorways to each
-maps determined by external file(s)
-easy addition of melee and ranged weapons
Arkanoid Engine
-arkanoid was breakout with power ups, essentially
-map making
-powerup addition
Shooter Engine
Top-down shooter engine.
-maps, power-ups, yadda yadda.
-enemy types
So, why not make it?
If you can't make an engine, try to direct me to one if you know of it.
Thank you, I think we all need this sort of thing.
#92069 More text functions
Posted by
martin509
on 28 February 2013 - 01:09 PM
in
Suggestions
#92067 Alternate background colour on standard computers
Posted by
martin509
on 28 February 2013 - 01:02 PM
in
Suggestions
That would be a helpful little feature right?
- ComputerCraft | Programmable Computers for Minecraft
- → martin509's Content


