JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
HUD.js
README
char.png
controls.js
creep.js
game.js
items.png
jquery.js
manelik.png
map.js
matrix.js
player.js
power-canvas.js
preloader.js
sprite.html
sprite.js
textures.png

README

For this TIGJam I decided to do some copyright infridgment and do a 2d version of minecraft.
Of course, 4 days of hacking is not enought to do an exact implementation so this is what i could do.
Don't look at it as a ripoff or a sucky copy, look at it as a tribute.

The goal is to make a sandbox 2d plataformer that makes a lot of people smile, thats it.
No money will be generated by this and if there is a Cease and desist or any request from Notch to remove it, delete it, or burn it, i will do it. Yes if Notch asks for it I will print the source code, burn it and post a video of it all.

With that in mind, lets start.

The first MVP is to make a small plataformer with squares tiles, a character, and a infinite scrollable map.
After that, the mouse should allow us to intereact with the enviroment.
Next step: be able to place tiles
Finally, destroy a tile, and you can pick it.

After I get there, I will worry about getting textures, and randomize the map in a cool way.

If that happens, i will care about trees, and allow to craft stuff.

Lets go!

[DONE] Step 1: Make a canvas that takes all the screen.
[DONE] Step 2: Create a Map object, it has a 2*2 matrix
[DONE] Step 3: Render a couple of types of tiles in the screen.
[DONW] Step 4: Create a Player object
[DONE] Step 5: Make him appear on the screen.
[DONE] Step 6: He can move(WASP and arrows)
[DONE] Step 7: He can jump
[DONE] Step 8: He can detect collision and stop jumping
[DONe] Step 9: Scroll the map when he gets to a limit
Step 10: He can point
Step 11: He can delete
Step 12: He can put blocks
Step 13: Rest, sleep, this was a crazy day.

-------
Weekend before TIGJam, I am going to start to get ready, get my mind clear and know exactly what i want to do.
I will use the default texture pack from Minecraft, but I want a 64*64 tile size instead of 16*16. That is 4 times bigger.
I want to use the same file, so i am going to play with images and sprites today, try to make a nice experiment to be ready on Thursday on how to start with canvas and images

Monday before the TIGJam
I have a basic plataformer(the player can move and jump, small map(the size of the screen) and the movement is not perfect but good enought. 
I am starting to wonder if I should just do a simple Creeper-controller Sssssss game instead of a full sandbox type game, it is incredibles ammount of work
Lets see what my mind decides on the week. Tomorrow is big bike ride day so not much programming, maybe i'll get some of the scroll ready but who knows


=====
Got to the TIGJam, and found pixie has a new IDE, which is cool, but I will have to rewrite everything and learn coffee script. Its probably going to be worth it, at least day 1.
So Day 1 TIGJam = Learn how to use Pixie and start on step 1 again
=> [DONE] Render 1 tile
-> [DONW] Hardcode a map data matrix 
-> [DONW] Send that matrix to a map object that turns them into chunks
-> [DONE] Inside of the chunks, you have tile objects
-> [DONE] It can draw them.
-> Add a player
-> You can move
-> You can detect collisions
-> You can move, detect collisions and move the camara
-> Use a automata to generate map
-> The map on top should be mostly land

-==== Pixie str6 IDE is awesome. but i don't feel confortable with it, there are more odds of me doing something playable with the original stack/code so i'll continue with it.
Night of the first day: Back to work.

I Have many thing to do, generate a cool map, test a biger map (and maybe add collisions only on some things close to me). Refactor the Screen to be awesome/better.
Adding the hability to point, put and remove.
And then think about big thinks

My Todo list now:
-> Make a Bigger Bigger map, like a big stair, check if its working allright
-> IF its not slow(hopefully) ill move to point, delete and create
-> If its slow, i'll move to refactor

Its 10:18 pm and only have like 2-3 more hours of energy so lets see what happens

It is fast, so lets point, shoot and have fun!
Lets add a on mouse move, thing, that will store mouseX and mouseY and call update position


So Now I got the mouse set up, and the rotation... but the rotation using matrix.js needs to use translation for everything, so its time to refactor
Now it working, and almost everyone has left, 11:27 and there < 5 people in the JAM

Left the jam, with the hability to put tiles on left and right of the character, with the mouse, poiting. It feels like a sanbox, this is going to be an epic weekend.
I need to refactor that so it looks in a line of where you are poiting, but man, its WORKING. You can build something, that is nice.

Day 2: Friday afternoon. Getting after work, the place is packed, can't find a good place to hack, but lets do it anyway.
The 2 big things to work on, generating the map and getting a good selection of the tile you are poiting to(up to 3 tiles away from you).

I'll work on the map, then on getting the mine/build thing going on better.

The idea with the map is to:
-> Build a automata that generates a random map.
-> It will update some times with its logic
-> Render it, i will need to be able to move anywhere, that is but i'll make a function that moves you everwhere.

2 hours later now===
The map is perfect for a first run at it, can't wait to explore it!!! Its looking AWESOMe.

I notice the game slows down/up depending on how many sprites i am rendering on screen(and the size of the canvas) will probably need to do something about it.
Since the map is in good shape, its time to send right click/left click, find the correct target and start creating stuff =D

=========================================

Saturday afternoon, day 3: Yesterday I got distracted by a game of munchkin and the intention of sleeping early to be full of energy, sadly I ended up doing stuff till 2 am. 
But It was worth it, I am relaxed and have map and adding/mining in a good state

Today I will work on the next things:
-> Adding collision detection while adding blocks to make sure you can't stuck yourself
-> Pretend you are jumping when you remove stuff, so if you are removing stuff under you, you will fall.
-> Adding new tipes of elements, like lava, clouds, rocks and special types of rocks

After doing that, I will start thinking between enemies/animals and trees.

So lets get ready to spend a couple of hours, the first 2 seems fast and the 3 seems fun so lets do it

Done Number 2, now lets do 2
Done! TOld you it was quick

Finished the first 2 and started refactoring. Got a little side-tracked because I wanted new grass to appear. Its not perfect but its good enought =D

Ok so now, map map map.
[DONE]Lets change -1 to lava in everything empty after 180
[DONE]Lets change (almost) every 2 to stone after 20 underground
Lets find random places in A-B and put some ores
MAKE a background after water level

Make a hit animation
Mobs
Inventory

Today has been a crazy day at the TIGJam, got to sit with a whole lot of incredible people and that helped me move forward faster.
So far I got mist of war, map, and part of the inventory done.
Now you can place any kind of item, next step is to have actual numbers

Night of the day 3:
Wow, this was an amazing day, I started with little motivation because I tough that the game was already in a good state and adding something that would really improve it would be really hard.
But this started great by adding rocks, ores, and lava, better collision detection, better jumping and then things started to go better and better with inventory, better diging and cool background
All and all I am pretty exited to release this to the world tomorrow, of course I could add a ton of other stuff(like trees, crafting, mobs, etc)

Tomorrow the plan is to start by making slow mining(hit 4 times to get it) with some sort of animation, add a pickaxe and then mobs. Thats pretty much all I think I will be able to add.
A very interesting side effect of doing a full screen canvas that autorisizes on change is that the zoom of the browser works, and that is AWESOME, really INCREDIBLE

Its almost time to sleep after a great day of codding, I got great advice from everyone in my table @ TIG jam and a lot of motivation.
Usually I would say that being in a hack-a-thon makes me code faster or get better ideas and features, but today was a incredible demonstration that this happens, and when it does, great things happen.

In another note: after 3 days, I feel tired, but I don't want to go to sleep, I would like to keep coding =)

============================
Wow, I had a impossible time waking up, its almost 2:00 pm and I have to leave at 6:00pm, that means: 4 hours to develop 2 features: Slow mining and Mobs.
Its really a lot, and mobs might end up just being decorative or something.

(Also there was a problem with a random crazy guy @ the dojo and there is a police car outside and people dealing with this, weird)
Ok so lets do it, the idea is to:
[DONE]->Change the player mouseclicked functions to be hit and build
->hit will store the selected X and Y and a progress.
->if the stored != the actual, store it and reset progress
->if progress > resistance = call the actual function
->if not, add progress
Once we have that, we might think of rendering it diferently(overlay the effects)

After we get that, create a mob class, it can be rendered and instanciated
Then make it wanred around

LETS DO IT NOAAAA
==== WOW 2:45 to go and i finished slow mining, its time to do creepers and first spawn

=> Make the map 2* wide
=> Make a function called spawn player, it takes you to the middle, falling
=> Make a class called creeper, its starts with the manelik texture
=> Paint it near the player
=> Make a explode function, it destroys a floodfill/kill player(calls respawn
=> Make him jump/move around randomly.

LETS DO IT DO IT DO IT DO IT NOW

=> Crepers ready, 35 minutes to go and i want to do 3 things
Make the creepers kill you
Make the creepers decide to explote, count to X and then explode.
Make lava kill you

Monday: 1 day after
===== The TIG Jam Ended up great. Now its time to release this to the world.
To do that, I am going to do the next thing:
-> Minify and get all js in 1 file
-> Add google analytics and chartbeat
-> Create a public repository with the normal code in github
-> Write a nice self post for minecraft readdit.

I am pretty happy of having spend time learning, having fun and producing this game. All and all is the most elaborated plataform i've done and even tho its just a prototype, I have fun playing it.

:wq