Jump to content




Applications/Advice Needed - Object Oriented Window Based Multitasking OS



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

#1 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 01 March 2013 - 08:27 PM

Hi guys,

Over the last few weeks I've been working on a object-orientent window based OS, called PearOS (I know the names cliché, suggest a new one). The OS supports (in theory) unlimited applications open at once and each application can run as many windows as it wants.

Screenshots
Spoiler

The OS, as you may have noticed, is based on Mac OS. Why? A number of my friends would love to be able to use computers in Tekkit, FTB, etc. but they have absolutely no idea where to start. This is designed to make it really easy to do basic tasks such as a door lock & base control system and very advance tasks as easy as possible. Mac OS is widely regarded as the easiest OS to use... so can you see the link? It also looks the nicest, as a side effect. Although, trying to make this look 'shiny' isn't exactly easy with 16 colours on a 51 x 19 display :P)

So anyway, I will be releasing the OS soon and if anyone is interested I am inviting people to create applications for the OS such as text editors, switch boards, maybe even ports for Firewolf that will be included with the OS.

Or, if you have any ideas for features, a problem/modification with the UI, a new name (as I said earlier, PearOS is very cliché) and so on.

Just to reiterate there is no download, it's not ready yet. If you create an application you will (obviously) get a testing copy, but apart from that it won't be available until it's done.

Current Additions Suggested (all will be added):
  • Support for 'standard' ComputerCraft applications.
  • Spotlight (Mac search tool)


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 01 March 2013 - 08:37 PM

So, can you not use the default programs with this? Is it only able to handle programs created specifically for it?

#3 Frederiken23

  • Members
  • 18 posts

Posted 01 March 2013 - 08:39 PM

This looks ridiculously complicated, and awesome!
But...
It looks like *shivers* Mac....

#4 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 01 March 2013 - 08:53 PM

View PostLyqyd, on 01 March 2013 - 08:37 PM, said:

So, can you not use the default programs with this? Is it only able to handle programs created specifically for it?

Well you could run the default programs, however, as most programs use the entire screen they won't be able use windows or the user interface controls (such as lists, buttons, progress bars etc.)

#5 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 01 March 2013 - 09:10 PM

View PostFrederiken23, on 01 March 2013 - 08:39 PM, said:

This looks ridiculously complicated, and awesome!
But...
It looks like *shivers* Mac....

Actually, making an application is very easy, you'd actually have to type less code with this because the button, list etc. interaction and layout it done for you.

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 March 2013 - 09:13 PM

View Postoeed, on 01 March 2013 - 08:53 PM, said:

Well you could run the default programs, however, as most programs use the entire screen they won't be able use windows or the user interface controls (such as lists, buttons, progress bars etc.)
An extremely dodgy thing you could do, is you could override term.getSize() so that it returns <width>, <height - 1> and term.setCursorPos(x,y) to set the position to <x> and <y> + 1 ... this is extremely dodgy, but if the program developer has programmed their program nicely to allow for any screen size then their program would be allowing for the menubar... and then you could do the same as apple and do a generic app name on the bar like "XCC" (X11) making it seem like another program is running for 'compatibility' or maybe just using the name of the file...

#7 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 01 March 2013 - 09:19 PM

View PostTheOriginalBIT, on 01 March 2013 - 09:13 PM, said:

View Postoeed, on 01 March 2013 - 08:53 PM, said:

Well you could run the default programs, however, as most programs use the entire screen they won't be able use windows or the user interface controls (such as lists, buttons, progress bars etc.)
An extremely dodgy thing you could do, is you could override term.getSize() so that it returns <width>, <height - 1> and term.setCursorPos(x,y) to set the position to <x> and <y> + 1 ... this is extremely dodgy, but if the program developer has programmed their program nicely to allow for any screen size then their program would be allowing for the menubar... and then you could do the same as apple and do a generic app name on the bar like "XCC" (X11) making it seem like another program is running for 'compatibility' or maybe just using the name of the file...

Good idea, I was trying to figure out how I could do that, and that seems like it's probably the best.

#8 Mendax

  • Members
  • 366 posts

Posted 01 March 2013 - 10:22 PM

'Mac OS is widely regarded as the easiest OS to use...' Ahem, Mac user, the majority would say that Windows is easiest to use, though I run Linux and find Windows and Mac both absurd.

Anywho, you did a great job on this. It looks great! :D
Will it be Open-Source? I would certainly like a look at the code...

#9 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 02 March 2013 - 04:43 AM

View Postoeed, on 01 March 2013 - 09:19 PM, said:

View PostTheOriginalBIT, on 01 March 2013 - 09:13 PM, said:

View Postoeed, on 01 March 2013 - 08:53 PM, said:

Well you could run the default programs, however, as most programs use the entire screen they won't be able use windows or the user interface controls (such as lists, buttons, progress bars etc.)
An extremely dodgy thing you could do, is you could override term.getSize() so that it returns <width>, <height - 1> and term.setCursorPos(x,y) to set the position to <x> and <y> + 1 ... this is extremely dodgy, but if the program developer has programmed their program nicely to allow for any screen size then their program would be allowing for the menubar... and then you could do the same as apple and do a generic app name on the bar like "XCC" (X11) making it seem like another program is running for 'compatibility' or maybe just using the name of the file...

Good idea, I was trying to figure out how I could do that, and that seems like it's probably the best.

Partially overriding term functions is very hacky and not a good long-term fix. There are a number of problems inherent to that workaround. You might check out how LyqydOS does windowing.

#10 NeptunasLT

  • Banned
  • 147 posts
  • LocationVilnius,Lithuania

Posted 02 March 2013 - 09:02 AM

Good Now i got Idea for archily OS thx.

#11 ETHANATOR360

  • Members
  • 423 posts
  • Locationyour hardrive

Posted 02 March 2013 - 09:07 AM

looks pretty neat

#12 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 02 March 2013 - 11:04 AM

View PostLyqyd, on 02 March 2013 - 04:43 AM, said:

Partially overriding term functions is very hacky and not a good long-term fix. There are a number of problems inherent to that workaround. You might check out how LyqydOS does windowing.
I did say it was very dodgy.

#13 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 02 March 2013 - 11:15 AM

View PostTheOriginalBIT, on 02 March 2013 - 11:04 AM, said:

View PostLyqyd, on 02 March 2013 - 04:43 AM, said:

Partially overriding term functions is very hacky and not a good long-term fix. There are a number of problems inherent to that workaround. You might check out how LyqydOS does windowing.
I did say it was very dodgy.

You did indeed. My reply was directed more at OP regarding it as a "good idea" and "probably the best" solution. :)

#14 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 02 March 2013 - 01:20 PM

View PostLyqyd, on 02 March 2013 - 11:15 AM, said:

View PostTheOriginalBIT, on 02 March 2013 - 11:04 AM, said:

View PostLyqyd, on 02 March 2013 - 04:43 AM, said:

Partially overriding term functions is very hacky and not a good long-term fix. There are a number of problems inherent to that workaround. You might check out how LyqydOS does windowing.
I did say it was very dodgy.

You did indeed. My reply was directed more at OP regarding it as a "good idea" and "probably the best" solution. :)/&gt;

Thanks, LyqydOS' method does look pretty good, I'll take a look at the source code.

So apart from supporting standard applications, which is a must, any other feed back?

#15 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 02 March 2013 - 03:45 PM

Adding spotlight would be cool.

#16 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 02 March 2013 - 04:32 PM

View PostDlcruz129, on 02 March 2013 - 03:45 PM, said:

Adding spotlight would be cool.

Yes, that would be very cool. I'm not sure what the icon would be, maybe just a capital 'O'

#17 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 02 March 2013 - 06:39 PM

View Postoeed, on 02 March 2013 - 04:32 PM, said:

View PostDlcruz129, on 02 March 2013 - 03:45 PM, said:

Adding spotlight would be cool.
Yes, that would be very cool. I'm not sure what the icon would be, maybe just a capital 'O'

I was thinking a question mark, but it's entirely up to you.

#18 Mailmanq!

  • Members
  • 123 posts
  • LocationI am omnipresent... DUH

Posted 03 March 2013 - 06:22 AM

What do you mean by the 'OS' is object-oriented, I know you can have tables to basically act like objects, but why is this 'OS' object oriented?

#19 lieudusty

  • Members
  • 419 posts

Posted 03 March 2013 - 10:54 AM

Looks great!

#20 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 03 March 2013 - 01:58 PM

View Postmailmanq, on 03 March 2013 - 06:22 AM, said:

What do you mean by the 'OS' is object-oriented, I know you can have tables to basically act like objects, but why is this 'OS' object oriented?

Well, for example. To create a new label you would call:
local myLabel = OSLabel:new(7, 6, "Hello"),
Where 7 is the x-coordinate, 6 is the y-coordinate and "Hello" is the string. All the objects are in tables and inherit from each other.
Every object is an 'OSObject', every on-screen object is an 'OSEntity'.
An OSObject just defines what type it is basically, but an OSEntity looks like this:
OSEntity = {
  __index = OSObject, -- parent class
  x = 0,
  y = 0,
  width = 0,
  height = 0,
  title = "",
  tag = 0,
  remove = function(self)
      OSInterfaceEntities.remove(self)
  end
}
It inherits from OSObject and then adds on screen rendering information (x,y, width etc).
(By the way, 'OS' at the beginning is the prefix of all OS based commands, similar to 'NS' in Cocoa.)
This probably isn't the best explanation but it will probably be more obvious once I release the code.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users