Prince IO Sketchup Game Demo

Re: Prince IO Sketchup Game Demo

Postby todd burch » Sun Feb 21, 2010 3:22 pm

This was working on a Mac back when Scott posted this thread. Did someone or SU break it since then?
0

todd burch 
 

Re: Prince IO Sketchup Game Demo

Postby driven » Sun Feb 21, 2010 4:33 pm

hi Todd,

I only downloaded it recently and it appears to have the same symptoms as BTM's early post described, so I thought it had not been fixed....

or the solution had moved on to a different thread, as sometimes happens...

so, it's not currently working on 7.1 on a Mac and although I'm happy to modify the code, I'd need some instructions.

cheers

john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: Prince IO Sketchup Game Demo

Postby ScottLininger » Mon Feb 22, 2010 5:57 pm

Hmm. Todd's cleaned up version was working on mac. I'll take a look...
0
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger 
 

Re: Prince IO Sketchup Game Demo

Postby driven » Mon Feb 22, 2010 6:20 pm

Thanks for that...

john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: Prince IO Sketchup Game Demo

Postby MartinRinehart » Tue Feb 23, 2010 3:16 pm

Todd Burch,

Congratulations on the quality of that code. To my eye, this is super readable:
Code: Select all
var BACKSPACE =  8 ;
var TAB       =  9 ;
var ENTER     = 13 ;
var SHIFT     = 16 ;
...


Just one question: why the space before the semicolon?
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: Prince IO Sketchup Game Demo

Postby driven » Tue Feb 23, 2010 4:14 pm

hi,

I can't believe it myself, but I now have it working on my Mac...

I changed it to "darwin" in line 137 and he longer falls

Code: Select all
   if RUBY_PLATFORM.include?("darwin") then script = "top.GROUNDZ = " + groundZ.to_s + ";"
   else script = "newGroundZ(" + groundZ.to_s + " );" ; 
   end ;
   dialog.execute_script(script);


now to see if all else works.....

john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: Prince IO Sketchup Game Demo

Postby todd burch » Tue Feb 23, 2010 7:24 pm

MartinRinehart wrote:Todd Burch,

Congratulations on the quality of that code. To my eye, this is super readable:
. . .

Just one question: why the space before the semicolon?


Habit. Most languages I code in require a semi colon (C / C++ / Java / Javascript / PL/1 ) and other languages (Ruby, REXX) a semi colon is optional. Just a style I've developed over the last ... 26 years I guess it is now...

Thanks. Todd
0

todd burch 
 

Re: Prince IO Sketchup Game Demo

Postby Jim » Fri Dec 17, 2010 4:47 am

It's been a few years since Scott released this game demo, and I thought there might be a few people who have not seen it, so here it is. bump. I was floored at the time to see this working in SketchUp, but it is still pretty awesome.

There is a link to download the game in the first post of this topic - it works with sketchup 8.

There is a clip in the video showing the game starting at 19m30s, but there's a lot of good developer info in the rest of the video too.

YouTube - Google I/O 2008 - Advanced Ruby Scripting for Sketchup
by GoogleDevelopers

0
Hi

Jim 
Global Moderator
 

Re: Prince IO Sketchup Game Demo

Postby thomthom » Mon Apr 20, 2020 5:17 pm

ScottLininger wrote:<edit>
Too big to upload to the forums, so you can get it here...
http://www.sketchupdemos.com/knightgame.zip
It's about 4mb.
</edit>


Does anyone still have a copy of this file?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Previous


 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 5 guests

Visit our sponsors: