Posts

Showing posts from November, 2016

flappy bird游戏源代码揭秘和下载

Image
作者:左文 链接:https://www.zhihu.com/question/22715390/answer/22368482 来源:知乎 著作权归作者所有,转载请联系作者获得授权。 背景: 最近火爆全球的游戏flappy bird让笔者叹为观止,于是花了一天的时间山寨了一个一模一样的游戏,现在把游戏的思路和源码分享出来,代码是基于javascript语言,cocos2d-x游戏引擎,cocos2d-x editor手游开发工具完成的,请读者轻砸; ps:运行demo必须配置好cocos2d-x editor,暂不支持其他工具; 还有demo是跨平台的,可移植运行android,ios,html5移动系统等,csdn博客里会介绍代码如何移植,请持续关注; Android Apk下载演示: 暂时先移植到android平台 下载地址: http:// share.weiyun.com/cac18d 8c58d40bf2401b3fdeeb6bcb2f 代码下载: csdn下载: http:// download.csdn.net/detai l/touchsnow/6912707 百度云盘: http:// pan.baidu.com/s/1pJnWDb 9 金山快盘 : http://www. kuaipan.cn/file/id_2534 8935635745384.htm?source=1 代码如何移植到各平台: Android: http:// blog.csdn.net/touchsnow /article/details/19176091 html5: http:// blog.makeapp.co/? p=245 效果图: <img src="https://pic3.zhimg.com/765282dd955615781212934f058aba5a_b.jpg" data-rawwidth="1355" data-rawheight="706" class="origin_image zh-lightbox-thumb" width="1355" data-ori...

Introducing Play 2

Since 2007, we have been working on making Java web application development easier. Play started as an internal project at Zenexity (now  Zengularity ) and was heavily influenced by our way of doing web projects: focusing on developer productivity, respecting web architecture, and using a fresh approach to packaging conventions from the start - breaking so-called JEE best practices where it made sense. In 2009, we decided to share these ideas with the community as an open source project. The immediate feedback was extremely positive and the project gained a lot of traction. Today - after two years of active development - Play has several versions, an active community of more than 10,000 people, with a growing number of applications running in production all over the globe. Opening a project to the world certainly means more feedback, but it also means discovering and learning about new use cases, requiring features and un-earthing bugs that we were not specifically considered ...

What is HTML Canvas?

http://www.w3schools.com/html/html5_canvas.asp The HTML <canvas> element is used to draw graphics, on the fly, via JavaScript. The <canvas> element is only a container for graphics. You must use JavaScript to actually draw the graphics. Canvas has several methods for drawing paths, boxes, circles, text, and adding images. Browser Support The numbers in the table specify the first browser version that fully supports the <canvas> element. Element <canvas> 4.0 9.0 2.0 3.1 9.0 Canvas Examples A canvas is a rectangular area on an HTML page. By default, a canvas has no border and no content. The markup looks like this: <canvas id="myCanvas" width="200" height="100"></canvas> Note:  Always specify an id attribute (to be referred to in a script), and a width and height attribute to define the size of the canvas. To add a border, use the style attribute. Here is an example of a basic, empty canvas...

Cocos2d-x

http://www.cocos2d-x.org/products Cocos2d-x is an open-source game framework written in C++, with a thin platform dependent layer. It is widely used to build games, apps and other cross platform GUI based interactive programs. There are also JavaScript and Lua bindings included! Brand New Graphic Renderer: The Cocos2d-x renderer is optimized for 2D graphics with OpenGL. It supports skeletal animation, sprite sheet animation, coordinate systems, effects, multi-resolution devices, textures, transitions, tile maps, and particles. It adopts a RenderQueue design.

Quick-Tip: SSH Tunneling Made Easy

Image
http://www.revsys.com/writings/quicktips/ssh-tunnel.html I was surprised at how long it took me to find a good HOWTO on setting up a simple SSH tunnel that I wanted to write up this Quick-Tip. Using  OpenSSH  on a Linux/Unix system you can tunnel all of the traffic from your local box to a remote box that you have an account on. For example I tunnel all of my outbound E-mail traffic back to my personal server to avoid having to change SMTP servers, use SMTP-AUTH, etc. when I am behind firewalls. I find that hotel firewalls, wireless access points, and the other various NATing devices you end up behind while traveling often do not play nice. To do this I use the following: ssh - f user@personal - server . com - L 2000 : personal - server . com : 25 - N The  -f  tells ssh to go into the background just before it executes the command. This is followed by the username and server you are logging into. The  -L 2000:personal-server.com:25  is in the f...