Friday, February 2, 2018

Recover accidentally deleted Git Stash

Step to recover the accidentally deleted Git Stash:

1. Get the list of unreachable commits, the accidentally deleted commit might still there before garbage collected.
git fsck --unreachable 

 2. Check through the list of unreachable commits -- <sha> begin with "unreachable commit", ignore the <sha> begin with "unreachable blob".
git show  <sha>

3. Once find the accidentally deleted commit, recover the commit.
git stash apply <sha>


Sunday, March 27, 2016

Voxel Editing Tool

Lots of voxel games recently, and I'm always curious how those models were made. Last week, came across NimbleBit's website and found they have a pretty cool "BitCity" (http://nimbledave.tumblr.com/). BitCity looks beautiful, and it's build in Magica Voxel. After spending some more time digging into this topic, found Qubicle is another voxel editor many people are using making games.

I feel they are both pretty cool voxel editors. Let's try build something in those tools!


Magica Voxel
https://voxel.codeplex.com/
https://ephtracy.github.io/

Qubicle
http://minddesk.com/

Thursday, September 18, 2014

Irrlicht setup

Trying to use Irrlicht with C++ on Windows and MacOS.

1. Setting up on Eclipse (Windows) is pretty straight forward. Just follow the tutorial and it can be compiled.

2. Setting up on XCode 5.x (MacOS) had some trouble. Finally, found a solution on the forum:

Anyway to start:
  1. Create a new empty project.
  2. Add a target. (You can do this by left clicking the project file in the tree menu on the left, then look for a circle with a plus at the bottom of the window)
      Select Max OS X > Application > Cocoa Application
  3. Now delete the *AppDelegate.m, *AppDelegate.h and *.xib file, you wont need these.
  4. Now create a new file
      I usually select Mac OS X > C and C++ > C++ File. I also usually fill it with the Example 1 tutorial to get the app compiling with some output to start.
  5. Now click on the project in the left tree menu again
  6. In the central part of the screen, click "Build Settings", and change the following settings:
    1. Base SDK: Standard (32/64 bit intel)
    2. Base SDK: Latest Mac OS X
    3. Compiler for C/C++/Objective-C: LLVM GCC 4.2
    4. Header Search Paths: /Path/To/Your/Irrlicht/Folder/include
  7. Now select "Build Phases"
    1. Under "Link Binary With Libraries, click the plus and add Cocoa, Carbon, IOKit, OpenGL, and the libIrrlicht.a file.
    2. under "Compile Sources", select the 'main.m' and then delete the main.m file
  8. Compile!

* Somehow on 1st tutorial, using createDevice(video::EDT_OPENGL is much more faster than using EDT_SOFTWARE.

http://irrlicht.sourceforge.net/forum/viewtopic.php?f=5&t=13890&hilit=xcode&start=60
http://irrlicht3d.org/wiki/index.php?n=Main.InstallingIrrlicht#BuildMacOSX
http://irrlicht3d.org/wiki/index.php?n=Main.Macintosh

Thursday, August 28, 2014

Online Learning

Some online learning resources keep us seeing new world everyday:


They are hosting online university-level courses. Love all of them!
https://www.coursera.org/
https://www.edx.org/
https://www.udacity.com/
https://www.futurelearn.com
https://iversity.org/


SlideRule is a hub collects info from other online learning resources. Provides you some "Learning Paths" on a specific area, e.g. Data Science, UX Design.


Don't forget this MIT one already exists for a long time.
http://ocw.mit.edu


Khanacademy is the one not limited to university-level courses. Haven't try this yet, but it's very famous.
https://www.khanacademy.org/


These 2 are more a "tutorial" courses give you some skills mostly on computer related stuff (also some design, photography, and more.) And you need to pay some money to access the course.
https://www.udemy.com
http://www.lynda.com/


Here are some from Taiwan top ranking universities.
http://ocw.aca.ntu.edu.tw/ntu-ocw/
http://ocw.nctu.edu.tw/index.php
http://ocw.nthu.edu.tw/
http://www.tocwc.org.tw/

Tuesday, August 26, 2014

Visualization Courses

Some visualization courses:

1. Information Visualization (Tamara Munzner@UBC)
http://www.cs.ubc.ca/~tmm/courses/547-14/
http://www.cs.ubc.ca/~tmm/courses/533-11/

Although there's no video archive provided, the syllabus has lots of materials for reading (papers, and videos link). Professor Tamara Munzner is also woking on her own visualization textbook, Visualization Analysis and Design, and will be available on Oct 2014. The book should be a nice thing to read.


2. Visualization (Hanspeter Pfister@Harvard)
http://www.cs171.org/

There's a video archive provided (very cool!). And that's already sufficient for me.


3. Introduction to Infographics & Data Visualization Course (Alberto Cairo)
https://www.youtube.com/playlist?list=PLa4VFIBUKrgLao-DalwedOCiq9RV6MPk9

This is a playlist for the course taught by Alberto Cairo (the author of The Functional Art). It's from the angle of the Journalism, but it also provide some insights about how to make good visualization.


Visual Thinking for Design, Colin Ware (2008)
Every visualization expert has their own recommended books. Although there still no "classic" textbook on visualization, I found many people recommend reading this book. This book doesn't show all the knowledge about visualization, but it tells us how to make our brain fell happy with the visualization we are making.

Wednesday, January 1, 2014

Predictable Random Numbers

Guy W. Lecky-Thompson. “Predictable Random Numbers”. In Game Programming Gems, Charles River Media, 2000, pp. 133–140.


Algorithms for an Infinite Universe


other way to generate random:
[2] Random Number Generators: Good Ones Are Hard To Find. Stephen K. Park and Keith W. Miller (1988). Communications of the ACM 31 (10): 1192–1201


A Real-Time Procedural Universe
http://www.gamasutra.com/view/feature/130921/a_realtime_procedural_universe_.php?print=1

----------

An example I could think of:

How to make the game world random, and we can still predict the behavior (Thus, all players will have the same experience in those random events).

 e.g. Imagine in Animal Crossing, the weather seems random for the player. Some days are sunny and some days are rainy. But, there's a way we can use a seed to generate the weather forecast. Thus, we can calculate how the weather will be 1000 days from now. So, all the player will be able to have the same experience in weather change in the game.
Real Time Web Analytics