Skip to content

Instantly share code, notes, and snippets.

View defHLT's full-sized avatar
🐔

Artem Kholodnyi defHLT

🐔
View GitHub Profile
attribute vec2 uv;
varying vec4 colorVarying;
varying vec2 uvVarying;
varying vec2 texcoord;
void main () {
texcoord = uv;
gl_Position = gl_ModelViewProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
----------------------------------------------------------------
-- Copyright (c) 2010-2011 Zipline Games, Inc.
-- All Rights Reserved.
-- http://getmoai.com
----------------------------------------------------------------
local function printf ( ... )
return io.stdout:write ( string.format ( ... ))
end
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-window-option -g xterm-keys on
# Titles
set -g set-titles on
# Set window title string
# #H Hostname of local host
# #I Current window index
# #P Current pane index
-- destroyer sensor
local sensor_b = world:addBody(MOAIBox2DBody.STATIC)
sensor_f = sensor_b:addRect( STAGE_W/2, 0, -STAGE_W/2, 50)
sensor_b:setTransform( 0, -STAGE_H/2 - 60 )
sensor_f:setSensor(true)
sensor_f:setCollisionHandler(
function(event, fa, fb)
local body = fb:getBody()
local prop = body.prop
mainLayer:removeProp(prop)
[ 3%] Built target box2d
[ 5%] Built target chipmunk
[ 5%] Built target expat
[ 17%] Built target freetype
[ 17%] Built target glew
[ 18%] Built target jansson
[ 19%] Built target z
[ 58%] Built target crypto
[ 62%] Built target ssl
[ 67%] Built target curl
#!/usr/bin/ruby
a, b, c, d = $*[0].split('.').map(&:to_i)
i = a * 256**3 + b * 256**2 + c * 256 + d
puts "dec: http://" << i.to_s
puts "hex: http://0x" << i.to_s(16)
puts "oct: http://0" << i.to_s(8)
2013-10-29 22:44:55 icedp hi
2013-10-29 22:45:11 icedp is it true that JS binding work both on -x and -html5 ?
2013-10-29 23:09:30 -- PuffTheMagic_ is now known as PuffTheMagic
2013-10-30 00:23:24 riq_ icedp, yes
2013-10-30 00:24:13 riq_ if your JS game uses the cocos2d JS API, or the Chipmunk JS API, or the WebGL API it will run on top of cocos2d-x + JS bindings, or on top of cocos2d-html5
2013-10-30 00:27:10 icedp is there any overhead for using JS on phones? I'm more interested in developing for android/ios, but cross platform with html looks cool
2013-10-30 00:28:22 icedp or should I go C++ in this case?
2013-10-30 00:36:50 riq_ icedp, it depends on your game
2013-10-30 00:37:18 riq_ match-3 games, puzzle games, simple arcade games could run with cocos2d-x + JSB at 60 FPS on an iPhone 4S
2013-10-30 00:37:50 riq_ But super CPU intensive games might not be suitable for pure cocos2d-x + JS
#!/bin/zsh
SESSIONNAME="def"
tmux has-session -t $SESSIONNAME &> /dev/null
if [ $? != 0 ]
then
tmux new-session -s $SESSIONNAME -d
tmux send-keys -t $SESSIONNAME "weechat-curses" C-m C-l
tmux new-window -t $SESSIONNAME
> ice ~ % wajig install cinnamon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
cinnamon-common gir1.2-accountsservice-1.0 gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-gkbd-3.0 gir1.2-json-1.0 gir1.2-muffin-3.0
gir1.2-polkit-1.0 gir1.2-upowerglib-1.0 gir1.2-xkl-1.0 gjs libcaribou-common libcaribou0 libgjs0d libmozjs-17.0-0 libmuffin0 muffin-common
The following NEW packages will be installed:
cinnamon cinnamon-common gir1.2-accountsservice-1.0 gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-gkbd-3.0 gir1.2-json-1.0 gir1.2-muffin-3.0
gir1.2-polkit-1.0 gir1.2-upowerglib-1.0 gir1.2-xkl-1.0 gjs libcaribou-common libcaribou0 libgjs0d libmozjs-17.0-0 libmuffin0 muffin-common
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="moai" />
<Option makefile_is_custom="1" />
<Option compiler="gcc" />
<Option virtualFolders="CMake Files\;CMake Files\third-party\;CMake Files\third-party\box2d\;CMake Files\third-party\chipmunk\;CMake Files\third-party\contrib\;CMake Files\third-party\crypto\;CMake Files\third-party\curl\;CMake Files\third-party\expat\;CMake Files\third-party\freetype\;CMake Files\third-party\glew\;CMake Files\third-party\jansson\;CMake Files\third-party\jpg\;CMake Files\third-party\lua\;CMake Files\third-party\luaext\;CMake Files\third-party\mongoose\;CMake Files\third-party\ogg\;CMake Files\third-party\png\;CMake Files\third-party\sfmt\;CMake Files\third-party\sqlite3\;CMake Files\third-party\ssl\;CMake Files\third-party\tinyxml\;CMake Files\third-party\tlsf\;CMake Files\third-party\untz\;CMake Files\third-party\vorbis\;CMake Files\third-party\zlib\;CM