Skip to content

Instantly share code, notes, and snippets.

View keith-kurak's full-sized avatar

Keith Kurak keith-kurak

View GitHub Profile
@keith-kurak
keith-kurak / whereever you init firebase
Created June 2, 2023 04:55
Firebase RN auth persistence fix
import { initializeApp } from "firebase/app";
import AsyncStorage from '@react-native-async-storage/async-storage';
import { initializeAuth, getReactNativePersistence } from "firebase/auth"
const firebaseConfig = {
//..
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
@keith-kurak
keith-kurak / floorislava.p8
Created October 30, 2022 18:11
PICO-04: lava floor, game over condition
-- ** make a lava floor that generates a game over condition when touched
-- 1) After creating lava sprite with flag 2 set, add this to set_map_x()
-- make lava
if flr_hgt < 1 then
mset(x,15,2)
end
-- 2) in _init(), add dead flag to player
@keith-kurak
keith-kurak / mapgen1.p8
Created October 30, 2022 17:43
PICO-03: map generation
-- ** this part generates a simple map, generating more each time you reach the end of the memory map **
-- works around the overlap when resetting position by making the overlap area the same
-- 1) add map generation fn to tab 2
function gen_map()
--clear
for i=0,127 do
for j=0,15 do
mset(i,j,3)
@keith-kurak
keith-kurak / maps1.p8
Created October 30, 2022 00:14
PICO-02: maps and collision
-- Create a map and get a sprite moving on it
function _init()
x = 64
y = 64
spd = 1
end
function _draw()
cls()
camera(x-24,0)
@keith-kurak
keith-kurak / sprite.p8
Last active October 16, 2022 17:12
PICO-01: Move a sprite
function _init()
x = 64
y = 64
end
function _draw()
cls()
spr(0,x,y)
@keith-kurak
keith-kurak / 06: Hello, deploy!
Created December 18, 2021 05:17
06: Hello, deploy!
Add files and bits needed to deploy and build apps
@keith-kurak
keith-kurak / 05: Hello, Chat!
Last active December 29, 2021 20:42
05: Hello, Chat!
Follow these steps to add chat to each channel
@keith-kurak
keith-kurak / 04: Hello, Authentication!
Last active December 29, 2021 18:03
04: Hello, Authentication!
Follow the steps below to add login capabilities!
@keith-kurak
keith-kurak / 03: Hello, Firebase!
Last active January 12, 2022 04:10
03: Hello, Firebase!
// add Firebase as backend, loading and saving channels
@keith-kurak
keith-kurak / 02: Hello, MobX State Tree!
Last active January 12, 2022 03:55
02: Hello, MobX State Tree!
Edit each file in order in this gist to complete the section!