gfx 3D engine的matlab license购买如何购买

您的位置:
→ 我还活着丢失Lead3DEngine.dll解决方法
我还活着丢失Lead3DEngine.dll解决方法
15:54:31 来源: 作者:ldy常乐 (1)
&不少网友我还活着下载好游戏之后、打上破解补丁游戏还是无法运行。提示丢失Lead3DEngine.dll,跑跑车游戏网给大家提供了详细的解决方法。我还活着丢失丢失Lead3DEngine.dll解决方法是因为玩家没有找到正确的游戏启动程序、游戏启动程序在深层目录下:X:\I am Alive\src\System\IAmAlive_game.exe才是正确的游戏启动程序只需要重新将破解补丁复制在对应的目录下。然后启动上面显示的exe执行文件即可。
相关补丁下载:
免DVD破解补丁 - 5.9M
相关游戏攻略
? ? ? ? ? ? ? ?
本站提供: 好玩的单机游戏,是大型基地网站Copyright &
.All Rights Reserved备案编号:湘ICP备号-1oZone3D.Net - Demoniak3D - Scriptable 3D Engine - Real time 3D, OpenGL and GLSL, XML and LUA, Ageia PhysX, Demos
GLSL HackerCurrent version: 0.8.2FurMarkCurrent version: 1.18.0GPU Caps ViewerCurrent version: 1.31.0GPU SharkCurrent version: 0.9.10
BlogsGeeks3D's ArticlesPhysX FluidMarkCurrent version: 1.5.2GeeXLabCurrent version: 0.4.0TessMarkCurrent version: 0.3.0ShaderToyMarkCurrent version: 0.3.0Demoniak3DCurrent Version: 1.23.03D Graphics Search Engine:
Demoniak3DTools and Auxiliary Libraries
GLSL Hacker demos
Geeks3D latest news
Geeks3D forum newsMisc
Page generated in 0.4707 seconds.Developer:
Digini Inc. is a Software Development company foun
Not specified
Supported Platforms:
Windows, Xbox
Languages Written In:
Languages Supported:
Graphics APIs:
(2 reviews)
Note: This resource is marked as inactive because it is no longer maintained by the owners.
Blade3D is the first all-in-one game development system designed from the ground up to take full advantage of the brand new Microsoft XNA platform. As well as the core engine that is designed to work on both Windows(R) XP and the XBox 360, Blade3D features a fully dynamic design time environment that allows you to see changes to all your game components, shaders and assets in real time.
Blade3D is not a port of an existing engine, it is a complete solution designed around the brand new XNA Framework. It is therefore completely shader based throughout and has no ties to a fixed function past. What’s more, unlike many engines that require you to modify the engine source, Blade3D takes a highly granular approach. You can choose to dip in and use whatever aspects you need and no more. Scenes you create in the development environment can be run standalone or exported as a components that you can call from your own code.
No videos available.
Supported Features
Object-Oriented Design
The core of Blade3D is a dynamic object model featuring on-the-fly type creation, serialization services, multiple-inheritance and a powerful subscription based notification system. This object model unifies every feature in the system allowing interaction between the various isolated sub-systems.
The object model is fully scriptable and provides a rich API that allows many services to the application programmer. Properties can be set on multiple objects simultaneously, queries can be made to locate objects of a specified type, fields and base classes can be even be added and removed at run-time.
Blade3D provides full support for scalable vector fonts. The development environment allows any Truetype fonts to be converted into light-weight geometry based glyph sets that can then be used in your scene. Proportional fonts and fonts that provide kerning information are also fully supported.
The built-in font support in Blade3D makes it much easier to create compelling HUD interfaces. Vector fonts are scalable, able to be placed in a 3D environment and effects can be applied to them like any other geometry based object. As compared to regular bitmap fonts they are therefore more flexible and appropriate for content development.
Environment Mapping
Lens Flares
Billboarding
Particle System
Depth of Field
Motion Blur
By visually connecting components in the graph editor you can easily create stunning particle systems in a matter of minutes.
Any object in the entire system can be used to control the properties of the particle effects. This means for example you can control the emission rate from collisions or input devices, collide the particles against scene geometry or trigger animations and sounds at various points during the effect.
Out of the box Blade3D provides a great set of post-processing and special effect filters. Add amazing effects like motion blur, bloom or depth of field from the built-in library or use HLSL to create your own.
Shadow Mapping
Blade3D(R) provides a per light, tweakable full scene soft shadowing solution that is easy to use and efficient on current GPU’s.
Multi-texturing
Bumpmapping
After your model has been imported you can optionally change the textures and materials for each part of the model allowing you to create variations to the way the model appears.
High Level
Although Blade3D comes with a number of pre-canned shaders at some point you will want to modify or create your own effects. For this, the Blade3D development environment provides a great HLSL editor for editing your shader code. As with the script editor full syntax coloring and error highlighting are standard.
Mesh Loading
Models can be imported directly from the standard XNA file format (.xnb). Currently this means that both .FBX and .X files are supported as standard.
Scene Management
With the built in scene designer you can quickly create the game world. Place models, lights, cameras and other scene items using convenient and familiar WYSIWYG manipulation tools.
Once you have placed the objects you can modify properties such as scale, position and orientation. You can also change materials, attach behaviors or adjust other item specific attributes.
Blade3D is artist friendly and provides a unique "gallery" based editing system similar in concept to the upcoming Microsoft Office 2007. With it you can quickly browse through palettes of materials, textures and more, seeing exactly how the changes might look in your scene prior to applying the change.
Skeletal Animation
Animation Blending
Blade3D supports bone hierarchy based animation as a standard feature. Additionally, full GPU based vertex skinning is provided for compatible models.
You can use the built-in animation mixer to create composite animations or split animations into multiple parts.
Blade3D(R) includes a robust Quadtree based terrain engine that allows large areas to be rendered cheaply with full level of detail support.
Adding terrain to your scene is simply a matter of specifying one or more height-field textures, choosing detail texture maps as needed and setting common properties such as fog color and distance. A default shader is provided for rendering but this is easy to replace if you have more specialized requirements.
Blade3D provides a number of terrain oriented shaders. A good example is the material map shader. This shader allows you to specify a base texture (grass for example) and up to four detail textures such as rock, sand, gravel etc. Finally a control texture (material map) is used to determine the amount of blending for each of the detail textures. This allows cool effects like terrain that weathers over time or simulates the build-up of snow and rain.
The terrain generator can also be used to simulate water effects. Combined with a particle system and render-to-texture you can create effects such as ripples and waves.
Basic Physics
Collision Detection
Rigid Body
Blade3D(R) provides a simple box based rigid body dynamics simulator to help bring additional life to your scene.
Simulated properties include position and orientation, linear and angular momentum, friction and damping. Static forces such as gravity and collision geometry can easily be specified at the scene level.
Tools & Editors
Includes a level editor, particle system design surface, logic editor, and script editor.
The built-in script editor has a familiar feel to Visual Studio(R) featuring syntax color highlighting, statement completion, parameter help, error and warning highlighting and more.
The scripts themselves are written using regular C# and therefore have no performance penalty as compared with other code in your project. Scripts can be added to an individual object or to a whole class of objects. So, if for example you need all the Zombies in your scene to dance at the end of the level, you can use a class level behavior to achieve this efficiently.
Blade3D provides a number of useful classes that allow your scripts to interact with scene items and other items in the object model. For example, functions to calculate the distance between objects, trigger animations or sound make common tasks much simpler.
License Name
Price in $US
Source Code Included?
Proprietary
Unspecified
License cost has not yet been determined, but will be affordable for hobbyists.
Showing 1-2 of 2
0 of 0 people found the following review helpful
I have always wanted to make video games but for whatever reason I never had the time to learn. As time went on it seemed to get harder and harder to do.
Enter Blade3D! Although I still have a lot to learn I'm having a blast. The builds keep getting better and their support is very strong. Go to their site and poke around, maybe download the latest build and you might also feel obliged to come back here and support the program and the people behind it. Peace and love to all, now lets blow some sh*t up!
Was this review helpful to you?
0 of 0 people found the following review helpful
Blade3d packs a punch or ten
Blade3d is the first 3d engine to be released for both windows xp/vista and xbox360 and is created by a top team of talented programmers aimed at proffesional indies through to hobbyist's and beginers too.
The GUI looks great. it looks very easy on the eye whislt hiding away a plethora of sofisticated settings in a nice scrollable window at the right side of the screen
I personally like this feel,
being a music producer and novice programmer i am sick of cluttered screen's and as a novice programmer Micrsofts C# express/XNA is a big learning curve for making games so i'll let Digini build The engine and i'll make some games.
OPEN TO FEATURE SUGGESTION'S
Digini are really open to user suggestion and MAY even have plans(in the distant future) for a version purely deployed and running for the Xbox360 so solving the problem of crap gfx chips (intel) and even the need for a PC altogether(can't wait!). genuine suggestions are well recieved.
SUPPORT IS TOP NOTCH
Basically my graphics card was inadequate (intel 9xx) i posted on the Blade3d forum and Blades3d's lead developer came straight back to me and others within a day,
promising to help. They did.
They got it to run on my crappy gfx chip (intel 9xx) but the gfx chip was so crap it still couldn't use blade3d properly, however i could see the gui and read the online help files, which i once couldn't. (nice try Digini). anyway i bought a new gfx card(today) after waiting since release day 1 of the beta test. So i needed a licence to run Blade3D because my new GFX machine is offline so can't connect to their server for online authorisation. again within a day i had a license from another member of the dev team(who's now an msn contact after my gfx problem. by the way i'm a total programming novice, They are really Nice people at Digini :).
The one thing i can say is these guys are rocksolid on the support front.
AS MY CURVES GET SMALLER
I can only conclude this far that i am well impressed with digini and Blade3d i have yet to go through the tutorials, but i will, and i'll become a power user with this, just like i am with music production software and hardware i even managed to get some local 3D artist's together because of blade3d's video's. i've looked at most engines i can find online in many different langauges and never enjoyed or looked forward to reading/writing massive pages of source code i've now got enough c# under my belt to learn the XNA Magic
The games should be coming soon, if i can learn blade3d and thankfully i believe i can.
Was this review helpful to you?
Are your the owner of this engine?
to be able to update it, and reply to reviews, and other benefits.
(C) 2017 DevMaster ·Balloons game demo in Moscrif SDK
We are proud to present one of very first tutorials about “a new kid on the block”. Moscrif is the new member of cross-platform development tools suited for a modern mobile game developer.
Moscrif overview
Moscrif SDK is a development suite solving the problem of supporting an increasing number of mobile platforms. The number of these platforms is increasing making it almost impossible to go native for every one of these. With Moscrif, only one development cycle is needed allowing you to publish the game to the most popular platforms. With the current support of iOS, Android, Nook or Kindle you can reach up to 80% of the mobile market audience. New Windows Phone should be supported in the near future reaching even more mobile users.
The key advantage is the need of just one code base. Because Moscrif uses JavaScript, it is extremely easy to adopt for experienced developers as well as for beginners because JavaScript is one of the easiest languages to learn with a countless number of tutorials all over the net.
Other benefits:
●Graphics performance - Moscrif applications are able to achieve 50 frames per seconds (one of the bests in the industry)
●Hardware acceleration – the amazing graphics performance is achieved with the contribution of fully OpenGL hardware acceleration
●Code one, run anywhere – the only one code of application can run on almost 90% of devices
●Reuse your knowledge – Moscrif uses JavaScript language which makes no problem for everybody who has ever developed web application or desktop applications in C, C++, Java etc.
●Publish on your own computer in few seconds – some other cross platform tools requires sending the source codes to theirs servers and publishing process sends some hours. Moscrif makes it on your own computer in few seconds.
●Free license - Moscrif is one of only few similar tools offering a free license
●IDE - Moscrif comes with its own IDE which is a part of the SDK
The Moscrif is available for free download on its homepage .
The balloon game demo
To present the capabilities of Moscrif, we have created a simple game demo based on shooting down the balloons. This game contains only one level and simple game menu, but with only few additional lines of code it can be transferred into a full game ready to hit the app stores.
Starting a new project
To create the project the Project wizard (click File -& New -& New project) will be used. We have selected the new 2D Game option as it is exactly what we are looking for.
In the next step we set few of the most basic project’s properties like the landscape orientation. We have also checked the box2d library to be added into the project. As we are interested in some basic game menu as well, the option called Screens select Game with Menu is checked as well.
In the next step we set few of the most basic project’s properties like the landscape orientation. We have also checked the box2d library to be added into the project. As we are interested in some basic game menu as well, the option called Screens select The wizard will create a new project with three precreated scenes: menu, single and multiPlayer.
In this sample we are only going to use a single player mode. Therefore, we need only 2 scenes - one for the menu and one for the game itself. So you can delete the multi player scene (remove also the include command in main.ms file). Game with Menu is checked as well.The wizard will create a new project with three precreated scenes: menu, single and multiPlayer. In this sample we are only going to use a single player mode. Therefore, we need only 2 scenes - one for the menu and one for the game itself. So you can delete the multi player scene (remove also the include command in main.ms file).
The whole game code will be in singlePlayerScene file, so we open it for editing. As seen on the example below, our scene class is extended from the PhysicsScene base class. The Scene base class creates a basic scene without the support of physical engine. Because Scene class is not sufficient for use as we need the support of physics engine, we use PhysicsScene class instead.
Following, a new instance of b2World object is created in the init method taking 4 parameters:
1gravity on the x axis
2gravity on the y axis
3true/false doSleep parameter. We use True to improve the performance
4true/false allowing the collisions between the objects within the scene
We set the gravity on the y axis to -9.81 what is equivalent of real earth’s gravity.
Example: applying physical engine in the scene
class SinglePlayerScene : PhysicsScene
// constants
const maxForce = 2000;
const forceStep = 0.1;
const maxDistance = 3*System.height / 5;
function init()
super.init();
this.start = System.
this.world = new b2World(0.0, -9.81, true, true);
Physical engine
To simulate the real world’s behavior Moscrif relies on powerful box2d physical engine. This engine is used by many platforms and many well known games rely on it like: Crayon Physics Deluxe, Limbo, Rolando, Fantastic Contraption, Incredibots, Angry Birds etc.
The main part of the physical engine is the world which consists of the bodies and the joints. It manages all aspects of the simulation and contacts between the bodies. Bodies interact together according to theirs properties which specify the density, friction and/or bounce.
The engine supports three different types of the bodies, which behaves differently. Static bodies do not move under the simulation and collide with dynamic bodies. The dynamic bodies are fully simulated and collide with all other bodies. The last, kinematic bodies do not move under the forces, only according to its velocity. They interact only with dynamic bodies. In Moscrif, bodies are created as an instance of PhysicsSprite class or class extended from the PhysicsSprite class. The position of bodies and collisions are recalculated in small time intervals.
Example: making a time step in physics simulation
function process()
// timestep in physics simulation
var timeStep = 1.0 / 40.0;
// recalculate physics world. All objects are moved about timeStep
this.step(timeStep, 4, 8);
The Balloons
Balloons are managed by their own class extended from the PhysicsSprite class. Every balloon is made of several frames that are changed every 100 milliseconds creating a simple and realistic animation. When a balloon reaches the top of the screen an end event is raised.
Image: balloons frames
Example: creating the balloon class
class Balloon : PhysicsSprite
function init()
super.init();
// set image with frames
this.image = GFX.
// set frame dimension
this.frameWidth = GFX.ballon.width / 5;
this.frameHeight = GFX.ballon.
// start timer
this.timer = new Timer(100, true);
this.timer.onTick = function()
// move to next frame
if (this super.frame == 4/*number of frmes*/)
this super.frame = 0;
this super.frame+=1;
// check if the balloon does not passed the top of the screen
var (x, y) = this super.getPosition();
if (y & 0)
this super._endHandler(this super);
// speedup
this super.setLinearVelocity(0, this super.getLinearVelocity() + 0.07);
this.timer.start(100);
// end level event
property end(v)
get return this._endH
set this._endHandler =
Balloons start from the random position at the bottom of the screen in time intervals.
function _setTimer(i = 1)
this._timer = new Timer(1, 1);
this._timer.onTick = function()
// create ballon
this super._createBallon(i);
// decrease the time between two ballons
if (this super._time & 200)
this super._time -= 3;
this super._setTimer(i);
this._timer.start(this._time);
The ball is fired from the bottom of the screen. The angle and force of the fire are controlled by the user touches on the screen. When user taps the screen the first angle and force is calculated. The force is calculated as a rate of distance of user’s touch from the ball’s start position and its max distance which is equal to the max force. The angle is calculated using the trigonometric function tangents as a rate of distance on y and x axis.
Example: calculating the force and angle
function pointerPressed(x, y)
super.pointerPressed(x, y);
if(this._ended) {
this._goBack();
// calculate distance on both axis
var distanceX = x - System.width / 2;
var distanceY = y - 9*System.height / 10;
// calculate angle
this._angle = Math.atan2(distanceY, distanceX);
// total distance
var distance = Math.sqrt(distanceX*distanceX + distanceY*distanceY);
// max distance (max distance is distance which equal the max force)
if (distance & maxDistance)
distance = maxD
// calculate force
this._force = (1.0*distance / maxDistance)*maxF
When user drags his finger the angle and force are recalculated in the same way as when he presses it. Finally, when user releases his finger the ball is fired.
Example: firing the ball
function _fire()
// if can not fire do nothing
if (!this._canFire)
// add new ball
this._ball = this.addCircleBody(GFX.ball, #dynamic, 1.0, 0.0, 0.0, GFX.ball.width / 2);
this._ball.setPosition(System.width / 2, 9*System.height / 10);
this._ball.id = #
this._ball.bullet =
// start veloity of the ball acording to angle and force
var velox = this._force*Math.cos(this._angle)/this.
var veloy =-this._force*Math.sin(this._angle)/this.
//apply velocity
this._ball.setLinearVelocity(velox, veloy);
// diable next fire
this._canFire =
// allow fire after 500ms
var t = new Timer(1, 1);
t.onTick = function ()
this super._canFire =
t.start(500);
When two bodies collide together a beginContact and endContact events are raised. The events have only one parameter – a list of all contacts in the world. Every record in the list contains information about both bodies of the contact (accessible by getBodyA and getBodyB methods).
Example: managing contacts
function beginContact(contact)
var current =
while (current) {
// get both bodies in contact
var bodyA = current.getBodyA();
var bodyB = current.getBodyB();
// check if a ballon was hit
if (bodyA.id == #ball && bodyB.id == #ballon) {
// destoy ballon
this._bodiesToDestroy.push(bodyB);
// check if a ballon was hit
} else if(bodyB.id == #ball && bodyA.id == #ballon) {
// destoy ballon
this._bodiesToDestroy.push(bodyA);
// check if something hit the border (only ball can)
} else if(bodyB.id == #border) {
this._bodiesToDestroy.push(bodyA);
} else if(bodyA.id == #border) {
this._bodiesToDestroy.push(bodyB);
// get next body
current = current.getNext();
As you can see, creating mobile games using Moscrif SDK is straightforward and even the beginners should be able to create a killer game. So are you going the make the new Angry Birds? It’s free, so why not to try it …
The source code of this sample can be found at /moscrif/samples/tree/master/sampleBallons
Since I've been working on a Mac more and more often these days,
for an alternative to the wonderful Windows Live Writer for Windows.
I started with a trial of MarsEdit, which I really liked, except it's inability to display formatted source code ( a big deal for me ), its lack of tagging ( not a really big deal, but a nuisance ) and the lack of image formatting options.
Then I found and discovered , which has a 100$ price tag.
It started off strong but quickly took a jump off a cliff into the land of truly awful.
It seems to be poorly supported by Adobe, has documented features that don't appear to exist anymore, has some gigantic bugs ( such as the Paste menu never being enabled! ).
It did however have incredible table formatting tools!
I know in the age of CSS, table is a bit of a swear word, but damned if a lot of your data isn't in a tabular format.
The image formatting options were easily the best of all packages I've used, including Live Writer.
But good tables and good image positioning tools don't even come close to making up for the brutal flaws, especially at a 100$ price point.
I then tried out , a completely free option:
At first glance, it pushes all the buttons.
It doesn't support tags ( only Live Writer seems to ), but image formatting is decent, and you can directly edit the HTML of your post, so if you know HTML, the sky is the limit.
I attempted to write the previous post with Qumana and ran in to a gigantic deal breaker attempting to insert an IFrame… you can't.
I pasted the HTML code for a Youtube video, then when I switch back to WYSIWG view, poof gone.
Game over.
So then, back to MarsEdit, which I went ahead and purchased.
In the end, MarsEdit was easily the best option of what is available for Mac.
The biggest sellable point was the ability to drop to and edit HTML, which is nicely preserved when switching back to rich text mode.
Now, Red Sweater, if you are listening, please add the ability to create plugins, or failing that, the ability to post formatted source code.
Also, tag support would be nice!
If you are a MarsEdit user, and currently post code samples on your blog, how are you doing it?
It's odd how news arrives sometimes, it always seems to arrive in batches and today's post is no exception.& Earlier this week I read about a recently launched 3D modeller that works within Unity3D.& That piqued my interest for a few minutes, then something shiny came along and I forgot about it completely.& Then a day later a different product was announced that also enables 3D asset creation within Unity.If you've not heard of it,
is a massively popular game creation suite, that enables developers to create games for PC, Mac, iOS, Android and more.& Prices range from free to around the 1,500$ mark.& The biggest catch has always been the content creation side, take a look at our
for an idea of the typical price tag attached to these application.& Up until now, Blender and Cheetah3D on the Mac where you only options if you didn't have several thousand dollars to spend.& Then you have to contend with the annoyances of getting your asset from the application and in to Unity, not always a seamless process.& Therefore, a low cost/no cost editor that works within Unity is certainly welcome.& And today, we get two of them!
The first is , which is available in Unity or as a stand alone application on Mac, Windows, Linux and iPad.& It currently has a 45$ price-tag, which is about 1% of the cost of 3D Studio Max if you want to put that in perspective.
GameDraw features include:Polygonal Modeling, Sculpting, Generation and Optimization ToolsUV EditorCity GeneratorRuntime APICharacter CustomizerMesh Editing ( Vertex, Edge, Triangle, Element)Mesh manipulation functions (Extrude, Weld, Subdivide, Delete, Smooth,&etc)Assigning new MaterialsMesh OptimizationUV editingPrimitives (25 basic model)SculptingBoolean operationsNode based mesh generation2D tools (Geometry painting, 2D to 3D image tracing)Character customizerCity GeneratorWarehouse &hundreds of free assets&
Shade for Unity
Shade is the other contender entering the ring. &This is a bit odd for me, as I have been a hobbyist in the 3D industry since the early DOS days when I purchased 3D Studio ( note, no MAX ) 4. &I spent my childhood dreaming of owning an SGI Indy with PowerAnimator. &I have followed the industry forever, used just about every 3D application out there, from the big guys like Max and Maya to the fringe like Nichimen nWorlds and Houdini. &In all of that time&however, I don't think I have ever even heard of Shade, which amazingly has been around since 1986 and is currently at version 12! &
I downloaded &and I am rather impressed with this package, which I will be looking in to in a bit more depth later. &I noticed along the way, while search for help on how to do certain tasks in Shade, nobody else has heard of it either! &There just isn't a ton of information out there. &How the heck can a package get to version 12 and nobodies heard of it? &Easily& it's big in Japan. &Ah.
So then, why the hell am I babbling on about Shade? &Well,
recently crossed my desk:
Publisher Mirye Software and developer E Frontier announce the free 3D game content development system for indie developers and professionals will soon be available for developers on Mac OS X.Shade 3D for Unity is based on the professional 3D modeling, animation and rendering tool set Shade, a product available for over 27 years and used worldwide by illustrators and designers. Shade 3D for Unity enables designers and game developers to build animated project content that integrates with Unity 3D, the game development system for Windows, Mac OS X, iOS, and Android.Workflow integration makes it is easy to share project assets (Configuration Files) of Unity in Shade 3D for Unity and easily transfer content between them.
Shade 3D for Unity includes an advanced tool set for creation of original 3D content:* Import/Export integration with Unity 3D* Advanced 3D Modeling Environment* Polygon Mesh Editor* UV Editor and Image Management* Design friendly Bezier Spline Modeler* Powerful Object Instancing Features* 3D Object Hierarchy Browser* Material Setting Features* Material Parameter with Texture Map Settings* Animation Setting Feature* Draft Ray Tracing Renderer
Interesting&
Perhaps most interesting of all is the price tag. &Free. &I like free.
That said, the last free product 3D product I tried out
and I am still getting half a dozen spam emails a week from them ( serious Daz, quit it, or make your freaking unsubscribe functionality work! ), so free isn't always free. &Mirye certainly intends to make money somehow, just not sure of exactly how as of yet. &My guess is they are following Daz's model of selling content, or perhaps it's an attempt to upwell you to Shade Professional.
Shade for Unity isn't actually out yet, don't expect it until November. &You can read more . &They also currently have a utility for using Shade with Unity on the Unity Store called the . &
Now if you will forgive me, I'm off to play with my new toy. &It's always cool to find another professional caliber 3D application, especially one with a price tag starting at 99$! &I will post a bit more detail on my experiences with Shade 12 trial shortly.
Due to a bunch of great feedback I received from the YUI community and learning a bit more about how YUI works, I’ve made some minor, but extensive ( yes, that actually makes sense ) changes to the guts of my upcoming HTML based level editor.
As a bit of a recap, so far we have covered:
(that does nothing)
In this section, we are going to simply clean things up a bit.  Add a layer of polish, remove some of the hackish behaviour and simply make it a better foundation.  Instead of simply editing the previous posts, I figured there was some value in seeing the evolution of an application. In some ways, nothing illustrates a concept better than a before and after.
this = that =
A quirk of JavaScript is that it absolutely clobbers the this pointer in callbacks.  Of course, it’s all a matter of perspective if this is a feature or not, but from someone who is from a C++/Java/C# background it certainly seems alien, you certainly wouldn’t expect the value of this to change within the same code file, but of course it does.  A very common work around is to copy this into another variable, often that or self at a higher scope, but there are certainly limitations ( plus it feels like a hack ).  Consider this common simplified example:
var that=this;
buttonDone.on(&click&, function(){
that.doSomething();
In most (all?) YUI handlers you are actually able to solve this with incredible ease. You can pass the context in as a parameter:
buttonDone.on(&click&, function(){
this.doSomething();
This is a change I made through-out the project.  However, what happens when you are dealing with a non-YUI method?  A very good example is in map.View.js, we provide a callback function that the EaselJS library calls each frame.  How exactly do we deal with that?  Consider:
createjs.Ticker.addListener(this.gameloop);
How do you handle the this value getting clobbered in this situation?  I used a global variable named Instance, which obviously was a gross hack.  I sadly couldn’t extended the callback to accept a context without making massive changes to the easelJS library, which obviously I don’t want to do.  So, how then do you cleanly solve this issue?  With incredible ease apparently:
createjs.Ticker.addListener(Y.bind(this.gameloop,this));
That’s it…  just wrap your function parameter in a Y.bind() call, and pass in the context you wish to be bound and VOILA, this is preserved.  How does it work?  ….  Black magic probably, with a great deal of chickens being sacrificed.
These two changes, passing the context when possible or using Y.bind() when not, reduced a great many horrible hacks from the code and made me feel a great deal better about life, the universe, everything…
If you support templates to make life easier for designers, why the hell aren’t you using style sheets?
That’s a very good question to which I simply do not have a good answer.  When I did most of my development work in HTML, it was a world without CSS and it is a technology I never really took to.  In a world where CSS selectors are increasingly important, and in an application I am making designer friendly, that is not a valid excuse. 
Therefore, I pulled most of the styling out to a style sheet.  This also means I removed various JavaScript based styling calls.  I also added the YUI style skin yui-skin-sam the to app &BODY& tag in index.html.  This was missed mostly out of … well, I kinda forgot I had a body tag.  Part of my brain thought that editor.View.js was the root level HTML construct, I completely forgot about the contents of index.html.
In order to add stylesheet support, I added a root level directory called stylesheets and created the file style.css within.  It also required adding an additional route for express in server.js, in case you are hosting from node.
server.use('/stylesheets', express.static(__dirname + '/stylesheets'));
This line basically just adds another directory to serve static files from.  If you didn’t add this, you will get 404 errors when you request a stylesheet.
Speaking of templates…
Copy and paste coding rather bit me in the butt here.  You see, I started from the person.View.js and person.js as a starting point, code that was never intended to be in the final product and code that contained a great deal more problems then I realized.  Code however, that also demonstrated the complete lifecycle of populating a view with a model, and compiling and displaying a template.
Problem is, thus far in this application, we have NO DATABINDING.  None.  It will of course come later, but most templates are actually just straight HTML with no need to process.  Thing is, I was compiling them anyways, like so:
var results = Y.io('/scripts/views/templates/map.Template',{&sync&:true});
template = pile(results.responseText);
Which was a waste of processing power. So instead we simply do:
var results = Y.io('/scripts/views/templates/map.Template',{&sync&:true});
template = results.responseT
There is the possibility that templates are overkill and handlebars is too heavy weight, and this is quite likely true.  At the end of the day though, this isn’t an application that needs to scale out massively, so I don’t really need to squeeze every cycle, so I will stick with handlebars templates for now.  The nice thing about templates is, they can be swapped out relatively easily later on.  Lightweight or not, handlebars is one of the most popular templating engines.
To async or not to async
One other areas of feedback I got, that I am not sure I entirely agree with, is that I should be loading the templates asynchronously. On the surface, this certainly makes sense, as JavaScript is a highly asynchronous language ( taken to laughable extremes at times… you will know what I mean if you’ve worked in Node.js and found yourself nested 5 or 6 callbacks deep ) and the DOM certainly encourages an async model.  Your UI will “hang” while waiting on code to complete unless it is handled asynchronously.
My catch is, this is exactly what *should happen*.  Loading a template is a synchronous task, period.  All of the rest of your code is going to be spent first checking to see if the template has loaded before proceeding.  Nothing can happen until the template has loaded, period.  Therefore it makes little sense to perform a serial action in parallel.
That said, this is just *my* opinion on the matter.  I was however offered an elegant solution to the complexity of dealing with async callbacks, and I figured I would share it here.  So here is the person.View.js rewritten to work async:
YUI.add('personView',function(Y){
Y.PersonView = Y.Base.create('personView', Y.View, [], {
initializer:function(){
this.pending = new Y.Parallel();
Y.io('/scripts/views/templates/person.Template',{
complete:this.pending.add(function(id,response){
template = pile(response.responseText);
render:function(){
this.pending.done(Y.bind(function(){
this.get('container').setHTML(template(this.get('model').getAttrs()));
return this;
}, '0.0.1', { requires: ['view','io-base','person','handlebars','parallel']});
The secret sauce here is the .  It allows you to batch up a number of parallel functions, which provides a callback for when they are all complete.  If you are following along and prefer to go pure async, use the above code as a template, or better yet, refactor to a common base class shared between your views.
A little longer, a lot less ugly
One other thing I hated about the previous code was the &SCRIPT& mess of includes that was developing at the top of index.html.  As of the last update, it looked like:
&script src=&/3.5.1/build/yui/yui-min.js&&&/script&
&script src=&/easeljs-0.5.0.min.js&&&/script&
&script src=&/scripts/models/person.js&&&/script&
&script src=&/scripts/models/spriteSheet.js&&&/script&
&script src=&/scripts/views/person.View.js&&&/script&
&script src=&/scripts/views/map.View.js&&&/script&
&script src=&/scripts/views/mainMenu.View.js&&&/script&
&script src=&/scripts/classes/AddSpriteSheetDialog.js&&&/script&
&script src=&/scripts/views/editor.View.js&&&/script&
This is ugly and only going to get uglier and I knew there had to be a better way, I just didn’t know what it was.  I thought the Y.Loader was a likely candidate, but I was wrong (
).  Instead there is a global variable called YUI_config you can use to declare all of your custom modules and their dependencies.  Therefore I created a new file named /scripts/config.js with the following contents:
YUI_config = {
classes: {
base: 'scripts/classes',
addSpriteSheetDialog: {
path:'/addSpriteSheetDialog.js',
requires: ['node','spriteSheet','panel']
base: 'scripts/models',
modules: {
path: '/person.js',
requires: ['model']
spriteSheet: {
path: '/spriteSheet.js',
requires: ['model']
path: '/tile.js',
requires: ['model']
base: 'scripts/views',
modules: {
editorView: {
path: '/editor.View.js',
requires: ['view','io-base','addSpriteSheetDialog','personView',
'mainMenuView','mapView','event-custom','handlebars']
mainMenuView: {
path: '/mainMenu.View.js',
requires: ['view','io-base','node-menunav','event','handlebars']
mapView: {
path: '/map.View.js',
requires: ['view','event','io-base','handlebars']
personView: {
path: '/person.View.js',
requires: ['view','io-base','person','handlebars']
This allows the YUI loader to load your scripts and their dependencies.  Ideally too, this allows the loader to load them asynchronously, which in this case is a very good thing.  Ideally then, this will cause your app to load quicker.
Y.App, I hardly knew you!
On other thing that has been mentioned ( a couple times from a couple sources ) is I am not really making use of Y.app routing, and this is 100% true, I am not.  As you can see in index.html:
YUI().use('app','editorView', function (Y) {
var app = new Y.App({
editorView: {type: 'EditorView'}
app.route('*', function () {
this.showView('editorView');
app.render().dispatch();
So, yeah, a router with exactly one route is rather pointless.  So, why do I have it at all?
Well, that’s mostly a matter of reality not matching expectations and is a bi-product of “winging it”.  As things developed, once I chose to go with a composite view, the parent view editor.View.js essentially usurped the roll of controller from Y.app, which is perfectly OK.
So, why keep Y.App?  Well it’s perfectly possible that I will have tasks outside of the single composite view, in which case the app will be used.  If not, it is easily used later.  If you were looking at the code and thinking “hmmmm… that code seems superfluous”, you were exactly right.
Almost every “code smell” I had is now gone, which always makes me feel better about things. The experience also enlightened me to some of the nuances of YUI.  A great deal of thanks to
on the YUI forums for taking the time to educate me.  My thanks again to all others who have commented or messaged me.  Now back to adding new features!
You can download the new sources .
As pretty much every single file changed, I am just going to dump full sources below.
At this point in time, our project looks like:
index.html
&!DOCTYPE html&
&title&GameFromScratch example YUI Framework/NodeJS application&/title&
&body class=&yui3-skin-sam&&
&script src=&/3.5.1/build/yui/yui-min.js&&&/script&
&script src=&/easeljs-0.5.0.min.js&&&/script&
&script src=&scripts/config.js&&&/script&
&link rel=&Stylesheet& href=&/stylesheets/style.css& /&
YUI().use('app','editorView', function (Y) {
var app = new Y.App({
editorView: {type: 'EditorView'}
app.route('*', function () {
this.showView('editorView');
app.render().dispatch();
var express = require('express'),
server = express();
server.use('/scripts', express.static(__dirname + '/scripts'));
server.use('/stylesheets', express.static(__dirname + '/stylesheets'));
server.get('/', function (req, res) {
res.set('Access-Control-Allow-Origin','*').sendfile('index.html');
server.listen(process.env.PORT || 3000);
YUI_config = {
classes: {
base: 'scripts/classes',
addSpriteSheetDialog: {
path:'/addSpriteSheetDialog.js',
requires: ['node','spriteSheet','panel']
base: 'scripts/models',
modules: {
path: '/person.js',
requires: ['model']
spriteSheet: {
path: '/spriteSheet.js',
requires: ['model']
path: '/tile.js',
requires: ['model']
base: 'scripts/views',
modules: {
editorView: {
path: '/editor.View.js',
requires: ['view','io-base','addSpriteSheetDialog','personView',
'mainMenuView','mapView','event-custom','handlebars']
mainMenuView: {
path: '/mainMenu.View.js',
requires: ['view','io-base','node-menunav','event','handlebars']
mapView: {
path: '/map.View.js',
requires: ['view','event','io-base','handlebars']
personView: {
path: '/person.View.js',
requires: ['view','io-base','person','handlebars']
body { margin:0overflow: }
#mapPanel { margin:0float:display: }
#mapPanel #mainCanvas { background-color: }
.spritesheetDialog { spadding-top:25padding-bottom:25 }
YUI.add('person',function(Y){
Y.Person = Y.Base.create('person', Y.Model, [],{
getName:function(){
return this.get('name');
value: 'Mike'
}, '0.0.1', { requires: ['model']});
spriteSheet.js
YUI.add('spriteSheet',function(Y){
Y.SpriteSheet = Y.Base.create('spriteSheet', Y.Model, [],{
count:function(){
return this.get('spritesheets').
add:function(name,width,height,img){
this.get('spritesheets').push({name:name,width:width,height:height,img:img});
spritesheets: {
}, '0.0.1', { requires: ['model']});
tile.js (ok, this one is new… )
YUI.add('tileModel',function(Y){
Y.Person = Y.Base.create('tile', Y.Model, [],{
getName:function(){
return this.get('name');
offsetX: {
offsetY: {
}, '0.0.1', { requires: ['model']});
editor.View.js
YUI.add('editorView',function(Y){
Y.EditorView = Y.Base.create('editorView', Y.View, [], {
spriteSheets:new Y.SpriteSheet(),
initializer:function(){
var person = new Y.Person();
this.pv = new Y.PersonView({model:person});
this.menu = new Y.MainMenuView();
this.map = new Y.MapView();
Y.Global.on('menu:fileExit', function(e){
alert(e.msg);
Y.Global.on('menu:fileAddSpriteSheet',function(e){
var dialog = Y.AddSpriteSheetDialog.show(this.spriteSheets, Y.bind(function(){
var sheet = this.spriteSheets.get(&spritesheets&)[0];
console.log(sheet);
render:function(){
var content = Y.one(Y.config.doc.createDocumentFragment());
content.append(this.menu.render().get('container'));
var newDiv = Y.Node.create(&&div style='width:100%;margin:0padding:0px'/&&);
newDiv.append(this.map.render().get('container'));
newDiv.append(this.pv.render().get('container'));
content.append(newDiv);
this.get('container').setHTML(content);
return this;
}, '0.0.1', { requires: ['view','io-base','addSpriteSheetDialog','personView',
'mainMenuView','mapView','event-custom','handlebars']});
mainMenu.View.js
YUI.add('mainMenuView',function(Y){
Y.MainMenuView = Y.Base.create('mainMenuView', Y.View, [], {
initializer:function(){
var results = Y.io('/scripts/views/templates/mainMenu.Template',{&sync&:true});
// No need to compile, nothing in template but HTML
// this.template = pile(results.responseText);
this.template = results.responseT
render:function(){
this.get('container').setHTML(this.template);
var container = this.get('container');
var menu = container.one(&#appmenu&);
menu.plug(Y.Plugin.NodeMenuNav);
//Register menu handlers
var menuFileExit = container.one('#menuFileExit');
menuFileExit.on(&click&,function(e){
Y.Global.fire('menu:fileExit', {
msg:&Hello&
var menuFileAddSpriteSheet = container.one('#menuFileAddSpriteSheet');
menuFileAddSpriteSheet.on(&click&, function(e){
Y.Global.fire('menu:fileAddSpriteSheet', {msg:null});
return this;
}, '0.0.1', { requires: ['view','io-base','node-menunav','event','handlebars']});
map.View.js
YUI.add('mapView',function(Y){
Y.MapView = Y.Base.create('mapView', Y.View, [], {
&#mainCanvas&: {
click:function(e)
console.log(&Mouse over&);
initializer:function(){
var results = Y.io('/scripts/views/templates/map.Template',{&sync&:true});
template = results.responseT
prepareCanvas:function(){
this.resizeEvent();
createjs.Ticker.setFPS(30);
createjs.Ticker.addListener(Y.bind(this.gameloop,this));
Y.on('windowresize',this.resizeEvent,this);
this.publish('windowresize');
render:function(){
this.get('container').setHTML(template);
this.prepareCanvas();
return this;
gameloop:function(){
this.stage.update();
this.stage.getChildAt(0).x++;
if(this.stage.getChildAt(0).x & this.stage.canvas.width)
this.stage.getChildAt(0).x = 0;
resizeEvent:function(){
var container = this.get('container');
var canvas = container.one(&#mainCanvas&);
var panel = container.one('#panel');
var body = Y.one(&body&);
var screenWidth = body.get(&clientWidth&);
var screenHeight = body.get(&scrollHeight&);
var width = Math.floor(screenWidth -280);
var height = Math.floor(screenHeight );
canvas.setStyle(&width&,width + &px&);
canvas.setStyle(&height&,height + &px&);
this.stage = new createjs.Stage(canvas.getDOMNode());
// for some reason, easel doesn't pick up our updated canvas size so set it manually
this.stage.canvas.width =
this.stage.canvas.height =
var shape1 = new createjs.Shape();
shape1.graphics.beginFill(createjs.Graphics.getRGB(0,255,0));
shape1.graphics.drawCircle(200,200,200);
this.stage.addChild(shape1);
}, '0.0.1', { requires: ['view','event','io-base','handlebars']});
person.View.js (async version)
YUI.add('personView',function(Y){
Y.PersonView = Y.Base.create('personView', Y.View, [], {
initializer:function(){
this.pending = new Y.Parallel();
Y.io('/scripts/views/templates/person.Template',{
complete:this.pending.add(function(id,response){
template = pile(response.responseText);
render:function(){
this.pending.done(Y.bind(function(){
this.get('container').setHTML(template(this.get('model').getAttrs()));
return this;
}, '0.0.1', { requires: ['view','io-base','person','handlebars','parallel']});
mainMenu.template
&div style=&width:100%& class=&yui3-skin-sam&&
&div id=&appmenu& class=&yui3-menu yui3-menu-horizontal&&&!-- Bounding box --&
&div class=&yui3-menu-content& &&!-- Content box --&
&a class=&yui3-menu-label& href=&#file&&File&/a&
&div id=&file& class=&yui3-menu&&
&div class=&yui3-menu-content&&
&li class=&yui3-menuitem& id=&menuFileAddSpriteSheet&&
&a class=&yui3-menuitem-content& href=&#&&Add SpriteSheet&/a&
&li class=&yui3-menuitem& id=&menuFileExit&&
&a class=&yui3-menuitem-content& href=&#&&Exit&/a&
map.Template
&div id=&mapPanel&&
&canvas width=300 height=300 id=&mainCanvas& &
Your browser doesn't support the canvas tag.
person.Template
&div style=&width:250min-width:250max-width: 280float:right&&
&div align=right&
&img src=&/image.axd?picture=HTML-5-RPG_thumb_1.png&
alt=&GameFromScratch HTML5 RPG logo& /&
&p&&hr /&&/p&
&h2&About {{name}}:&/h2&
&li&{{name}} is {{height}} feet tall and {{age}} years of age.&/li&
** – person isn’t styled because this is a place holder view anyways and is going to be removed from the project once I have an actual demonstration of a data-bound template.
Again, the entire archive .
Next posts1
Category list
RecentPosts
Month List
(32) (41) (27) (33) (32) (34) (37) (48) (37) (56) (41) (55)
(47) (48) (17) (13) (15) (16) (26) (17) (14) (18) (11) (10)
(15) (20) (20) (17) (8) (16) (19) (14) (15) (19) (14) (15)
(10) (9) (12) (21) (17) (15) (18) (13) (21) (16) (14) (15)
(16) (21) (23) (24) (24) (25) (28) (35) (26) (13) (14) (13)
(9) (16) (11) (7) (8) (7) (8) (16) (11)
All rights reserved.
Copyright .

我要回帖

更多关于 gfx 3d 的文章

 

随机推荐