Prince IO Sketchup Game Demo

Prince IO Sketchup Game Demo

Postby ScottLininger » Sat Nov 22, 2008 10:54 pm

Hey everyone,

I've finally found the time to assemble a ZIP containing the knight game demo that I presented at Google IO last year. Unzip the contents into your Sketchup Plugins directory, then look for a new menu item under Plugins > Knight Game

<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>

This is an example of using a Ruby WebDialog to capture key strokes and control SU in a fun way. You can hear more details from the original preso: http://www.youtube.com/watch?v=FALvwBN5-hc

Special thanks to Todd Burch for cleaning up the code and adding sound effects! If you could see my original demo code (and you never will!), you'd know why he's my hero. :D And apologies to the community for taking so long to share.

Cheers,
0
Last edited by ScottLininger on Sat Nov 22, 2008 11:03 pm, edited 1 time in total.
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger 
 

Re: Prince IO Sketchup Game Demo

Postby remus » Sat Nov 22, 2008 10:58 pm

could we have the .zip please? :)
0

remus 
 

Re: Prince IO Sketchup Game Demo

Postby JuanV.Soler » Sat Nov 22, 2008 11:26 pm

Thanks :)
(remus, the link is given above)
0
_,_)))_,_

JuanV.Soler 
 

Re: Prince IO Sketchup Game Demo

Postby Daniel S » Sat Nov 22, 2008 11:47 pm

Amazing game!!! :berserk: :berserk: :berserk:
Great work!!

Thank you,
Daniel S
0

Daniel S 
 

Re: Prince IO Sketchup Game Demo

Postby Dhruv » Sun Nov 23, 2008 2:35 am

Thanks Scott, can feel that many more things can be done integrating javascript with sketchup.

Cheers,
Dhruv
0

Dhruv 
 

Re: Prince IO Sketchup Game Demo

Postby Dhruv » Mon Nov 24, 2008 1:08 am

Hey Scott,

I tried converting 2dimensional game into 3d, like ability to go left and right. I did make some changes and it turns left and right, but does not run in that direction.

And yes I changed 3rd person view to 1st person and going forward is up key and backward is down key. So before doing that I basically commented jump sword functions.
0

Dhruv 
 

Re: Prince IO Sketchup Game Demo

Postby Chris Fullmer » Mon Nov 24, 2008 6:37 am

Thanks for posting that Scott!

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: Prince IO Sketchup Game Demo

Postby Fletch » Mon Nov 24, 2008 7:05 pm

thanks! I wanted this first time I saw it! :lol:

unfortunately I'm at work, and they refuse to give me SU7 for a few more weeks... no way we could get an SU6 version, is there?!
0

Fletch 
Twilight Render
 

Re: Prince IO Sketchup Game Demo

Postby linea » Mon Nov 24, 2008 7:25 pm

AWESOME SCOTT & TODD! Its fantastic, I had no idea this sort of thing was possible in SU. I want to make one! "How?" is a question I'm sure you'll be asked alot more.
0

linea 
 

Re: Prince IO Sketchup Game Demo

Postby Dhruv » Mon Nov 24, 2008 11:54 pm

I made it run along Y axis as well, it was a little change and assigned J and S for jump and Swordhit respectively. Arrow keys for direction. Ill try and add more features.

Cheers,
Dhruv
0

Dhruv 
 

Re: Prince IO Sketchup Game Demo

Postby Dhruv » Tue Nov 25, 2008 5:45 am

Hey Coen Naninck,

I wanted to do something related to Dynamic components, like when you click on an object/model, it brings to some website. Like lets say I have built a Kawasaki motor bike , when I left click on it brings me to some kawasaki website online.

Will try out though, see if I can come out with this feature. It would be cool to use it in a game.

Cheers,
Dhruv
0

Dhruv 
 

Re: Prince IO Sketchup Game Demo

Postby pilou » Tue Nov 25, 2008 9:33 am

Totally amazing :fro:
prince.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: Prince IO Sketchup Game Demo

Postby notareal » Tue Nov 25, 2008 9:38 am

:berserk: Thanks!
0
Welcome to try Thea Render, Thea support | kerkythea.net -team member

notareal 
Thea Render Support
Thea Render Support
 

Re: Prince IO Sketchup Game Demo

Postby HFM » Tue Nov 25, 2008 11:58 am

Fletch wrote:thanks! I wanted this first time I saw it! :lol:

unfortunately I'm at work, and they refuse to give me SU7 for a few more weeks... no way we could get an SU6 version, is there?!


It's pretty simple to make this SU6 compatible. Just save the maps [.skp] as SU6
0

HFM 
 

Re: Prince IO Sketchup Game Demo

Postby Matt666 » Tue Nov 25, 2008 12:38 pm

:shock: :shock: :shock:
That's incredible...
:berserk: :berserk: :berserk:
0
Frenglish at its best !
My scripts

Matt666 
 

Re: Prince IO Sketchup Game Demo

Postby •BTM » Wed Nov 26, 2008 2:32 am

I have a mac running OSX 10.5.5, and for every frame, I encounter the error
"newGroundz:
value=>-5000<
TypeError: Value undefined (result of expression value.split) is not object."
.
the error pops up first, i have to click enter, then next frame, same error, this repeat over and over, then the knight falls through the floor, screams, and SU messes up. Any idea why?
0

•BTM 
PluginStore Author
PluginStore Author
 

Re: Prince IO Sketchup Game Demo

Postby ScottLininger » Wed Nov 26, 2008 5:43 am

BTM,

Ah, there's a snippet of code in the .rb file that detects if you're on a mac, but it was added back when the mac/su6 had WebDialog errors that are fixed in 7.

I'll need to test on my Mac with SU7 and post a fixed version.
0
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger 
 

Re: Prince IO Sketchup Game Demo

Postby plot-paris » Thu Nov 27, 2008 1:09 pm

fantastic! thank you so much for posting this game. indeed, a new era is about to begin :ecstatic:
0
User avatar
plot-paris 
 

Re: Prince IO Sketchup Game Demo

Postby chief1234 » Wed Dec 10, 2008 2:55 am

Thanks Scott, this is great!!

I'm working on incorporating this into a school project, and I'm wondering if there's a way to load the engine onto any map without it being hardcoded.

IE - if I could download anything from the 3D warehouse, start the Knight plugin and be able to navigate?

Thanks in advance,

Luke J.
0

chief1234 
 

Re: Prince IO Sketchup Game Demo

Postby ScottLininger » Wed Dec 10, 2008 5:14 pm

chief1234 wrote:I'm wondering if there's a way to load the engine onto any map without it being hardcoded.


Well, you could do one of two things.

1. Open one of the .skp files inside Plugins/knightgame and edit the maps directly.
2. Open the knightgame.rb file and modify the code to not load in a new model but simply run on top of the current model.

So yeah... it's doable. Let me know if you have specific questions. :)
0
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger 
 

Re: Prince IO Sketchup Game Demo

Postby chief1234 » Thu Dec 11, 2008 12:13 am

Right, changing the code to run on top of the current model would be ideal.

Unfortunately, I'm a novice at Ruby so I'm not quite sure how to do this...

I tried removing any direct references to maps in the file_loaded? method at the bottom. This way the engine will run, but only on maps AFTER they have been hardcoded, run, then the code removed again...

Obviously I'm missing a vital part of the puzzle...

Any help out of your busy schedule would be greatly appreciated!

Thanks,
Luke J.
0

chief1234 
 

Re: Prince IO Sketchup Game Demo

Postby toxic » Tue Dec 23, 2008 4:36 pm

Thats fantastic :berserk:

So when do we get worms :sketchstatic:
0

toxic 
 

Re: Prince IO Sketchup Game Demo

Postby trickout » Tue Jan 27, 2009 5:28 am

when i try to go to the linked site for the .zip, it says sight unavailable

can someone post it somewhere else?
0

trickout 
 

Re: Prince IO Sketchup Game Demo

Postby ScottLininger » Tue Jan 27, 2009 7:25 am

Hello trickout. Terribly sorry for the broken link. Please try again.

Cheers,
0
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger 
 

Re: Prince IO Sketchup Game Demo

Postby trickout » Fri Jan 30, 2009 1:54 am

Thank you for fixing the link. How can I edit the code, for instance make it move in 3 dimensions instead of just on a plane? I've tried to find a .rb editor but no success. :(
0

trickout 
 

Re: Prince IO Sketchup Game Demo

Postby todd burch » Fri Jan 30, 2009 3:12 am

.rb files are merely text files. Notepad, Textedit, lots of editors will work. Always save as plain text.
0

todd burch 
 

Re: Prince IO Sketchup Game Demo

Postby August » Fri Feb 20, 2009 11:10 am

ScottLininger wrote:... You can hear more details from the original preso: http://www.youtube.com/watch?v=FALvwBN5-hc


YouTube says: "We're sorry, this video is no longer available."

Any alternate sources?

Thanks,
August
0
“An idea, like a ghost, must be spoken to a little before it will explain itself.”
-- Charles Dickens

August 
 

Re: Prince IO Sketchup Game Demo

Postby ScottLininger » Fri Feb 20, 2009 5:47 pm

August wrote:YouTube says: "We're sorry, this video is no longer available."

Any alternate sources?


Hey August,

I've sent a query to the code site folks asking what happened to the video.

Thanks!
0
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger 
 

Re: Prince IO Sketchup Game Demo

Postby Trimmer » Mon Apr 06, 2009 4:55 pm

Hi Scott,

I'm Having the same problem BTM did back in Nov:

•BTM wrote:I have a mac running OSX 10.5.6, and for every frame, I encounter the error
"newGroundz:
value=>-5000<
TypeError: Value undefined (result of expression value.split) is not object."
.
the error pops up first, i have to click enter, then next frame, same error, this repeat over and over, then the knight falls through the floor, screams, and SU messes up. Any idea why?


ScottLininger wrote:I'll need to test on my Mac with SU7 and post a fixed version.


Have you found a way to correct this?
0

Trimmer 
 

Re: Prince IO Sketchup Game Demo

Postby driven » Sun Feb 21, 2010 12:49 pm

Hi All,

did anyone ever get this running on a Mac? can something be changed to make it run?

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

driven 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Developers' Forum

Who is online

Users browsing this forum: aminudin, yavuzuneri and 7 guests

Visit our sponsors: