Create scene in blender - blender

How can one create a scene/terrain like clash royal's game scene in blender? The game scene seems like top view but is not exactly top view. At what angle should the camera be placed to get that effect?

You would be looking for isometric projection or maybe 2.5D, also called 3/4 perspective. You can find several isometric tutorials on youtube.
While I'm not sure if there are any strict rules to follow unless you are making graphics that must fit in an existing game, it is common to use an orthographic camera at about a 45 degree angle.
Clash Royale looks like it could be close to a 45 degree orthographic camera angle.

Related

Implementing a 3D Minimap for VR in Unreal Engine

I am working on a VR tower defense game. I want to place my towers on a small map of the field and at the same time show the field/units/towers on the small map, in 3D. Like this:
http://halo.bungie.net/images/games/Halo3ODST/imagery/screenshots/H3ODST_PreparetoDropCinematic.jpg
The map would be something like a small clone of the field. Is there a way to do so with camera etc. So that my minimap is just a re-render/clone of the field.
Sorry if this is the wrong place, but the Unreal Engine Forum is not working at the moment.
I dont know of a simple camera projection to 3D (since the camera map would be about scene capture onto 2D textures)
You can do a fake/tricky camera implementation tho. You just show a normal camera projection and put it into the world. Now you let the actual camera position depend on where the users location is in relation to the map.
You can cover this up with particle effects so it doesnt look like some TV that is following you....
depending on the complexity of your game and how u like the solution obove it might be better to implement a calculated model.
Like you have miniature models of everything u want to show on the map and then let a map class project every "object that is shown on map" the miniature version onto the map object.
Ofc this requires tons of work compared to just setting up a camera but you have alot of better control of how the map looks and what it can do (u could add functionallity, control options and special views etc....)

How to clip part of a sprite based on its position?

I'm designing a game in Cocos2d, and at one point I have coins shooting out on a platform from a zelda-ish perspective. I'd like to display the coin's shadow sprite (a different sprite from the coin) on the platform, but mask or clip the shadow sprite on the edge of the platform. The coin can continue off the edge of the platform, but the shadow should stop at the edge. The platform also moves, so I need the shadow sprite to track with the platform's movement.
I thought it could work to use a CCClippingNode for this, but I can't add it as a child of anything in a spriteBatchNode which is how I'm making my platform. Without having the shadow as a child of the platform, I'll mess up z-order and the shadow movement won't track correctly. I also checked out Ray Wenderlich's tutorial on masking a sprite but I don't think that'll work since it looks like it masks an individual sprite texture and not an area of the view where the sprite shouldn't be displayed. Any ideas on how to solve this?

binding camera to my game person with acceleration, deceleration, ect in libgdx project

So, how can I do this?
For example, my person goes right and camera starting to move to persons coordinates with acceleration, when he stoppes - camera moves to persons coordinates with deceleration. Of cource, I can make it by myself, but is there any library that can help me with it?
I'd suggest using Universal Tween Engine. You could add a short deleay and proper math equations to smooth out the camera transitions.
http://www.aurelienribon.com/blog/projects/universal-tween-engine/

IOS 3d for the experts

I've developed a few simple iOS apps, and I'm looking to develop a simple maze game. What I'm looking to do is really basic, so I'm looking for some guidance on which way to go.
Here is basically what I'm trying to do: simple escape-the-maze game where I read in a 2 dimensional array and that makes my maze.
I want the perspective to be standing in the middle of each square, and when you flick or hit a button, it will advance one square, and you can turn left or right. I'd like to be able to apply textures to the ways based on the numbers in the array, and I'd really like to see the movement of the wall moving towards me then stop.
The walls will always be the same height, and the maze will be simple square blocks, although I do want it to be able to hand rooms that might be more than 2x2 , like maybe 4x4, and be able to handle rendering that.
I'm not sure if trying to do something in OpenGL would be overkill since my requirements are really basic. Like I mentioned, it won't be a free move; it will be advance one square each time you hit a button and turn left or right.
I have read something about ray casting for this sort of thing but am not sure how I would accomplish this in iOS. Also I'd like to have the maze not take up the whole screen, maybe 2/3, while the rest is standard iOS controls like buttons and labels, and a background behind it.
What books or articles should I read to help me? I'd prefer not to use a 3rd party engine since this seems really basic.
You can do this using Core Animation, which is much easier than OpenGL. If you import QuartzCore into your project, you can position any view in 3D as follows:
//set the view's 2D position so that the vanishing point is the middle
//of the screen - use the same centre for every view
view.center = CGPointMake(window.bounds.size.width / 2.0f, window.bounds.size.height / 2.0f);
//create a 3d transform
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -1.0f/500.0f; // this sets the 3D perspective
//you can transform the view in 3D relative to the camera
//this rotates the view by 45 degrees about the Y axis
//but you can also scale, translate, etc using equivalent functions
transform = CATransform3DRotate(transform, M_PI_4, 0.0f, 1.0f, 0.0f)
//transform the view in 3D
view.layer.transform = transform;
So if you create your walls as UIImageViews, you can arrange them into a room by transforming each one individually using the logic above.

Flipboard style page turn animation

I'm trying to write a fairly simple animation using Core Animation to simulate a book cover being opened. The book cover is an image, and I'm applying the animations to its layer object.
As well as animating a rotation around the y axis (The the anchorPoint property set of the left of the screen), I need to scale the right hand edge of the image up so it appears to "get closer" to the user and create the illusion of depth. Flipboard, for example, does this scaling really well.
I can't find any way of scaling an image like this, so only one edge is scaled and the image ends up nonrectangular.
All help appreciated with this one!
CoreAnimation, by default, "flattens" its 3D hierarchy into a 2D world at z=0. This causes perspective and the like to not work properly. You need to host your layer in a CATransformLayer, which will render its sublayers as a true 3D layer hierarchy.