Show off your games, demos and other (playable) creations.
Davidobot
Party member
Posts: 1155
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

Hello and welcome to yet another game.
This is called T.A.O.T.R.T.W.G.E. which stands for The Adventure of The Red Thing With Green Eyes. I know, it's a long name .
NOPE, BLAST FROM THE PAST!!! It's now renamed to: "Adventures of Barnabus"!

This game uses my lovelyMoon library. Go check it out!

You can call it a Minecraft 2D clone or a Terraria clone or whatever else you want, BUT it is a game on it's own . I have already started development of the "survival" mode.

Controls:
Move around with W,A,S,D
Place blocks with left-click
Remove blocks by holding right-click
Switch position in the hot-bar using the scroll-wheel or the 1-9 number keys.

Change List (v0.5.5):
Began work on "Survival" part.
No more infinite blocks.
You have a 9 block inventory. (Hot-Bar)
Re-added the use of number keys.
You need to "break" blocks now.
Began work on v0.6 which will include an inventory and a crafting system.

Change List (v0.5.0):
Collisions for the NPCs.
Converted the formating to use my lovelyMoon library.
Began Planning on re-doing the Terrain Generation.
Began Planning on a Saving System

Change List (v0.4.0):
Bug Fixes
Re-Did Cloud Texture
Improved Code
Added scrolling as a must (Sorry laptop users)
Finalised and Tweaked Intro
Re-Did Render Code (Increases FPS by 300)

Screenshots:
"Coming soon...."

AoB.love
v0.5.5
AoB.love
v0.5.0
MC2D.love
Date Started: 31/05/2012
Last edited by Davidobot on Fri Aug 02, 2013 7:03 pm, edited 13 times in total.
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

10$man Citizen Posts: 77 Joined: Sun Apr 22, 2012 10:40 pm ### Re: T.A.O.T.R.T.W.G.E. It isn't bad, but there is a few things that could be tweaked up. Movement, your guy should move by a number that the tile size divides by. This way you don't get that weird thing were your guy is stuck a couple pixels from a block but can't go all the way to it. What I mean is, suppose your tilesize is 32. Then your guy should move 4px per frame or 2px per frame. Don't have him move 5 px or 3 px. Also, I can't really tell if your map is randomly generated or not, but randomly generating isn't that hard. Even in 2d, you could use a height map. You could generate just a single line of pixels from a height map and use that. You will get good results, for instance, nice smooth hills, stone is more regular when you get at a certain depth. One more thing, this is just because it could be neat. If you have clouds that are far away (eg, smaller) and move slower then the ones that are closer (bigger) that would probably look pretty neat! Davidobot Party member Posts: 1155 Joined: Sat Mar 31, 2012 5:18 am Location: Game-Dev. Land Contact: ### Re: T.A.O.T.R.T.W.G.E. 10$man wrote:It isn't bad, but there is a few things that could be tweaked up.

Movement, your guy should move by a number that the tile size divides by. This way you don't get that weird thing were your guy is stuck a couple pixels from a block but can't go all the way to it.

What I mean is, suppose your tilesize is 32. Then your guy should move 4px per frame or 2px per frame. Don't have him move 5 px or 3 px.

Also, I can't really tell if your map is randomly generated or not, but randomly generating isn't that hard. Even in 2d, you could use a height map. You could generate just a single line of pixels from a height map and use that. You will get good results, for instance, nice smooth hills, stone is more regular when you get at a certain depth.

One more thing, this is just because it could be neat. If you have clouds that are far away (eg, smaller) and move slower then the ones that are closer (bigger) that would probably look pretty neat!
Added everything except for the height maps, I don't exactly know how to do that.....
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

10$man Citizen Posts: 77 Joined: Sun Apr 22, 2012 10:40 pm ### Re: T.A.O.T.R.T.W.G.E. Davidobot wrote: 10$man wrote:It isn't bad, but there is a few things that could be tweaked up.

Movement, your guy should move by a number that the tile size divides by. This way you don't get that weird thing were your guy is stuck a couple pixels from a block but can't go all the way to it.

What I mean is, suppose your tilesize is 32. Then your guy should move 4px per frame or 2px per frame. Don't have him move 5 px or 3 px.

Also, I can't really tell if your map is randomly generated or not, but randomly generating isn't that hard. Even in 2d, you could use a height map. You could generate just a single line of pixels from a height map and use that. You will get good results, for instance, nice smooth hills, stone is more regular when you get at a certain depth.

One more thing, this is just because it could be neat. If you have clouds that are far away (eg, smaller) and move slower then the ones that are closer (bigger) that would probably look pretty neat!
Added everything except for the height maps, I don't exactly know how to do that.....
Cool!
Well, a height map is something like this:

Normally that would be used for voxel engines (things like Minecraft, Ace of Spades, Eden) but I am pretty sure it would work to just take one row of those pixels and use the "heights" from those.
To calculate a height, you just extract the colors.
Then you look at one value from the colors (red, green and blue should all be the same).
Now depending on how light or dark the color is, generate a different height!

Pretty simple, and you will get nice terrain results.

rokit boy
Party member
Posts: 198
Joined: Wed Jan 18, 2012 7:40 pm

### Re: T.A.O.T.R.T.W.G.E.

10$man wrote: Davidobot wrote: 10$man wrote:It isn't bad, but there is a few things that could be tweaked up.

Movement, your guy should move by a number that the tile size divides by. This way you don't get that weird thing were your guy is stuck a couple pixels from a block but can't go all the way to it.

What I mean is, suppose your tilesize is 32. Then your guy should move 4px per frame or 2px per frame. Don't have him move 5 px or 3 px.

Also, I can't really tell if your map is randomly generated or not, but randomly generating isn't that hard. Even in 2d, you could use a height map. You could generate just a single line of pixels from a height map and use that. You will get good results, for instance, nice smooth hills, stone is more regular when you get at a certain depth.

One more thing, this is just because it could be neat. If you have clouds that are far away (eg, smaller) and move slower then the ones that are closer (bigger) that would probably look pretty neat!
Added everything except for the height maps, I don't exactly know how to do that.....
Cool!
Well, a height map is something like this:

Normally that would be used for voxel engines (things like Minecraft, Ace of Spades, Eden) but I am pretty sure it would work to just take one row of those pixels and use the "heights" from those.
To calculate a height, you just extract the colors.
Then you look at one value from the colors (red, green and blue should all be the same).
Now depending on how light or dark the color is, generate a different height!

Pretty simple, and you will get nice terrain results.
Since it's 2d, it should be 1 pixel high.
u wot m8

Davidobot
Party member
Posts: 1155
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

### Re: T.A.O.T.R.T.W.G.E.

But then it will lose it's random generation part.
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

Banoticus
Citizen
Posts: 60
Joined: Wed Apr 04, 2012 4:01 pm
Location: London

### Re: T.A.O.T.R.T.W.G.E.

I want to add a scrolling system so that when you scroll up or down it changes the block
Any ideas?

stripwax
Prole
Posts: 39
Joined: Sun Jul 31, 2011 1:16 pm

### Re: T.A.O.T.R.T.W.G.E.

Regarding heightmaps: It's really easy to create a randomized height map. One of the standard methods is called a plasma:

Basically (step1) set the four corners of your heightmap to random numbers between min and max (say min=0 and max=255, usually).
Then (step2) split the heightmap into four quadrants (top left, top right, bottom left, bottom right) - each quadrant is a quarter size of the whole heightmap. For each quadrant, you'll have one corner already set from step 1. Set the other three corners to the average of the heightmap values on either side, PLUS a bit of random noise. Then split THIS quadrant into four more going back to step2. Repeat until the quadrant is 2x2 or smaller. Make sure the amount of noise you add on each step gets smaller as the size of the quadrants get smaller.

Actually, the first bit of this wikipedia page is probably better worded than the above.
http://en.wikipedia.org/wiki/Diamond-square_algorithm

Gimme a few mins and I'll knock one up in lua..

EDIT - and if you only need 2 dimensions, then you just create an array of WIDTH x 1, and split linearly into 2 subpieces rather than 4 quadrants.

EDIT - plasma done, and posted in its own thread

Petunien
Party member
Posts: 191
Joined: Fri Feb 03, 2012 8:02 pm
Location: South Tyrol (Italy)

### Re: T.A.O.T.R.T.W.G.E.

Banoticus wrote:I want to add a scrolling system so that when you scroll up or down it changes the block
Any ideas?
Maybe something like this?

Code: Select all

function love.load()

selectedBlock = 1

end

function love.draw()

love.graphics.print(selectedBlock, 10, 10)

end

function love.mousepressed(x, y, button)

if button == "wu" then
if selectedBlock == 9 then
selectedBlock = 1
else
selectedBlock = selectedBlock + 1
end
elseif button == "wd" then
if selectedBlock == 1 then
selectedBlock = 9
else
selectedBlock = selectedBlock - 1
end
end
end
Attachments
scrolling.love
"Docendo discimus" - Lucius Annaeus Seneca

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: T.A.O.T.R.T.W.G.E.

Petunien wrote:
Banoticus wrote:I want to add a scrolling system so that when you scroll up or down it changes the block
Any ideas?
Maybe something like this?

Code: Select all

function love.load()

selectedBlock = 1

end

function love.draw()

love.graphics.print(selectedBlock, 10, 10)

end

function love.mousepressed(x, y, button)

if button == "wu" then
if selectedBlock == 9 then
selectedBlock = 1
else
selectedBlock = selectedBlock + 1
end
elseif button == "wd" then
if selectedBlock == 1 then
selectedBlock = 9
else
selectedBlock = selectedBlock - 1
end
end
end
Maybe it's safer then instead of

Code: Select all

		if selectedBlock == 9 then selectedBlock = 1
do something like

Code: Select all

		if selectedBlock == #blocks then selectedBlock = 1
where is #blocks change for the name of table keeping the blocks of course

### Who is online

Users browsing this forum: No registered users and 11 guests