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: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

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

Post by Davidobot »

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 671 times
AoB.love
v0.5.0
(163.83 KiB) Downloaded 361 times
MC2D.love
Date Started: 31/05/2012
(14.32 KiB) Downloaded 323 times
Last edited by Davidobot on Fri Aug 02, 2013 7:03 pm, edited 13 times in total.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
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 »

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: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

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

Post by Davidobot »

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..... :|
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
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 »

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 »

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: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

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

Post by Davidobot »

But then it will lose it's random generation part.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
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 »

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 »

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 »

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 296 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 »

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: Ahrefs [Bot] and 27 guests