CodeName: DontGoLeft
Re: CodeName: DontGoLeft
its strange that your poll has no 'no' ._.
Re: CodeName: DontGoLeft
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?!
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?!
Re: CodeName: DontGoLeft
I have been working on Minecraft2D, pretty much the same, but mine doesnt crash when going left, it actualy never crashes
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)
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 83 times
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: CodeName: DontGoLeft
UmmGijsB wrote:I have been working on Minecraft2D, pretty much the same, but mine doesnt crash when going left, it actualy never crashes
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)
Isn't that slower than detecting collision in the first place?!if math.sqrt((x1-x2)^2+(y1-y2)^2) < 100 then--you dont have to check collision with blocks that are not closeby
@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
Re: CodeName: DontGoLeft
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 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.
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: CodeName: DontGoLeft
I decompiled terraria a while ago to look at the source but they've got so many files it scared me off.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.
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.
Re: CodeName: DontGoLeft
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.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.
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
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: CodeName: DontGoLeft
Lines are still there. I like how the blocks sort of give up chasing after you if you keep away from them too long.kraftman wrote: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.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.
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.
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.
Re: CodeName: DontGoLeft
Did he just add cows that fall from the sky? I think he did.
- Attachments
-
- DonGoLeftv0.22.love
- (38.01 KiB) Downloaded 80 times
- Trappingnoobs
- Citizen
- Posts: 95
- Joined: Tue Oct 12, 2010 8:52 pm
Re: CodeName: DontGoLeft
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.kraftman wrote:Did he just add cows that fall from the sky? I think he did.
I like the cows, but they have insane superjump ability? :L
Who is online
Users browsing this forum: Bing [Bot] and 6 guests