CodeName: DontGoLeft

Show off your games, demos and other (playable) creations.

Would I buy this game if it were finished?

God yes.
1
13%
I'd buy it now.
1
13%
I wish i was kraftman.
6
75%
 
Total votes: 8

User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: CodeName: DontGoLeft

Post by GijsB »

its strange that your poll has no 'no' ._.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: CodeName: DontGoLeft

Post by kraftman »

Updated it a bit. I've finished off the edging on the dirt when it is exposed to air, so it all looks a bit better.
If you spawn halfway through the ground, jump a bit while its loading.
Maybe I should rename it "DontGoLeftAndJumpABitWhileLoading" I could fix those errors, but then where is the challenge?!
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: CodeName: DontGoLeft

Post by GijsB »

I have been working on Minecraft2D, pretty much the same, but mine doesnt crash when going left, it actualy never crashes :awesome:
the only problem is that it goes pretty slow when using normal LÖVE instead of LÖVEJIT
here :

(re-run when stuck or re-run when below landscape X3)
Attachments
minecraft 2D.love
(52.1 KiB) Downloaded 84 times
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: CodeName: DontGoLeft

Post by Trappingnoobs »

GijsB wrote:I have been working on Minecraft2D, pretty much the same, but mine doesnt crash when going left, it actualy never crashes :awesome:
the only problem is that it goes pretty slow when using normal LÖVE instead of LÖVEJIT
here :

(re-run when stuck or re-run when below landscape X3)
Umm
if math.sqrt((x1-x2)^2+(y1-y2)^2) < 100 then--you dont have to check collision with blocks that are not closeby
Isn't that slower than detecting collision in the first place?!


@Kraftman

I like the terrain, I've been wondering for a while how terraria did that so that the block's appearance changes depending on the one next to it. You actually create the images in a script? Does terraria do that too?

Edit
Ooh, 'World.lua:108:Cannot create framebuffer. Error in implementation, please inform love devs'
I think I dug too low down :(
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: CodeName: DontGoLeft

Post by kraftman »

I have no idea how terraria does it.

I thought it would be interesting to see how much i could do purely in code:

For each type of block, i make a few variations of colour, and then i check the blocks around the current block, and make a random edge based on what it finds.

There is probably a better way to do it but I havnt thought of it yet. This way means there is a large amount of variation and a finite amount of images generated.

The grid layout of the blocks makes collision detection nice and simple, you can pretty much just floor the player x and y and you have the location of the block that the player is potentially colliding with.
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: CodeName: DontGoLeft

Post by Trappingnoobs »

kraftman wrote:I have no idea how terraria does it.

I thought it would be interesting to see how much i could do purely in code:

For each type of block, i make a few variations of colour, and then i check the blocks around the current block, and make a random edge based on what it finds.

There is probably a better way to do it but I havnt thought of it yet. This way means there is a large amount of variation and a finite amount of images generated.

The grid layout of the blocks makes collision detection nice and simple, you can pretty much just floor the player x and y and you have the location of the block that the player is potentially colliding with.
I decompiled terraria a while ago to look at the source but they've got so many files it scared me off.

Your code approach is great. If you make the transition between things smoother like terraria does, it'd be amazing.

Don't you have to test multiple blocks for collisions though? I saw some almost transparent lines seperating blocks of something like 10x10 tiles, I assume you check for collisions in any block the player's in?

Also, are there any tutorials on framebuffers you can link me to? I've never bothered using them but they do seem to be used quite a lot so I expect from that that it's good practise to use them.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: CodeName: DontGoLeft

Post by kraftman »

Trappingnoobs wrote:
I decompiled terraria a while ago to look at the source but they've got so many files it scared me off.

Your code approach is great. If you make the transition between things smoother like terraria does, it'd be amazing.

Don't you have to test multiple blocks for collisions though? I saw some almost transparent lines seperating blocks of something like 10x10 tiles, I assume you check for collisions in any block the player's in?

Also, are there any tutorials on framebuffers you can link me to? I've never bothered using them but they do seem to be used quite a lot so I expect from that that it's good practise to use them.
I think terraria precalculates the entire world (since it is finite) which is why it loads more smoothly. I planned on moving the code that creates the new tiles/framebuffers over into a thread, but it seems its a lot more complicated than I thought, so I'll have to think of something else.

The thin lines are the overlap between framebuffers, the positions are slightly wrong because I was trying to stop them blurring sometimes.

Currently, the most blocks i need to check for collisions with at any one time is 5, 3 for the x and 2 for the y.

EDIT:
here's a quick update where you can actually collect the blocks, and hopefully the thin lines have gone too.
Attachments
mess.love
(31.37 KiB) Downloaded 70 times
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: CodeName: DontGoLeft

Post by Trappingnoobs »

kraftman wrote:
Trappingnoobs wrote:
I decompiled terraria a while ago to look at the source but they've got so many files it scared me off.

Your code approach is great. If you make the transition between things smoother like terraria does, it'd be amazing.

Don't you have to test multiple blocks for collisions though? I saw some almost transparent lines seperating blocks of something like 10x10 tiles, I assume you check for collisions in any block the player's in?

Also, are there any tutorials on framebuffers you can link me to? I've never bothered using them but they do seem to be used quite a lot so I expect from that that it's good practise to use them.
I think terraria precalculates the entire world (since it is finite) which is why it loads more smoothly. I planned on moving the code that creates the new tiles/framebuffers over into a thread, but it seems its a lot more complicated than I thought, so I'll have to think of something else.

The thin lines are the overlap between framebuffers, the positions are slightly wrong because I was trying to stop them blurring sometimes.

Currently, the most blocks i need to check for collisions with at any one time is 5, 3 for the x and 2 for the y.

EDIT:
here's a quick update where you can actually collect the blocks, and hopefully the thin lines have gone too.
Lines are still there. I like how the blocks sort of give up chasing after you if you keep away from them too long.
Also, if I get a 3 high block of dirt, and dig it down to just the horizontally middle blocks, the player can walk through the middle block.
User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: CodeName: DontGoLeft

Post by kraftman »

Did he just add cows that fall from the sky? I think he did.
Attachments
DonGoLeftv0.22.love
(38.01 KiB) Downloaded 81 times
User avatar
Trappingnoobs
Citizen
Posts: 95
Joined: Tue Oct 12, 2010 8:52 pm

Re: CodeName: DontGoLeft

Post by Trappingnoobs »

kraftman wrote:Did he just add cows that fall from the sky? I think he did.
Wow. Your texture transitions are as good, if not better than, terraria's. I've so got to look at how you did that in the morning.

I like the cows, but they have insane superjump ability? :L
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest