Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Aperiodic Tile-based Platform Game

Name: Anonymous 2010-01-23 6:21

Has it ever been written, a platform game that uses an aperiodic tileset?

Name: Anonymous 2010-01-23 6:24

Yes; see the works of Mat Dickie

Name: Anonymous 2010-01-23 9:49

I believe I would be able to be of more help if you explained what you meant by "aperiodic tile-based".

Name: Anonymous 2010-01-23 10:14

>>3
It's a set of tiles that fit together in a non-periodic way.

Name: Anonymous 2010-01-23 11:25

>>1-4
Oh! I knew what aperiodic tileset meant, but since you were talking in the context of a game, I didn't even think of that.

No, I don't think so, as rectangular tiles (or tiles that tile in a similar way) are the most convenient to use, because they can be easily represented in memory.

Name: >>5 2010-01-23 11:28

I mean that by tileset I thought of a "tileset" as in a set of graphics that can be assigned to rectangular tiles on a map.

Name: Anonymous 2010-01-23 12:51

I used to play one in an aperiodic era.

Name: Anonymous 2010-01-23 19:02

>>1
I'm sure there has been. I don't know if Duke Nukem Manhattan Project counts, since it uses 3d graphics instead of 2d (although it features 2d gameplay), but the idea seems fairly obvious. I've often thought it would be a good idea to construct a platform engine with levels consisting of arbitrarily shaped and positioned graphics and arbitrary collision geometry, not bound together.

Name: Anonymous 2010-01-23 19:23

>>8
arbitrary shapes ≠ aperiodic tiles

Name: op 2010-01-23 22:03

>>3
I meant something like a penrose tiling pattern for the background.

Name: Anonymous 2010-01-23 22:38

>>9
Well that's just retarded.

Name: Anonymous 2010-01-23 22:39

>>7
*upvotes*

Name: Anonymous 2010-01-25 20:54

>>5
There are aperiodic square tiles, i.e. Wang tiles. The Wikipedia article on them has references on their use in texture generation:

http://en.wikipedia.org/wiki/Wang_tile

The reason they aren't useful is because it takes a lot of processing power to compute the tiling. If I tell you, get me the tile at (25,35). What is it? You've either got to do a whole lot of work to calculate it, or you have to store the whole grid on disk and load it into memory. If your grid is small of course the overhead is negligible, but then what was the point of using aperiodic tiles?

Name: Anonymous 2010-01-26 1:29

>>13
Huh huh.
You said ‘Wang’.

Name: Anonymous 2010-01-26 3:04

>>13
I thought >>1-chan meant more like Penrose tiles.

Name: Anonymous 2010-01-26 3:31

>>13
There are better aperiodic square tiles, for instance ballsac tiles.
http://en.wikipedia.org/wiki/Ballsac_tile

Name: Anonymous 2010-01-26 23:05

>>15
I didn't get that impression at all. He just said aperiodic (twice). It seems much more logical to use square tiles for a video game, hence Wang tiles.

Name: Anonymous 2010-01-27 3:58

>>17
THAT'S THE PARADOX!!

Name: Anonymous 2010-01-27 4:28

>>13
If I tell you, get me the tile at (25,35). What is it? You've either got to do a whole lot of work to calculate it, or you have to store the whole grid on disk and load it into memory.

I believe many tilemaps are stored on the disk, and I have seen a few platformers in my day, believe me!

Name: Anonymous 2010-01-27 9:21

>>19
This is exactly the kind of lazy and indulgent attitude that causes the excessive and unacceptable bloat we see in today's software systems.

Name: Anonymous 2010-01-27 13:57

Is started programming it.
I have a 2d array that resembles the plane,
The tiles will be arranged there.
I am using the robinson tileset.

http://www.uwgb.edu/dutchs/symmetry/aperiod.htm

After 10 hours I have made this much progress:
http://pastebin.org/83294

So the skeleton is complete, and I am currently tracking down bugs.

What do you guys think of it?

I'll continue someday later.. Maybe weekend or so..

Name: Anonymous 2010-01-27 14:23

>>21
goto statements
( ´_ゝ`)

Name: Anonymous 2010-01-27 14:26

>>22
Hello E.W.Dickstrap

Name: Anonymous 2010-01-27 14:43

>>23
oh, hello >>3-san

( ´`_ゝ´`)

Name: Anonymous 2010-01-27 14:45

>>24
Oh no! I meant >>23-san! How do I delete that?

( ˚_ゝ˚)

Name: Anonymous 2010-01-27 15:14

>>22
Yeah I need them to break out of nested for statements

Name: Anonymous 2010-01-28 2:55

>>21
That's pretty cool. It seems a fairly efficient tiling to calculate, but very low quality. There is a lot of high-level repetition in it even if the tiling itself is aperiodic. For example every other tile in every other row is blue. Every fourth tile in every fourth row is purple. You will see these artifacts in the final product.

Check out what this guy has done:

http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/R046.pdf

This tiling is aperiodic and exhibits very little visible high-level structure. I would guess that it's because the tiling there is based on a substitution system rather than being constructive like yours, but I have nothing to substantiate that claim. Nevertheless the screenshots look good.

Have you written a renderer yet? Ideally you'd write a tile-based renderer that takes an arbitrary tiling and lets you pan/scroll with mouse+wheel. You should be able to write this with SDL/GLFW in a couple hundred lines of C. Then test out the different algorithms.

Name: Anonymous 2010-01-28 5:05

>>27
I was ging to finsh it and look for repetitions later, :)
The blue tiles being sorted as they are is intentional because of the corners they can only be sorted like this.

The main problem I had was with turning the tiles. And this is my first time writing a program that uses something that is supposed to be graphical.

Thank you so much for the link, and the rendering tip I will certainly look into that :)

Name: Anonymous 2010-01-28 11:10

Name: Anonymous 2010-01-29 2:00

>>28
I was ging to finsh it and look for repetitions later, :)
...but you can see the repetition in the link you posted. Just look at the colors. They are very repetitive, and you can see that the repeating tiles (blue and purple) are not rotated at all in the repeating pattern. It sortof defeats the purpose of an aperiodic tiling.

Anyway I'm very interested in this as well. If you haven't written a renderer yet by this weekend I'll write one and pastebin it here.

Name: Anonymous 2010-01-29 5:16

>>30
If you would have read the text beside the image then they would state that they tried to make a pattern but failed in the end (lower left corner).
But the purple and blue tiles are being rotated as much as the other ones.
The one thing I haven't implemented yet would be that the green and aqua tiles should be flipped horizontally sometimes.

I don't think this is a good algorithm for tiling textures in a game, because as >>27 mentioned there is a lot of high level repetition.
The main difference is that in games they do not care whether the tiles could be tiled periodically they just don't want to.
Whereas the mathematical approach here is that there should be no way to tile these ones in a periodical manner.
This is why I don't try to randomize this. They should break down their periodicity anyway.(Assumed they are designed properly).

The blue tiling will be repetitive but this repetition is because of the corners. Repetitions other than that should break down quickly.

I don't think I will be able to write a renderer because I don't now ANYTHING about graphical stuff(A bit winAPI but thats it).

Name: Anonymous 2010-01-29 19:44

>>31
I did actually; I looked elsewhere to see the real tiling, and it exhibits the repetition I mentioned. It might not look as bad due to the rotation though. Just to clarify, I'm also >>13,17,27,30. I'm pretty sure it's just you, me, and a troll.

I thought about writing a renderer but I figured it's pointless without the tiles. A set of robinson tiles that can link together appropriately is not easy to make. If you can get the tiles, I'll make a renderer for it with GLFW.

Name: Anonymous 2010-01-30 1:42

>>31
An easy way to render something like this would be to create a C++ class that holds 4 vertex and a texture for each tile.  Probably the most basic thing you'd learn to do in Direct3D (or OpenGL).

I thought this was a pretty frivolous idea at first, but after seeing the water texturing, could have some really nice uses in making a pattern less noticeable.

Name: Anonymous 2010-01-30 14:41

So is anyone working on that graphical renderer?

Name: Anonymous 2010-01-30 14:52

>>34
Silly boy, we do not program here.

: (

Name: Anonymous 2010-01-30 15:01

>>34
Nope. Needs tiles.

Name: Anonymous 2010-01-30 17:30

Name: Anonymous 2010-01-30 19:40

write a script for evaldraw instead

save time

http://advsys.net/ken/download.htm

Name: Anonymous 2010-01-30 22:07

>>38
;__;
I think that this guy has done more that I ever did.

Name: Anonymous 2010-01-30 22:17

>>37
I meant a tiling that can actually represent a real-world surface - grass, water, etc.

Name: Anonymous 2010-01-30 23:04

>>40
Why?  That seems like it would be harder to debug.

Name: Anonymous 2010-01-31 1:46

what's so difficult about a periodic tile based game? Just make it like mario except when you go to the end it takes you back to the start.. pretty easy eh

Name: Anonymous 2010-01-31 2:45

>>39
Just study CS related maths and you too can write systems as awesome as his.

Name: Anonymous 2010-01-31 7:15

>>42
aperiodic tiling is different from a periodic tiling.
The former is harder, the latter easier ;)

Name: Anonymous 2010-01-31 14:29

>>41
Well of course it would, you would use the color-coded tiling to test it of course. My point is that without the real tileset you intend to use, then after you've tested and debugged it, you've got a useless algorithm and renderer.

>>44
don't feed the troll

Name: Anonymous 2010-01-31 14:47

>>45
holy fuck go back to IRC "Don't feed teh trol!!!"

Name: Anonymous 2010-01-31 17:22

http://en.wikipedia.org/texture_synthesis

kind of related to other generative art forms like granular synthesis.

Name: Anonymous 2010-01-31 18:21

(1) stick your  generative art forms  back up your ass
(2) learn to sage

Name: Anonymous 2010-01-31 18:23

>>45
I know that the algorithm eventually will be useless.

My main problem in programming is that my only mentor in computer related stuff was myself and google.
I believe I can say that I have mastered the main points in C programming, so now I am looking for practice.
I programmed a script in C that can name numbers with upto 6000 digits to practice pointers, array and string handling in C.
Right now I'm trying to practice how to write and optimize programs that are more complex than that what I am used to.

I think it should not be a big trouble for someone who already is used to program SDL stuff, though if I am mistaken than please state so. Learning Direct3D or OpenGL will be the next challenge I will take regarding programming. As soon as I find a good tutorial for one of them I will be learning that framework.

I will finish this project regardless whether some kind anon will program a renderer for it or not. As of now I use the numbers on the console screen and arrange the tiles that I have printed out, on my desk.

But I think it shouldn't be too hard to design tiles for a game that can use the algorithm, though I still believe that this algorithm will be too time-consuming to be used in a real game.
The approach >>27 mentioned should take less time to calculate than my approach. I posted the reason why I will continue with my approach here: >>31 .

If however you want to design tiles that create a nice picture using this program think of the colours as the identification scheme or "naming" of tiles. The actual colours don't matter I use them only to identify tiles. With tweaking the code a bit I think it should be easy to write tiles with different edges like one with 2 GREATERTHANF and 2 GREATERTHANM .
So one should be able to design tiles with edges that remain the same mirrored and some that change and still be able to use the algorithm although than the whole crap going on with the BLUETILE will be pointless and can be cut out of the program.

>>47
Thank you very much for the link, because I don't know the terminology for this stuff I have problems trying to find information about it.

In one week my semester will be over so I hope to finish this project in a matter of two weeks.

P.S. I just reread the entire thread and I think it might be important to state that I am not the OP. I just do this for the heck of it whereas I think the OP is looking for an algorithm to use in his game.

Name: Anonymous 2010-02-08 18:35

Dunno if anyone cares and the update is not that important so I sage'd it

rewrote entire code how stupid was/am I?
cleaner and easier to understand know.
I am afraid the only way to understand how I check whether the tile fits or not is to program it yourself.

Alos check this out:
http://www.math.northwestern.edu/~wphooper/visual/robinson/

Name: Anonymous 2010-02-11 17:09

I dunno if anyone still cares or not but I promised to finish this project and I ALWAYS deliver:

This is the main algorithm, it prints out the results to the console.
http://pastebin.org/90319

Here is the not so tidy graphical renderer with the algorithm implemented, and displayed graphically.

http://rapidshare.com/files/349340852/aperiodic_tiling_with_render.rar

AS I said before I dunno jack shit about graphical stuff I just downloaded the SDL package for Dev-C++ toyed around with a few functions I found via Google.
I tried to make it in a way that it would display it immediately if a tile is being deleted or placed, but it kept crashing if I didn't run it in Debug mode so i took it out. I didn't want to investigate it further.

Everything you'd need to run it, compile it (except for the libraries) is in the package.
Enjoy.

Name: Anonymous 2010-02-11 17:35

Being a good programmer != knowing one language really well.

Being a good programmer == knowing the concepts that allow you to be a more efficient programmer in any langauge (functional languages, imperative languages, and when to use either paradigm in any language that isn't purely one or the other)

Name: Anonymous 2010-02-11 17:50

Sry I forogt to include the SDL.dll reup here:
http://rapidshare.com/files/349356215/aperiodic_tiling_with_render.rar

Name: Anonymous 2010-02-11 17:52

>>52
I never said I was.
I've just started with learning how to program.
It was a hobby during my teenage years but I didn't train it as much. Now that I am out of school and will go to Uni and stuff where I will be taught these things I hope I will become a good programmer :)

Name: Anonymous 2010-02-11 18:05

Name: Anonymous 2010-02-11 18:09

>>55
thank you SICP was on my longer TO-LEARN list

Name: !iN.MY.aRMs 2010-02-11 18:46

>>52
but SICP concepts is gomsexsual
and completly unuseble

Don't change these.
Name: Email:
Entire Thread Thread List