Page 2 of 25 FirstFirst 12345612 ... LastLast
Results 11 to 20 of 248

Thread: The LaserBoy Thread

  1. #11
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,326

    Default

    Inheritance is is-a not has-a just like it is in Java. Java is derived from C++ (but not in the OOP way! .

    There are some times when it makes more sense to be the object as a whole rather than contain data fields.

    Hi Gary. I don't know what that is. I just found out about stringstreams a little while ago! I need to rewrite all of my txt file IO using them.

    My skills are largely based on being able to try, try again and keep on trying to get something to work. One of the nice things about LaserBoy is that it exists apart from time. It doesn't need to do anything in a short time.

    When I first started programming for laser in Linux only, I wrote a wave player that could do some stuff in real-time. But I gave that up to go multi-platform.

    James.
    Last edited by james; 12-09-2014 at 17:55.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  2. #12
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,055

    Default

    James, google "C++ 11" and "modern C++" and you will find a lot of information. The "Going Native" C++ conference had the talks videoed and they are on YouTube. Here is a link to MS's take on it, although this is a bit old: http://msdn.microsoft.com/en-us/library/hh279654.aspx

  3. #13
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,326

    Default

    BlueFang. I see your point about translating from one language to another, but I never intended for LB to be translated to any other language. If you want to use it with a Java wrapper around it, then just compile the C++ as object files and link to them.

    There is no way I could have discovered as much as I have if it weren't for the fact that I could write mathematically sensible code at a very high level. I would have gotten totally lost in pages of "trying-to-get-there" code.

    Multiple inheritance has it's pitfalls though. If I overload the same operator or function name in both base classes, there is ambiguity. Fortunately the compiler tells me when that happens.

    That's one of the reasons they took that out of Java.

    James.
    Last edited by james; 12-10-2014 at 09:57.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  4. #14
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,326

    Default

    One of the most confusing things in C++ is a forward declaration of a class. You can pre-declare a class name and use that name to point to a class that has not even been fully declared or defined yet in the order in which the compliler sees the code. You can only use the name as a pointer. You cannot de-reference it to any of it's members because they don't exist yet. This is sometimes used as a way to connect individual elements defined before the container they are inside-of to that container.

    In LaserBoy the segment class is constructed with a pointer to the whole space class that contains it, so it knows about all the variables that effect its existence.

    egg, chicken, egg ???

    Figuring out how to write all the header files and make sure they are all included in the right order in the implementation files and getting the Makefile sorted out can be a mind-blowing exercise.

    I'm almost positive you can do this in Java as well.

    James.
    Last edited by james; 12-10-2014 at 10:15.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  5. #15
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,326

    Default

    Quote Originally Posted by colouredmirrorball View Post
    I wish you could somehow change the keys in LaserBoy. I'm sure they make great sense on a qwerty keyboard but the rotation keys are just all over the place. I have to hold alt gr for two of them. All this while you have a perfectly good unused mouse around which could take care of that in such an intuitive way...
    What keyboard are you using?

    All of the view rotation keys are in the top row of digits.

    Have you thought about just getting a cheapo USB qwerty keyboard?

    A mouse! ??? This issue is as old as LaserBoy itself!

    In my mind, there is nothing intuitive about using a mouse to navigate 3D space that is actually at a WAY higher resolution than the 2D display you are looking at.

    What if you want to rotate exactly 42 degrees around the Y axis?

    You can set your rotation step in the [Tab] menu and do that in one key tap.

    It's all about precision. If you know where you are starting and you know what step each key tap takes, then you know where you are going and where you are when you get there.

    James.
    Last edited by james; 12-10-2014 at 10:38.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  6. #16
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,361

    Default

    I felt a great disturbance in the Force, as if millions of 3d applications suddenly cried out in terror and were suddenly silenced. I fear something terrible has happened."
    Obi-Wan Kenobi, Star Wars: A New Hope


    Quote Originally Posted by james View Post
    In my mind, there is nothing intuitive about using a mouse to navigate 3D space that is actually at a WAY higher resolution than the 2D display you are looking at.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  7. #17
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,326

    Default

    Quote Originally Posted by swamidog View Post
    I felt a great disturbance in the Force, as if millions of 3d applications suddenly cried out in terror and were suddenly silenced. I fear something terrible has happened."
    — Obi-Wan Kenobi, Star Wars: A New Hope
    Ugh. Whatever.

    At least you have to give me credit for creating something totally original. LaserBoy is not a copy of anything.

    The number one reason it doesn't use a mouse is because it started out as a Linux terminal application. Originally it was built on top of ezfb (a Linux frame buffer, high resolution, full color graphics card API, that I also wrote). It took two computers to make it work. The Linux machine provided the high resolution display for the vector art and another computer provided a shell into the Linux machine to control the application through good old text menus.

    I had to figure out all kinds of ways to do what I wanted to do with nothing but standard terminal input. Once I got started, I realized I could do everything I needed to do this way.

    Then I was clued into libSDL and I rewrote the whole thing to be able to compile it for any OS. LaserBoy has its own 8x8 pixel bit-mapped font just for all those wonderful text menus!

    Programming from the ground up for mouse is a total PITA! You have to trap the mouse events and figure out where it is and what is under it on the display. That takes more code than everything else in LaserBoy!

    As it is, the keyboard user interface is a HUGE part of the code.

    Once you learn the layout of the menus, you can fly around and get all kinds of stuff done in a hurry. And you never have to take your hands away from the keys!

    LaserBoy might not be the most intuitive application for 3D laser art, but 3D laser art isn't exactly an intuitive thing. I have made no attempt to dumb-it-down and I never will.

    James.
    Last edited by james; 12-10-2014 at 11:22.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  8. #18
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,361

    Default

    absolutely. as i've said a number of times, i think there's a lot of good stuff under the hood of laserboy.

    the interface is the show stopper for me.

    Quote Originally Posted by james View Post
    Ugh. Whatever.

    At least you have to give me credit for creating something totally original. LaserBoy is not a copy of anything.

    The number one reason it doesn't use a mouse is because it started out as a Linux terminal application. Originally it was built on top of ezfb (a Linux frame buffer, high resolution, full color graphics card API, that I also wrote). It took two computers to make it work. The Linux machine provided the high resolution display for the vector art and another computer provided a shell into the Linux machine to control the application through good old text menus.

    I had to figure out all kinds of ways to do what I wanted to do with nothing but standard terminal input. Once I got started, I realized I could do everything I needed to do this way.

    Then I was clued into libSDL and I rewrote the whole thing to be able to compile it for any OS. LaserBoy has its own 8x8 pixel bit-mapped font just for all those wonderful text menus!

    Programming from the ground up for mouse is a total PITA! You have to trap the mouse events and figure out where it is and what is under it on the display. That takes more code than everything else in LaserBoy!

    As it is, the keyboard user interface is a HUGE part of the code.

    Once you learn the layout of the menus, you can fly around and get all kinds of stuff done in a hurry. And you never have to take your hands away from the keys!

    James.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  9. #19
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,326

    Default

    Well maybe sometime you could contact me on Skype, open LaserBoy on your machine and share that window with me.

    I've opened a lot of people's eyes that way.

    I bet I could get you doing all kinds of stuff you never imagined possible in short order.

    This is an invitation to everyone.

    I love doing this. It's always a lot of laughs.

    I've even done it with people who don't speak English!

    James.
    Last edited by james; 12-10-2014 at 11:54.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  10. #20
    Join Date
    Jul 2008
    Location
    My momentum is too precisely determined :S
    Posts
    1,764

    Default

    I don't feel like getting a separate keyboard just for Laserboy :P

    Rotating, translating and scaling using a mouse can be more accurate than you think. Have you used a modern 3D application recently?
    Besides there's no reason you have to choose one. Most programs should have both. In Blender for example, you can use the mouse to rotate a model. But you can also hit r (to rotate), x (to lock the rotation to the x axis) and the amount of degrees you want to rotate it.

    Sorry for not catching everything you said, but is there a reason you need to program the mouse from the ground up?
    Besides, isn't some kind of mouse manipulation already happening? The mouse image changes when you go over the Laserboy frame.

    Quote Originally Posted by james View Post
    Well maybe sometime you could contact me on Skype, open LaserBoy on your machine and share that window with me.

    I've opened a lot of people's eyes that way.

    I bet I could get you doing all kinds of stuff you never imagined possible in short order.

    This is an invitation to everyone.

    James.
    Count me in!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •