Adventures of Barnabus! [T.A.O.T.R.T.W.G.E.]

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

Adventures of Barnabus! [T.A.O.T.R.T.W.G.E.]

Post by Davidobot » Tue Jun 26, 2012 12:28 pm

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 :megagrin:.
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)
Added ores. (No use yet!)
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.
Added Menu.
Added Intro.
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
Added Water
Added Sand
Added NCPs (Warrior, Trader, Wizard)
Added NCP AI (Kind-of)
Re-Did Cloud Texture
Improved Code
Added scrolling as a must (Sorry laptop users)
Finished Main-Main Menu
Finalised and Tweaked Intro
Re-Did Render Code (Increases FPS by 300)

Screenshots:
"Coming soon...."

Remember to post your comments, queries, bugs and suggestion here.
AoB.love
v0.5.5
(198.65 KiB) Downloaded 459 times
AoB.love
v0.5.0
(163.83 KiB) Downloaded 172 times
MC2D.love
Date Started: 31/05/2012
(14.32 KiB) Downloaded 145 times
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.

Post by 10$man » Wed Jun 27, 2012 3:26 pm

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!

User avatar
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.

Post by Davidobot » Thu Jun 28, 2012 5:27 am

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.

Post by 10$man » Fri Jun 29, 2012 1:09 pm

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:
Image
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.

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

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

Post by rokit boy » Fri Jun 29, 2012 5:41 pm

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:
Image
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

User avatar
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.

Post by Davidobot » Mon Jul 02, 2012 1:35 am

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!

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

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

Post by Banoticus » Sat Jul 07, 2012 9:41 am

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.

Post by stripwax » Tue Jul 10, 2012 10:48 am

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

User avatar
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.

Post by Petunien » Wed Jul 11, 2012 3:36 pm

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
(325 Bytes) Downloaded 129 times
"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.

Post by coffee » Wed Jul 11, 2012 3:42 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests