VastPark 0.81 Released
A brand new release of VastPark has just surfaced online. Lots of improvements in this one, particularly from a scripting point of view. Its now possible to create an online photoslider quite quickly and easily using the Slider plugin. (Im going to use this functionality in my next revision of VietPark very soon)
For the full list of changes and the download, visit the official VastPark download page over at http://www.vastpark.com/download.php
VastPark enters early beta stage
Version 0.80 of VastPark has just been released to the public in an early beta stage. After a decent period of time in closed beta, the team have decided to unleash it to the public in time to coincide with GDC.
You can signup for an account at www.vastpark.com/signup.php in order to get access to the download.
Im really looking forward to seeing what the community can create using this technology. Exciting times ahead!
VietPark – Part 4: Implementation
Setting up the actual layout of the site in the VastPark Site Builder is very quick and easy, so I got our champion 3D modeller in the office to knock up some assets for me and I did just that.
Some of the ideas in the original mockup I’ve decided against, such as the walls. Instead its going to be a black space with the entities arranged in a similar way to how I previously wanted them.
Here’s are some screenshots that show the site in the builder:
And here is a code sample that shows how im making it all happen:
Clicking the flags:
Using the Flickr Plugin, this is fairly simple. First I search Flickr for my username and the tags for the images that I want to show for a particular example. The below code sample shows how to do the Saigon flag:
function OnClick(sender, entity) --create the flickr object and perform a search a = Flickr() a:SearchUser('craigomatic', 'vietnam,saigon') i = 1 --generate an entity for each search result using the MoveNext command while i < 6 do item = a:MoveNext() _GenerateEntity(item, i, entity.Position) i = i+1 end end --Create the function to generate an entity for each item function _GenerateEntity(item, count,pos) --dimensions of the entity dim = Vector(0.2, 0.2, 0.01) entity = GenerateBoxEntity(dim, pos) --add the OnClick events so each entity when clicked will go to the correct page entity.Script.ScriptDictionary[EventType.OnClick].Enabled = true; --entity.Script.ScriptDictionary[EventType.OnClick].Payload = "function OnClick(sender, entity)\r\ndest = GetEntity('PicDest')\r\ninFocus = dest:GetCustom('focused')\r\nif(inFocus ~= nil and inFocus.Name ~= entity.Name) then\r\ninFocus:SetPosition(inFocus:GetCustom('basePos'), 250)\r\ninFocus:SetCustom('atBase', true)\r\nend\r\nif(entity:GetCustom('atBase') == true) then\r\npos = GetEntity('PicDest').Position\r\nentity:SetPosition(pos,125)\r\nentity:SetCustom('atBase',false)\r\ndest:SetCustom('focused', entity)\r\nelse\r\nDebug(entity:GetCustom('basePos'):ToString())\r\npos = entity:GetCustom('basePos')\r\nentity:SetPosition(pos,125)\r\nentity:SetCustom('atBase',true)\r\nend\r\nend" entity.Script.ScriptDictionary[EventType.OnClick].Payload = "function OnClick(sender, entity)\r\ndest = GetEntity('PicDest')\r\ninFocus = dest:GetCustom('focused')\r\nif(inFocus ~= nil and inFocus.Name ~= entity.Name) then\r\ninFocus:SetPosition(inFocus:GetCustom('basePos'), 250)\r\ninFocus:SetRotation(inFocus:GetCustom('baseRot'), 250)\r\ninFocus:SetCustom('atBase', true)\r\nend\r\nif(entity:GetCustom('atBase') == true) then\r\npos = GetEntity('PicDest').Position\r\nentity:SetPosition(pos,125)\r\nentity:SetRotation(Vector(0,0,0), 125)\r\nentity:SetCustom('atBase',false)\r\ndest:SetCustom('focused', entity)\r\nelse\r\npos = entity:GetCustom('basePos')\r\nrot = entity:GetCustom('baseRot')\r\nentity:SetPosition(pos,125)\r\nentity:SetRotation(rot, 125)\r\nentity:SetCustom('atBase',true)\r\nend\r\nend" e = GetEntity('frame'..count-1) destPos = Vector(e.Position.x,e.Position.y,e.Position.z) destRot = Vector(e.Rotation.x, e.Rotation.y, e.Rotation.z) --keep a record of where this entity first appeared at entity:SetCustom('basePos', Vector(destPos.x, destPos.y, destPos.z)) --and its rotation entity:SetCustom('baseRot', Vector(destRot.x, destRot.y, destRot.z)) --tell it that its at the starting pos entity:SetCustom('atBase', true) entity.RenderEnabled = false --look for the image, and apply it to the entity if(item.MediumUrl ~= nill) then tex = LoadTextureURL(count, item.MediumUrl) SetTexture(tex, entity) end entity.RenderEnabled = true startpos = Vector(pos.x,pos.y,pos.z) entity:SetPosition(startpos,100) entity:SetScale(Vector(2,2,2),100) Sleep(100) entity:SetPosition(destPos, 500) entity:SetScale(Vector(7.5,7.5,7.5),500) entity:SetRotation(destRot, 500) end
To view this site in action, visit www.vastpark.com and sign up to get access to download the browser. Once you have downloaded the browser, the link to view VietPark is: vp://vastpark/craigomatic/vietpark
Well thats it, version 1 of VietPark is up and running…so what do you think? Im already at work on version 2 which I’m pretty excited about. More details soon