Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

pedrosgali

Members
  • Content Count

    42
  • Joined

  • Last visited

  • Days Won

    6

pedrosgali last won the day on September 23 2016

pedrosgali had the most liked content!

3 Followers

About pedrosgali

  • Rank
    Junior Member
  • Birthday January 7

Profile Information

  • Gender
    Male

Contact Methods

  • Minecraft
    pedrosgali
  • GitHub
    pedrosgali

Recent Profile Visitors

710 profile views
  1. Thanks man, I used the library from this to make Minejaro. It's a front end GUI for openOS, if you like the style of this you should check it out. It needs looking at again really but I rarely have time these days.
  2. Hey guys, finally added the library for calling images yourself. Sorry it took so long but I wrote a new compression method that will save you a lot of RAM, this is done automatically on loading an image. It also required a new render method which is only marginally faster but still a little faster. Happy painting
  3. Thanks man. I've been asked to start an after school club to teach kids the basics of programming using minecraft, just been looking through my old code to see what I can salvage.
  4. Hey guys, been away for a while. I'll post an API for displaying the images as stand alone data later tonight, didn't really think about it at the time lol.
  5. robot.turnLeft() is the command, all commands are in camelCase so the first word is not upper case but the first letter of each subsequent word is.
  6. Shouldn't it read robot.turnLeft() capitol L
  7. http://www.lua.org/manual/5.2/manual.html#lua_tonumberx
  8. I tend to use a slightly different method but the above example is perfectly fine, I'll post mine in case you find it easier and partly to show my favourite thing about coding... Mainly that there is never just one right answer. I do most of my processing in the loop so... local event = require("event") local keyboard = require("keyboard") local running = true while running do ev, p1, p2, p3, p4, p5 = event.pull(1, _, ev, p1, p2, p3, p4, p5) if ev == "key_down" then local char = keyboard.keys[p3] if char == "w" then --your move forward code block here elseif char == "s" then --your move backward code block here elseif char == "a" then --your move left code block here elseif char == "d" then --your move right code block here elseif char == "q" then running = false end elseif ev == "touch" --do other cool stuff end end While writing that I thought... What if it went forward like 10 if it received a W instead of a w that would be cool. Then I thought why such an arbitrary number? why not have numerical inputs set the distance? Like this... local event = require("event") local keyboard = require("keyboard") local distance = 1 local running = true while running do ev, p1, p2, p3, p4, p5 = event.pull(1, _, ev, p1, p2, p3, p4, p5) if ev == "key_down" then local char = keyboard.keys[p3] if tonumber(char) then --Edited to include Sangars change... for ease of copy pasting. if char == 0 then distance = 10 else distance = char end end if char == "w" then for i = 1, distance do --your move forward code block here end elseif char == "s" then --your move backward code block here elseif char == "a" then --your move left code block here elseif char == "d" then --your move right code block here elseif char == "q" then running = false end elseif ev == "touch" --do other cool stuff end end Haven't used tonumberx in OC yet so not 100% sure that it works but it's like tonumber except it returns boolean according to the Lua reference manual. That modification should let you use the numbers 0-9 as 1-10, 0 being 10. Hope this helps.
  9. Nickname: Pete Age: Too old to be playing Minecraft. Minecraft Name: PedrosGali IRC nick: pedrosgali
  10. Yeah, I wrote this before openOS was installable. It was OC 1.2 or something, the /lib folder was read only. *Edit: Can a moderator delete this thread as it is out of date and may cause confusion to some.
  11. pedrosgali

    Minejaro

    Added a pretty picture so you have some idea as to what this is. Please excuse the bad resolution, I broke my good monitor so I'm stuck on low res.
  12. pedrosgali

    Minejaro

    Actually it's a window manager, no desktop as such. It is literally a front end GUI for openOS. It does allow multiple 'window' programs to all be running at once and I do plan to add a desktop environment at a later date. I just can't figure out how to get icons and shortcut without the framerate going down the toilet. Yet. You're right about the pictures though, I need some screen shots. I'll put some up after work.
  13. pedrosgali

    Minejaro

    Added basic text editor so you can now check a file without leaving the editor, just bring up a new window.
  14. In fairness yeah, it should be a local.
  15. I tend to opt for a boolian switch for exiting, running = true while running do run() end then you have a variable 'running' which can be toggled. Anywhere.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.