Would this algorithm/pseudo code for finding the edge points of a circle on a grid work?
[code]for (a = 0, a < pi * 2, a += 1 / radius)
y = sin(a) * radius
x = cos(a) * raduis
[/code]
All I get are these points when radius is 2:
[code]2 0
2 1
2 2
1 2
0 2
-1 2
-1 1
-1 0
-1 -1
0 -1
1 -1
2 -1
2 0
[/code]
[editline]24th February 2011[/editline]
Could someone suggest a FOV algorithm? I suck at this :saddowns:
more work on the level editor. There's a single "PIT" enumeration value, but it'll automatically detect when it's near a floor or wall (wall art not included in current tileset) and slap the correct bordering on it. The waviness of the wires is a bit too much, I'll probably end up changing the floor tiles a lot (considering making them straight lines all the way through)
[img]http://i.imgur.com/0MLsV.png[/img]
and I know there's an issue with inside edges of pits, I'm going to take the 3 pixel inset out of the borders tomorrow.
Oh yeah, and I finally finished that XSD... 235 lines, and it validates XML for both the C# level editor parser (the auto-generated one by xsd.exe) and our game's parser (Java / pull parser) There's still a lot to do, and with my ski week break coming to an end, and knowing I have a 3 projects to do within the 2 weeks I get back on top of regular homework, I'm starting to feel a lot of stress and a lot of "oh fuck we're gonna have to leave a lot of the game unfinished on release"
[editline]25th February 2011[/editline]
oh yeah and it's 1:30AM... again
[QUOTE=KillerJaguar;28269431]How did you do this? I've been pulling my hairs out trying to figure out how to generate something legible.[/QUOTE]
I've already explained most of the process on a previous page, and there's a video of the map being generated on the page before this, I think. If those don't help, let me know.
[QUOTE=ZenX2;28273261]Would this algorithm/pseudo code for finding the edge points of a circle on a grid work?
[code]for (a = 0, a < pi * 2, a += 1 / radius)
y = sin(a) * radius
x = cos(a) * raduis
[/code]
All I get are these points when radius is 2:
[code]2 0
2 1
2 2
1 2
0 2
-1 2
-1 1
-1 0
-1 -1
0 -1
1 -1
2 -1
2 0
[/code]
[editline]24th February 2011[/editline]
Could someone suggest a FOV algorithm? I suck at this :saddowns:[/QUOTE]
You're on the right track. This is what I use: [url]http://roguebasin.roguelikedevelopment.org/index.php?title=Eligloscode[/url].
Oh god, line drawing and polygon drawing is reaaally easy actually :doh:. And farseer makes it easy to draw!
[img]http://puu.sh/13eH[/img] Anyone got an Idea for a game? I have none... so yeah.
The whole XNA line drawing thing is a myth really.
XNA is awesome for getting shit done in DirectX fast.
I'm not using a 1x1 Texture for linedrawing, I used it once, but it looks like shit and I feel it doesn't fit into my code. I prefer it this way with a LineList. I found no tutorial about it that covered only that. I might do that at some point.
[editline]25th February 2011[/editline]
I was wondering how about a website where people from here could easily submit Tutorials? I mean there are already a lot out there but not all of them are specific. Do you think that is a good Idea?
Here's a riddle:
Say you wanna draw a map with only "wall" or "space" (See black and white picture) with sprites in a good looking way using only same sized tiles. How many unique tiles will you need?
[img]http://filesmelt.com/dl/map111.png[/img]
(Kinda like this:)
[img_thumb]http://filesmelt.com/dl/spritemap.png[/img_thumb]
(Notice how you also need "inner edges")
The answer is [I]way too many.[/I] ([sp]48[/sp])
[url]http://filesmelt.com/dl/sprites12.png[/url]
[editline].[/editline]
The reason that I want fullsized tiles and no overlays is because games like Metroid have high detail in each tile which wouldn't work with doing things in another way. The current spriteset is just a placeholder.
See [url=http://bulk.destructoid.com/ul/138345-the-best-and-worst-4th-videogames-ever-/4th%20-%20Metroid%20Fusion-620x.jpg]this screenshot[/url] for example.
I think you can reduce that if you use the black border as an overlay it should cut it to half.(Theoratically.)
Yeah but it's more like a placeholder really. Imagine that with metroid fusion tiles or something.
[QUOTE=Maurice;28276928]Here's a riddle:
Say you wanna draw a map with only "wall" or "space" (See black and white picture) with sprites in a good looking way using only same sized tiles. How many unique tiles will you need?
[img_thumb]http://filesmelt.com/dl/map111.png[/img_thumb]
(Kinda like this:)
[img_thumb]http://filesmelt.com/dl/spritemap.png[/img_thumb]
(Notice how you also need "inner edges")
The answer is [I]way too many.[/I] ([sp]48[/sp])
[url]http://filesmelt.com/dl/sprites12.png[/url][/QUOTE]
With Die To Win I split each tile into 4 and only needed like 9 unique tiles. I'll show you what I mean when I get on my PC.
[QUOTE=Maurice;28276928]Here's a riddle:
Say you wanna draw a map with only "wall" or "space" (See black and white picture) with sprites in a good looking way using only same sized tiles. How many unique tiles will you need?
[img_thumb]http://filesmelt.com/dl/map111.png[/img_thumb]
(Kinda like this:)
[img_thumb]http://filesmelt.com/dl/spritemap.png[/img_thumb]
(Notice how you also need "inner edges")
The answer is [I]way too many.[/I] ([sp]48[/sp])
[url]http://filesmelt.com/dl/sprites12.png[/url]
[editline].[/editline]
The reason that I want fullsized tiles and no overlays is because games like Metroid have high detail in each tile which wouldn't work with doing things in another way. The current spriteset is just a placeholder.
See [url=http://bulk.destructoid.com/ul/138345-the-best-and-worst-4th-videogames-ever-/4th%20-%20Metroid%20Fusion-620x.jpg]this screenshot[/url] for example.[/QUOTE]
That game is incredibly awesome. I beat it again recently. :buddy:
/offtopic.
Edit: Also, Overv is a green member, now?
Congrats on Mod, Overv
[QUOTE=CarlBooth;28280314]Congrats on Mod, Overv[/QUOTE]
Holy shit, yes!
[QUOTE=CarlBooth;28280314]Congrats on Mod, Overv[/QUOTE]
Your avatar makes it so much better.
Anyway, I don't have much more content to show, unless you want to see a console that says "Event BlockDig Handled, Event BlockBreak Handled". I want to write a map generator now. I have a question. Is there something in java that would allow me to get a height given an x and y coordinate that is sort of random? Like, not totaly random, because that wouldn't look like anything unless I got really lucky, I mean something more like this
[img]http://www.adkland.com/Adirondacks-8AcreTopo7BevWeb.jpg[/img]
Beside all the random shit drawn on it, I am looking for some sort of heightmap generator that resembled a random topographical map. I looked at perlin noise, but i was consused as fuck, and there don't seem to be any tutorials on it, and the guy's website dosen't help much...
[QUOTE=bobthe2lol;28282177]I looked at perlin noise, but i was consused as fuck, and there don't seem to be any tutorials on it, and the guy's website dosen't help much...[/QUOTE]
I used this: [url]http://www.hyppostudios.be/perlin.php[/url]
Wasn't too difficult to follow.
[QUOTE=BlkDucky;28282214]I used this: [url]http://www.hyppostudios.be/perlin.php[/url]
Wasn't too difficult to follow.[/QUOTE]
Wait, is that java? Not a problem if it's not, but it looks really close, but has some differences.
[QUOTE=bobthe2lol;28282453]Wait, is that java? Not a problem if it's not, but it looks really close, but has some differences.[/QUOTE]
C++ but you can apply it to any language.
On an unrelated note:
Caves
[media]http://gyazo.com/995b46dbb846b6e5512477a21cab1990.png[/media]
Which lead to caverns
[media]http://gyazo.com/bd0dcb82329b03fb488d9575ac802c85.png[/media]
Where you can now pick up items
[media]http://gyazo.com/333ad9f7709116c8e5462ac4809ad708.png[/media]
Also I think I have the jelly split rate set too high. :rolleyes:
[media]http://gyazo.com/9b5134dd978fa925811824a538d8e7cb.png[/media]
[QUOTE=Maurice;28276928]Here's a riddle:
Say you wanna draw a map with only "wall" or "space" (See black and white picture) with sprites in a good looking way using only same sized tiles. How many unique tiles will you need?
[img_thumb]http://filesmelt.com/dl/map111.png[/img_thumb]
(Kinda like this:)
[img_thumb]http://filesmelt.com/dl/spritemap.png[/img_thumb]
(Notice how you also need "inner edges")
The answer is [I]way too many.[/I] ([sp]48[/sp])
[url]http://filesmelt.com/dl/sprites12.png[/url]
[editline].[/editline]
The reason that I want fullsized tiles and no overlays is because games like Metroid have high detail in each tile which wouldn't work with doing things in another way. The current spriteset is just a placeholder.
See [url=http://bulk.destructoid.com/ul/138345-the-best-and-worst-4th-videogames-ever-/4th%20-%20Metroid%20Fusion-620x.jpg]this screenshot[/url] for example.[/QUOTE]
I think that the number of tiles wouldn't matter if you were doing something by hand, like I would assume Metroid was. (You never know.)
I've played through that game so many times. I love jumping down and getting killed in that part. It never gets old.
Hm, I wonder if its possible to load a .net dll with mono on linux from a native program.
[quote=http://www.mono-project.com/Mono:Runtime]The Mono runtime can be used as a stand-alone process, or it can be embedded into applications
Embedding the Mono runtime allows applications to be extended in C# while reusing all of the existing C and C++ code. For more details, see the Embedding Mono page and the Scripting With Mono page.[/quote]
[QUOTE=BlkDucky;28282504]C++ but you can apply it to any language.
On an unrelated note:
Caves
[media]http://gyazo.com/995b46dbb846b6e5512477a21cab1990.png[/media]
Which lead to caverns
[media]http://gyazo.com/bd0dcb82329b03fb488d9575ac802c85.png[/media]
Where you can now pick up items
[media]http://gyazo.com/333ad9f7709116c8e5462ac4809ad708.png[/media]
Also I think I have the jelly split rate set too high. :rolleyes:
[media]http://gyazo.com/9b5134dd978fa925811824a538d8e7cb.png[/media][/QUOTE]
That looks really fun to play. Keep up the good work! :D
[QUOTE=ZenX2;28282533]I think that the number of tiles wouldn't matter if you were doing something by hand, like I would assume Metroid was. (You never know.)
I've played through that game so many times. I love jumping down and getting killed in that part. It never gets old.[/QUOTE]
I am obviously going for not-by-hand.
[QUOTE=BlkDucky;28282504]C++ but you can apply it to any language.
On an unrelated note:
Caves
[media]http://gyazo.com/995b46dbb846b6e5512477a21cab1990.png[/media]
Which lead to caverns
[media]http://gyazo.com/bd0dcb82329b03fb488d9575ac802c85.png[/media]
Where you can now pick up items
[media]http://gyazo.com/333ad9f7709116c8e5462ac4809ad708.png[/media]
Also I think I have the jelly split rate set too high. :rolleyes:
[media]http://gyazo.com/9b5134dd978fa925811824a538d8e7cb.png[/media][/QUOTE]
I miss Lewt now :(
Edit:
Just realized that sounded wrong.
I think it's awesome. It reminds me of Lewt.
[QUOTE=bobthe2lol;28283316]Yay! Perlin noise kinda works! Haha! [img_thumb]http://dl.dropbox.com/u/5270951/Pics/Screenshot.png[/img_thumb][/QUOTE]
That's... Scary. Are you sure you've implemented it correctly? :v:
That aside, have you considered other noise algorithms for height generation?
[QUOTE=xAustechx;28282981]That looks really fun to play. Keep up the good work! :D[/QUOTE]
Thanks. :D
[QUOTE=Darwin226;28283093]I miss Lewt now :(
Edit:
Just realized that sounded wrong.
I think it's awesome. It reminds me of Lewt.[/QUOTE]
Haha. It's okay. I miss Lewt too. Guess it just kinda died. Shame, it looked really, really promising.
[QUOTE=esalaka;28283502]That's... Scary. Are you sure you've implemented it correctly? :v:
That aside, have you considered other noise algorithms for height generation?[/QUOTE]
Such as? Perlin noise is the only noise algorithm I've heard of, because apperantly WAYWOers love it.
[QUOTE=BlkDucky;28283530]Thanks. :D
Haha. It's okay. I miss Lewt too. Guess it just kinda died. Shame, it looked really, really promising.[/QUOTE]
He kept running into scripting issues, or art issues IIRC.
But you don't seem to be having any of that as a problem! :buddy:
[QUOTE=bobthe2lol;28283581]Such as? Perlin noise is the only noise algorithm I've heard of, because apperantly WAYWOers love it.[/QUOTE]
From Wikipedia:
[quote]
Value noise
Gradient noise
Simplex noise
Wavelet noise
Worley noise
[/quote]
Fixed borders by removing a 3px thick slab of solid color by each border. I still need to clean up some of the edges where the ends get really tall, but it looks a lot better now. And I re-did the floor tiles and added another 12 tiles, so that now there are 16 randomly generated tiles. Right after this I'm going to make some walls and modify the pit edge code to work with walls as well.
[img]http://i.imgur.com/yWmOw.png[/img]
Sorry, you need to Log In to post a reply to this thread.