Skip to content

Instantly share code, notes, and snippets.

View ricardoquesada's full-sized avatar

Ricardo Quesada ricardoquesada

View GitHub Profile
@ricardoquesada
ricardoquesada / mega65_gaming_install_guide.md
Last active October 15, 2021 02:55
Instructions for the Mega65 gaming competition

Mega65 gaming competition: how to run the emulator

If you want to run the Mega65 emulator for the [Mega65 x-mas gaming competition][1] follow these steps:

  1. Download the mega65 emulator from here: https://github.lgb.hu/xemu/
  2. Run the xmega65 binary (not the x65 one!)
  3. It will complain about missing rom files and missing SD
    • Click Ok, and let it create the SD image
  • It will enter into an infinite boot loop (don't worry, that's Ok).
@ricardoquesada
ricardoquesada / Application.mk
Created January 29, 2016 03:07
Application.mk with armeabi-v7a support
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic
APP_ABI := armeabi-v7a
ifeq ($(NDK_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
@ricardoquesada
ricardoquesada / main.cpp
Last active January 29, 2016 03:06
cocos2d-x with android GL trace support
#include "AppDelegate.h"
#include "cocos2d.h"
#include "platform/android/jni/JniHelper.h"
#include <jni.h>
#include <android/log.h>
#include <dlfcn.h>
#define LOG_TAG "main"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
Copyright (C) 2013 Henry van Merode. All rights reserved.
Copyright (C) 2015 Chukong Technologies.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARI
@ricardoquesada
ricardoquesada / test.c
Created February 6, 2015 19:09
hello world in C
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hello world!\n");
return 0;
}
@ricardoquesada
ricardoquesada / mips-error
Created February 4, 2015 05:31
chipmunk v7.0.0 error with gcc-mips v4.8.1
.set macro
.set reorder
.end SetVerts
.size SetVerts, .-SetVerts
.align 2
.set nomips16
.set nomicromips
.ent cpPolyShapePointQuery
.type cpPolyShapePointQuery, @function
riq@retinita-2 ~/progs/cocos2d-x/mac (v3)$ make -j8 lua-empty-test
[ 1%] [ 1%] [ 1%] Built target xxhash
Built target tinyxml2
Built target unzip
[ 4%] Built target protobuf
[ 78%] Built target cocos2d
[ 79%] [ 79%] [ 79%] [ 79%] Building C object cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/__/__/__/external/lua/luasocket/options.c.o
Building C object cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/__/__/__/external/lua/luasocket/inet.c.o
[ 80%] [ 80%] [ 80%] [ 80%] Building CXX object cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/manual/CCLuaBridge.cpp.o
Building CXX object cocos/scripting/lua-bindings/CMakeFiles/luacocos2d.dir/manual/CCLuaEngine.cpp.o
@ricardoquesada
ricardoquesada / 3d_animations_api.cpp
Created May 29, 2014 20:48
High Level API for cocos2d-x's 3d animations
//
// API to play 3d animations on Sprite3D
//
// create the sprite
auto sprite3d = Sprite3D::create(“duck.ckb”);
sprite3d->setPosition3D(0, 0, 0);
this->addChild(sprite3d);
// get the animation
@ricardoquesada
ricardoquesada / gist:9767824
Created March 25, 2014 18:16
how to create a 2d / 3d game in cocos2d
### Option 1
### director has a mode
def appdelegate:
# Projection / Camera is part of director
# Scene checks this value in order to create the correct Physics world
director.setMode(2D)
director.runScene( MyScene() )
@ricardoquesada
ricardoquesada / renderer
Last active May 26, 2016 03:42
cocos2d-x v3.0 renderer pseudo code
#
# cocos2d-x v3.0 renderer
#
# for further info read: https://docs.google.com/document/d/17zjC55vbP_PYTftTZEuvqXuMb9PbYNxRFu0EGTULPK8/edit#heading=h.3kpkd5ktk6p1
#
# Populates the VBO.
# It stops if the command is a group or if
# the VBO's capacity is not enough for the current Quad Command