three.js - create draggable circle - webgl

I've just cloned the three.js project from github. I'm interested in creating a circle on a 2d plane that I can drag with my mouse. I have no experience in graphics programming (WebGL or OpenGL).
Can someone please point me in the right direction? I've tried google, but the examples seem too complicated.
Many thanks in advance,

I think this is something you need to have a go at. It's not nearly as complicated as you might think. If the maths are scaring you off, don't worry three.js handles it all for you, you just need to add a camera, some shapes and ask it to render them.
Please do take the time to go through aerotwists three js tutorials as these will give you a good grounding in how to setup a basic scene.
You will quickly realise that once you have a scene you can change objects quite easily using your current scene.
As for dragging things around, I'm sure that will come just try to walk before you can run.

Related

Making a Platform game with Corona SDK

I'm trying to develop a platform game similar to Geometry Dash but i'm facing a lot of problems during the making of the algorithm.
I don't barely know how to proceed. Are the levels structured with a long image ( that is the ground) with obstacles added, or there are many obstacles generated progressively during the game?
I'd like to know where to start from, what to draw and how to place it in my game, how to build the collision detection.
The game will be an auto-scrolling platformer, so, will the character's asset be moving right or will all the level except for the character be moving left?
I'm a beginner, so i would like to receive detailed answers and not too difficult to understand. Thank you.
if you have any advice I would gladly listen to it.
I've done all corona tutorials but they doesn't explain how to do a platformer. - Luca Pasini
Looks like you still don't feel how game work from inside. Tutorials probably will not help you much. I think you need to start something very simple by your own - not by tutorials.
For example:
Show red rectangle
Show blue recatngle
Tap on the screen and red rectangle must change his position (not by transitions - just by core x,y change)
If they are collide - show text: "You win". Collision check just by raw calculations.
Then go with updates, that will make it looks more like a game.

UIScrollView Dome Effect

DESIRED EFFECT:
Imagine a UIScrollView such that as you scroll in any direction, you feel like you're looking around inside a dome. As in, the screen is stretched/warped/distorted at the edges by a filter/mesh of some sort. Think of a 3D game where you're looking up at the sky.
WHAT IT'S FOR:
I plan on plastering menu items on a sky of sorts. Imagine looking at the sky where clouds are tappable menu items and there are enough clouds such that you have to scroll around to find them all. This is just a menu to the actual content; it isn't a full 3D game where you can move around and such. I am therefore hoping that I can fake the 3D effect by stretching/warping/distorting the edges of the screen.
WHAT I NEED:
I need to at least know the direction to look in so that I can see how feasible and how much work it will take. If it's too much, I'll unfortunately have to do something else.
From what I've looked at so far, it appears that QuartzCore isn't enough and I suspect that OpenGL is the only way to do it. Before I throw myself into OpenGL though (I'm a complete noob at it), I'd like to know if that's even the correct technology that I should be looking at. And if it is, what area of it I should be looking at (initial searches indicated stuff like texture warping might be what I'm looking for?).
Thanks!
You’re on the right track. You’ll want to use OpenGL ES for this. The basic idea behind this that I’ve seen used to great effect is to project the scene on the inside of a cube, rotating the cube when the user moves their finger. This book really helped me when I got started with OpenGL.

Cocos2D + Box2D Editor?

I want to develop an Angry Birds style game (more for learning purpose), so I am digging into Cocos2D + Box2D and after having done a few test all by code I am wondering which tool can I use to design level easier ?
A bit of google pointed me out Tiled or R.U.B.E. but I am not really sure if it's what I need. Tiled seem to be more designed for tiled game like a plat-former and I don't really know about R.U.B.E.
What I'd like to do is being able to place my body manually in a scene, set their physic property and so...
Which tool would you recommend for this kind of level design ?
Thank in advance.
I advise you to download/buy LevelHelper/SpriteHelper, they have helped me a lot when I was a novice with box2d. I think it's just what you need, once you learn the basics then you can go forward freely without them. In addition now there's also one or more tutorials on the Ray Wenderlich site that will help you even more like this (The softwares are not free, but in my opinion they worth their price)

how to animate stick arms

I know this is a very basic question but I have kinda been thrown in at the deep end with this assignment for web development, I have managed to create 2 pretty good images on firewowkrs, but I have no idea how to animate them.I have had a little play around with the controls like the states and stuff and I still do not understand, i've tried the combined path and that doesnt seem to work for me. I would like to simply animate both of their arms to show that they are waving up and down. It consists of the stick arms and then the arms have four stick fingers as well, if this is of any help ?
This tutorial might help you grasp the basics of animation in firworks, it did for me
http://www.adobe.com/devnet/fireworks/articles/animated_logos.html
or you can have a read through some basics at the adobe website:
Fireworks CS4 Basics
or
Fireworks CS5 Basics
Hope this helps

Procedurally animating the growing of a 2D plant

I'm trying to figure out the best way to procedurally animate the growing of a 2D plant in iOS.
I want the plant to animate to give an encroaching feeling to the user.
Basically, to animate the growing of a branch, with little buds that will eventually animate into full grown leaves.
To breathe a little life into it, I'd also like the plant to sway a bit as it grows, rather than feeling hand painted on the screen.
One way I've thought of is to use CGPaths and Bezier curves to create the shape of the stalk and the leaves, but I'm not entirely sure how to animate the drawing of the paths. Once I get the "drawing" of the stalk, i'd like to "plant" little buds at certain points on the stalk, as the line is growing/animating and these buds will also start to grow outwards from the plant.
Any suggestions on what route to take to accomplish this task? I'd prefer to procedurally animate as opposed to hand drawing each frame and animating that way. My reasoning is that I imagine procedurally animating will be less time consuming, give me more control over different aspects of the animation, and be reusable in other projects (not to mention, it will be fun to program!)
I've come across this blog posting for the drawing of animated lines:
http://oleb.net/blog/2010/12/animating-drawing-of-cgpath-with-cashapelayer/
Perhaps this would be a starting approach for achieving the results I want, I need to sit down and go through the code he posted.
Also, maybe this is something that would be easier to do using cocos2d or something similar? Or perhaps quartzcore and core animation will work fine.
Thanks for any suggestions you might have, any information is helpful at this point.
(Great question! Posting this as a "community wiki" since it is not an answer but just some references and I didn't want the links to get screwed up in comments. Perhaps people want to add to this?)
I did a simple search on "procedural tree branching code" and there were lots of interesting hits - really rich area.
A post on gameDev.stackExhange pointed to this great resource: Algorithmic Botany
Also Snappy Tree is pretty amazing and the source code is available.
These two also sound interesting:
TReal is a program capable of generating realistic 3D tree models.
Arbaro is an implementation of the tree generating algorithm described in Jason Weber & Joseph Penn: "Creation and Rendering of Realistic Trees" written in Java.
Perhaps more accessible to the OP and with a less complex result are these actionScript tutorials on fractal trees. ActionScript drawing code is pretty easily translated to Core Graphics.

Resources