Making a SketchUp game named "Resballiza"
-
Current issue at hand…
In the code bellow the references have to be “$” (constant) or else the script won’t work.
1st Problem
I have tried to use “@”& “@@” but it doesn’t seem to work… I should not use a constant as reference but right now I am lost in how to not use them.2nd Problem
When using this following code:… This code is similar to the one been used by the following here;
http://forums.sketchucation.com/viewtopic.php?f=180&t=25498#p218970module Renderiza module Resballiza class SuGame $x ||= 600 $z ||= 800 if $z <=> 800 $z = $z - 100 end if $z <= -200 $z = 800 $x = rand(600) end def nextFrame( view ) $ball.move! $t #<<<---- using the move! there return ( Time.now() - $start ) <3 end def stop() puts 'emptying trash' end $ball = Sketchup.active_model.selection[0] @move = Geom;;Vector3d.new($x,0,$z) $t = Geom;;Transformation.translation(@move) $start = Time.now() end # of class SuGame view = Sketchup.active_model().active_view() view.animation = SuGame.new end #module Resballiza end #module Renderiza
Continuation of problem #2…
When the animation is started the object is position doesn’t travel down like it should with only one click. I still have to keep clicking the ‘exec’ button for it to move.
There is something about this “move!” method because if you replace that with “transform!” like it was originally written by the other guys then the object is position changes over time. But there has to be something that will still enable me to use the move! method because I really like that it uses the global axis of sketchup instead of the local axis of the object the transform! uses.
-
Hi,
Here is a video update about the progress of the game so far;
http://www.youtube.com/watch?v=1LFGDhsZvcs&feature=plcp
I need to find an alternative solution for playing sound effects since the Sketchup "UI.play_sound" can't seem to handle simultaneous sounds to overlay each other.
The current script is based on Scott Lininger's "Prince IO" but a lot of things are different. For example the collision is base on a javascript code to compare distances and not sketchup raytrace.
If you want to test the current alpha version of the game you can download it here for testing.
https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1S
Thanks
-
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 -
@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 V7Apart 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
-
@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
-
So it's normal if I had only 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! -
Thanks for the ZIp file!
All works fine now! (tested on V7)
Have you a test (or other thing) for be sure there is not a fully horizontal line of balls ? -
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.
-
Impossible is always probable :Murphy's law!
-
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.
-
@unknownuser said:
I hope Murphy is right because solving the sound effect problem its beginning to look impossible. ...
Did you try the <embed> tag yet?
See: http://sketchucation.com/forums/viewtopic.php?f=180&t=48260&p=433470#p433470
It is not impossible.. we are having you the obvious simple possibilities first (because they are likely to be cross-platform, and because the system specific solutions are very advanced programming exercises.)
-
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/bIqndmMs1SThanks
-
Cute!
Did you make the background a watermark ??
-
@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.
-
Latest video update:
http://www.youtube.com/watch?v=JuM2qtBy7bs&feature=plcp
To download the latest SketchUp game version go here;
https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1SThanks
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.
-
Hey, great job! It looks great!
Chris
-
@chris fullmer said:
Hey, great job! It looks great!
Chris
Chris thank you very much!
Video Update #3
http://www.youtube.com/watch?v=RTuhPfFGl9Y&feature=plcp
To download the latest SketchUp game version go here;
https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1SThanks
Advertisement