Jump to content




Glass I V0.3.3 - Google Glass In Computercraft, Currently recoding!


  • You cannot reply to this topic
29 replies to this topic

#1 Geforce Fan

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

Posted 15 July 2013 - 05:06 PM

I've done some thinking, and considering every time I add something or change something, 9,001 bugs get in the code, it's time for a recode of Glass. Tons of functions are noobishly coded, inefficient, laggy, confusing, and messy. Even trying to support different GUI scales is a huge issue, and even the clock on the home screen is noobishly coded and just lags down glass entirely. And at this point, I don't even want to code the current Glass just because of how stressful and messy it is. This time it will be different. I will add orginization to the code, more logicial code, won't make another pixel API(because that was just dead weight on the code, caused lag, added metric craploads of invisible shapes(that would turn visible when you used them) onto glass and was generally useless) and will generally make glass work well. I will keep the old glass up and will link a topic to the new post when I make the new glass and get the topic up. Feel free to do whatever you want to this version of glass. Mod it in any way, and you don't need to give me credit. At all(though it would be appreciated).

OLD POST:

Requires OpenPeripheral to work!
Install:
On a BASIC computer with a Terminal Glass Bridge next to it, run
pastebin get  yJgWrGpY installer
OR, if you have already installed glass, at the home screen, do
$$options
Then go to update. It should automaticly update. IF it does not, you can manually update glass the same way you installed it the very first time :)/>
Images

if you want to edit the main code, you'll need my permission.

APIs and common variables

Feature plans

Known Bugs
What to expect in the next version
What's New?


Credits: Me(Hithere__): Making Glass
GopherAlt: Making Goroutines
Mikeemoo: Making OpenPeripheral
Dan2000: Making Computercraft

Tips & Tricks



See the very first released version of Glass!

Edited by Hithere__, 28 December 2013 - 06:24 PM.


#2 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 16 July 2013 - 01:19 PM

The screenies do not work :(

#3 nutcase84

  • Members
  • 711 posts
  • LocationIn My Lonely Little Computer Corner

Posted 16 July 2013 - 01:21 PM

View PostZudoHackz, on 16 July 2013 - 01:19 PM, said:

The screenies do not work :(

I can confirm this.

#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 July 2013 - 01:52 PM

Nice to see you released it :) even if it is a build.... V<major>.<minor>.<revision>.<build>

View PostIcanbreathecode, on 15 July 2013 - 05:06 PM, said:

Added "Garbage Collectors" that set variables to nil at the end of functions if they're not needed elsewhere.
Use local variables, when they're no longer referenced LuaJ will get Java's GC onto them and destroy them.

Also this line
print("deleting installer")
shell.run('delete installeralpha')

I would make this
print("deleting installer")
fs.delete( shell.getRunningProgram() )
Just incase the user hasn't named it what you suggested they name it to.

#5 Geforce Fan

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

Posted 16 July 2013 - 02:06 PM

View Posttheoriginalbit, on 16 July 2013 - 01:52 PM, said:

Nice to see you released it :) even if it is a build.... V<major>.<minor>.<revision>.<build>

View PostIcanbreathecode, on 15 July 2013 - 05:06 PM, said:

Added "Garbage Collectors" that set variables to nil at the end of functions if they're not needed elsewhere.
Use local variables, when they're no longer referenced LuaJ will get Java's GC onto them and destroy them.

Also this line
print("deleting installer")
shell.run('delete installeralpha')

I would make this
print("deleting installer")
fs.delete( shell.getRunningProgram() )
Just incase the user hasn't named it what you suggested they name it to.
Oh, I didn't know you could get the running program. Also, the installer is sort of just something I threw together in a minute, then patched it to work with v0.0002. But, I will add that later.

Also, I may need to release a v0.00021 to add a much needed function, pixelClear().

Fixed the screenies.

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 July 2013 - 03:30 PM

View PostIcanbreathecode, on 16 July 2013 - 02:06 PM, said:

Oh, I didn't know you could get the running program.
You indeed can, you can also figure out the name they called the file ...
local name = fs.getName( shell.getRunningProgram() )
... and the path it is in ...
local fullPath = shell.getRunningProgram()
local name = fs.getName( fullPath )
local path = fullPath:sub( 1, #fullPath - #name )

View PostIcanbreathecode, on 16 July 2013 - 02:06 PM, said:

Also, I may need to release a v0.00021 to add a much needed function, pixelClear().
Please do tell me, what is the 0.00001 for? In all my experience of programming I've never come across this scheme for a versioning system! The most common seen is major.minor[.build[.revision]].

#7 Geforce Fan

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

Posted 16 July 2013 - 03:49 PM

View Posttheoriginalbit, on 16 July 2013 - 03:30 PM, said:

View PostIcanbreathecode, on 16 July 2013 - 02:06 PM, said:

Oh, I didn't know you could get the running program.
You indeed can, you can also figure out the name they called the file ...
local name = fs.getName( shell.getRunningProgram() )
... and the path it is in ...
local fullPath = shell.getRunningProgram()
local name = fs.getName( fullPath )
local path = fullPath:sub( 1, #fullPath - #name )

View PostIcanbreathecode, on 16 July 2013 - 02:06 PM, said:

Also, I may need to release a v0.00021 to add a much needed function, pixelClear().
Please do tell me, what is the 0.00001 for? In all my experience of programming I've never come across this scheme for a versioning system! The most common seen is major.minor[.build[.revision]].
basically the 0's sort of resemble it's Alpha. It's not a very common system, though. I'll just change it to 0.2.1 to clear that up.

#8 Geforce Fan

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

Posted 17 July 2013 - 11:39 AM

Hey, anyone know how I should go about finding if a string is too long for tinyPrint then making overhanging words go to the next line?
Edit: Just realized this is my 200th post. Yaaay!

#9 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 17 July 2013 - 12:05 PM

View PostIcanbreathecode, on 17 July 2013 - 11:39 AM, said:

Hey, anyone know how I should go about finding if a string is too long for tinyPrint then making overhanging words go to the next line?
Edit: Just realized this is my 200th post. Yaaay!

If you can't be bothered splitting it up into words then:
local str = "hello" -- the string to split up
local str2 = "" -- the second line
local maxLen = 20 -- max length the string can be
if str:len() > maxLen then
  str2 = str:sub(maxLen + 1)
  str = str:sub(1, maxLen)
end


#10 Geforce Fan

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

Posted 18 July 2013 - 06:22 PM

never mind, see my post below

#11 Geforce Fan

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

Posted 20 July 2013 - 01:34 PM

While playing on wired's server the answer hit me, I've found a way that tests a bunch of cut-offs until it finds the right length to cut-off! It's based off of GravityScore's method but redone to account for the text not being monospaced.

#12 Eliminator

  • New Members
  • 2 posts

Posted 11 October 2013 - 07:09 PM

$$> doesn't do anything for me.

#13 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 11 October 2013 - 08:34 PM

View PostEliminator, on 11 October 2013 - 07:09 PM, said:

$$> doesn't do anything for me.
Then you don't have OpenPeripheral installed.

#14 Eliminator

  • New Members
  • 2 posts

Posted 12 October 2013 - 12:24 AM

Um, yes I do, $$help and $$exit work fine, but $$> and $$< do nothing.

#15 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 16 October 2013 - 12:16 PM

Haven't tested this program so I can't actually give any feedback, But I would suggest you put in OP what mod/peripheral you need that include terminal glasses since there are alot of people that could get confused and think that it maybe is installed in ComputerCraft or something.

#16 Geforce Fan

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

Posted 17 October 2013 - 05:18 PM

Wooah nice grave-dig guys.
I probably should release a beta now that I think of it. On it!
(and because I'm cheap I'm going to make the launcher automaticly download the beta :D)
Edit: I've gotten the beta up but will edit post and others later, out of time right now.
It will crash saying no such program right now, to fix edit glassTheme and put the hexcode 000000 in both vars, like this
bigBoxColor = 000000
Do the same with sideColors, and on the same line & program
kthxbye


Patched the installer. You may still need to go into options and set the theme to default.

#17 Geforce Fan

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

Posted 17 October 2013 - 07:14 PM

View PostEliminator, on 12 October 2013 - 12:24 AM, said:

Um, yes I do, $$help and $$exit work fine, but $$> and $$< do nothing.
I probably should have a $$list to list commands, but $$> are not used yet, and the list of commands are:
apps
options
sleep
reboot
shutdown
options
In help:
apps, version, index
In options:
Anything that's listed on the screen.
In apps:
The $$[appname] will run the app that is named that name.
------------------------------------------------------------------------------------
In the next update I'm probably going to adding Goroutines and some new GUI stuff.
But wow. Glass is starting to turn into spaghetti

#18 Geforce Fan

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

Posted 18 October 2013 - 06:39 PM

Released V0.3.2, this version adds Goroutines, a clock, and a bugged-up launcher that will automajikly relaunch glass if it crashes. You'll need to launch glass now by calling "launch".

#19 Geforce Fan

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

Posted 19 October 2013 - 09:02 PM

Does anyone know weather it would be possible to convert some of an HTML site to lua, then display it using OpenPeripheral's terminal glass boxes system, and just disclude certain HTML stuff that glass cannot display?

#20 Geforce Fan

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

Posted 19 October 2013 - 10:27 PM

In progress of patching installers and uploading Glass V3.3.
It's currently safe to update. Go to options, then update, then do $$y when it aks you if you want to update.
If glass starts freaking out, you will need to download the installer off pastebin and run it manually. This means you have downloaded glass before I patched options, and when you update you will get the patched options.
NEW FEATURES:
  • Better opening animation
  • Closing animation
  • Launcher patches
  • New help doccument, page, whatever you want to call it
  • Better sleep GUI
  • Checks for updates on launch
  • Probably a lot of other features I'm forgetting to mention.
CRASH COMMAND FTW
Posted Image

We should hold contests to see how long you can play minecraft with that crash dialog/window/box thing





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users