sketchucation logo sketchucation
    • Login
    1. Home
    2. renderiza
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 98
    • Posts 783
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Making a SketchUp game named "Resballiza"

      Latest video update:

      To download the latest SketchUp game version go here;
      https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1S

      Thanks

      I have made a thread in the plugins section to showcase the game. here is the link;

      http://sketchucation.com/forums/viewtopic.php?f=323&t=48388

      Notes: For the highest score feature I have tried and failed to store the value of the last highest score in a cookie so if you close sketchup and later come back the value will remain. I guess that will be a feature to add later then.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: [Plugin] Resballiza Game v1.0.3

      Hi,

      Thanks everyone for your comments!

      Aerilius - That will be nice if you let him know. I have made a credit menu in the game to thank the people that have helped me.

      Fredo6 - Your are very kind thank you and indeed I think sketchup has a lot to offer in the field of animation.

      Justo79 - 😳 It was raining...which if you like hints, that is a very big secret on my next project but don't tell anyone. 😉


      Latest video update:

      To download the latest SketchUp game version go here;
      https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1S

      Thanks

      posted in Plugins
      renderizaR
      renderiza
    • [Plugin] Resballiza Game v1.0.3

      [pre:3fhcfa4i]Author:: Renderiza
      Plugin Name:: Resballiza
      Version:: 1.0.3
      Date:: 6/10/2013
      Cost:: Free[/pre:3fhcfa4i]

      Resballiza

      %(#909090)[Resballiza is a Dodgeball type game for SketchUp.

      My interest in making this game started when I watched "Google I/O 2008 - Advanced Ruby Scripting for Sketchup by Scott Lininger". Here is a link: http://www.youtube.com/watch?v=FALvwBN5-hc

      Scott Lininger shared the code here http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=14291 and that served me as reference to study.

      Before starting the game for SketchUp I first made the game using just Ruby and something called Gosu. I found this website http://ruby4kids.com/ruby4kids and since I had no clue about programming it was perfect for me to start with.

      Here is a video and a download to the game showing the results of just using Ruby and Gosu. Again in the links below no SketchUp was used and the download is not the SketchUp plugin.
      video - http://www.youtube.com/watch?v=XrJacQ1dOIw
      download - https://www.dropbox.com/sh/b9wp4fnvisd0qyd/-D3fdDBkZW]

      http://s22.postimg.org/hvtnezmgx/icon.png

      Available at
      sketchUcation
      pluginStore
      click here

      posted in Plugins
      renderizaR
      renderiza
    • RE: Making a SketchUp game named "Resballiza"

      @dan rathbun said:

      Did you make the background a watermark ??

      Thanks...Yes its watermark image. I was planing for the future to build animated backgrounds. Maybe using SinfonIA animation tools since it is so easy to use, but that will require other people to have the plugin as well to see the animations.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Making a SketchUp game named "Resballiza"

      Hi,

      Here is a video update;

      youtube;xFrD7ORH4X0]http://www.youtube.com/watch?v=xFrD7ORH4X0&feature=plcp

      To download the latest SketchUp game version go here;
      https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1S

      Thanks

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      @unknownuser said:

      Actually, the <embed> method is working great for making a sound if you get hit by a ball or if you grab a live or bonus because I don’t mind the pause to the game in that instance…I actually like it!

      The only problem left to resolve is how to produce a sound every time a ball falls without clipping the sound and lag.

      Well it doesn't work any good now because I added more bonus and lives items and its just a mess when you grab more than one of does.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      @dan rathbun said:

      In a UI::WebDialog for old pre-HTML5 which is what PC SketchUp currently uses...

      try using an %(#8000BF)[<embed>] tag.

      Here is how I implemented the <embed> tag;

      
      <script>
      
       function playSound(soundfile) {
       document.getElementById("dummy").innerHTML=
       "<embed src=\""+soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";
       }
       
       playSound('zap1.wav') // I then place this to play the sounds
       
      </script>
      
      <body>
      <span id="dummy"></span> //This needs to be in there or it won't work
      </body>
      

      The results:

      This script plays the sound but causes lag in the game and makes it unplayable. The frame rate pauses until the sound is played and then it continues.

      This problem didn't happen when using the UI.play_sound or UI.openURL because I asume the UI::WebDialog didn't play any part in handling the sound so it never lagged.

      I think the best option would have been UI.play_sound if it never clipped the sound when trying to play more than one sound at a time.

      The UI.openURL is the next best thing because it overlays sound perfectly and it doesn't cause lag but the UI::WebDialog loses focus and I can't play the game no more. I even try to put this <BODY ONBLUR="window.focus()"> on the webdialog but it didn't work.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Making a SketchUp game named &quot;Resballiza&quot;

      I hope Murphy is right because solving the sound effect problem its beginning to look impossible. I will try to work on other parts of the game until eureka shows at the door.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: [Code] Transforming in custom coordinate systems

      Hi,

      This solves a big problem since at least for me, maintaining the local axis of the object I want to scale is important. Thanks for this great share!

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      your code works fine when using the .html extension with

      <script>
      var snd=document.createElement('audio');
      snd.setAttribute('src', 'zap1.wav');
      snd.play();
      </script>

      But... when using .js extension and trying to open it with "Microsoft (R) Windows Based Script Host" using this code it does't work.

      var snd=document.createElement('audio');
      snd.setAttribute('src', 'zap1.wav');
      snd.play();

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      @tig said:

      OR perhaps something like
      snd=document.createElement('audio'); snd.setAttribute('src', 'zap1.wav'); snd.play();
      ?

      Keep getting errors

      Error 'document' is undefined

      ...if I use;

      var snd=document.createElement('audio');
      var snd.setAttribute('src', 'zap1.wav');
      snd.play();

      it says;

      Error: Expected ';'


      @driven said:

      When run from Ruby Console the tests in the WebDialog , except the 'IE' BGSOUND tag work on a mac, obviously only single file, as written, and only with plugin for the java ones.

      wwhdlg = UI;;WebDialog.new("wot_works_here", true, "wwh", 1200, 641, 50, 50, true);
      >  wwhdlg.set_url "http://www.phon.ucl.ac.uk/home/mark/audio/play.htm"
      >  wwhdlg.show_modal 
      >  wwhdlg.navigation_buttons_enabled=true
      

      john

      This is a nice way of testing what sounds work in UI::WebDialog

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      @unknownuser said:

      wonder if http://plugins.ro/labs/suave.htm still works nowadays. as I moved to OSX, anyone wants to try it out ?

      Well actually I tried it a couple of days ago and didn't get any sounds.

      @dan rathbun said:

      the <script> and </script> tags are HTML tags only for embedding javascript inline inside HTML files.

      There are NOT allowed in separate js files.

      I knew that... 😳 lol

      Now the error says;

      Script: C:\Program Files (x86)\Google SketchUp 8\Plugins\Resballiza\resballiza_sounds.js
      Line: 3
      Char: 1
      Error: 'Audio' is undefined
      Code: 800A1391
      Source: Microsoft JScript runtime error

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      Here is what appears now;

      Script: C:\Program Files (x86)\Google SketchUp 8\Plugins\Resballiza\resballiza_sounds.js
      Line: 1
      Char: 1
      Error: Syntax error
      Code: 800A03EA
      Source: Microsoft JScript compilation error

      The Javascript file has this code inside;

      <script>
      var snd = new Audio("zap1.wav"); // buffers automatically when created
      snd.play();
      </script>
      

      Maybe I should have other code for it to work.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      I don’t know if I am doing something wrong but the 1st option opens adobe dreamweaver.
      Dan Rathbun… As much as I will like to say I understand everything, the reality is that I just started the process of learning programming a few weeks ago but I will do my best. Thanks

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      Dan Rathbun… I followed you in step 1 but step 2 has me lost.

      The following is another of my tests;

      <head>
      <bgsound src="#" id="soundeffect" loop=0 autostart="true" />
      </head>
      
      <script>
      var soundfile="zap1.wav"
      
      function playsound(soundfile){
      if (document.all && document.getElementById){
      document.getElementById("soundeffect").src=soundfile
      }
      }
      playsound(soundfile) //to play the sound
      </script>
      

      The result;

      The sounds work but I get a quick screen freeze every time a sound is played. Maybe 300 KB sound size is too much but not sure. Anyways I will keep trying new stuff untill I stumble with a solution. If anyone is brave enough to give it a shoot please do. The game code is here;

      Dropbox - No Access - Simplify your life

      favicon

      (www.dropbox.com)

      Thanks

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Sound Effecs in SketchUp (HELP)

      Tried;
      UI.openURL(‘javascript_with_html5_audio.html')

      With the “UI.openURL” I can activate the HTML5 audio using the javascript code but, this action deselects my UI::WebDialog to open the new "html" and it makes the game unplayable.
      Although with that method all the sounds overlay with each other without any problem. Also since multiple sounds are being called constantly the browser is left with too much opened windows tabs (not good).

      If I then use;
      UI.openURL(‘sound.wav')
      This will also deselect the UI::WebDialog to open the audio player.


      I am trying to figure how to make this work by combining the UI.play_sound with UI.start_timer using this code;

      
      if (params['z'].to_i < 0 ) then
      UI.start_timer(0, false) { UI.play_sound @ball_sound;}
      end ;
      

      I have not achieved what I want, which is too concurrently overlay sounds one on top of each other without it clipping the sound. Although being able to delay or repeat the sound is nice.

      The “animation ‘block’ suggestion…I am not sure how to try that at the moment so I will research a little bit more to see if I can figure it out.

      Thanks everyone for reply...I will keep trying to solve this.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Making a SketchUp game named &quot;Resballiza&quot;

      Well good question…
      There are 10 white balls that will each reset a value of 100 of each other in the z axis when they reach the bottom of the screen.

      Examples of reset value in z axis;
      ballZa = 900 ;
      ballZb = 1000 ;
      ballZc = 1100 ;
      ballZd = 1200 ;
      ect…

      There is a possibility that after a period of time they will be near parallel of one another but to create horizontal line will be unlikely since the x axis is generated randomly. Not saying is not impossible...I guess I will have to test it and see if it happens.

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Making a SketchUp game named &quot;Resballiza&quot;

      @unknownuser said:

      So it's normal if I had onl the RB! 💚

      Ok I will made a new test when I have some free times!
      But It's some painful to download file one by one!
      A one Zip file will be a lot of better!

      Ok I have included the zip and just in case saved the sketchup file of the level in version 6. Also for the time being the sounds are disabled until problem is fixed.

      Thanks

      posted in Developers' Forum
      renderizaR
      renderiza
    • Sound Effecs in SketchUp (HELP)

      Sound Effecs in SketchUp

      Hi,

      This is related to the game I am trying to make but this following problem is so important I felt it needed its own thread. I can’t manage to find a solution for playing multiple sounds inside sketchup at the same time. I have tried;

      UI.play_sound:

      I can’t make more than one sound to play at the same time. Can it be done?

      HTML 5 Audio:

      There is a bug when I try to use this in my web dialog inside sketchup. I am presented with this error when trying to play sound using this javascript code;

      var snd = new Audio("sound.wav"); 
      
      snd.play();
      

      The above code will work in any html outside of sketchup…I don’t know why it doesn’t in the web dialog. This is what the error says;

      “Error: ‘Audio’ is undefined “

      Please I need help because for me it’s vital to play multiple sounds at the same time inside sketchup.

      Thanks

      posted in Developers' Forum
      renderizaR
      renderiza
    • RE: Making a SketchUp game named &quot;Resballiza&quot;

      @unknownuser said:

      Does it a special install or more files to install than Resballiza.rb ?

      You have not an only zip file ?

      I have run it, I have the Menu Inside the Menu Plugins,Resballiza Demo level, but nothing happen ? 😮
      tested under V7

      Apart from the "resballiza.rb" file being in the plugins directory of sketchup you also need to have the folder included in the link named "resballiza". If you have the "resballiza.rb" and resballiza folder with all the files inside the plugins directory it should work unless there is incompatibilities with a version of sketchup lower than 8. I will see if I can find the problem.

      Thanks

      posted in Developers' Forum
      renderizaR
      renderiza
    • 1 / 1