Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

AutoTile Reference


mrmiguu
 Share

Recommended Posts

This was coded in the terrible, terrible language of terrible C# (using XNA 4.0). Use it as reference for appropriate RMVX autotiling.

**Directions: Left click to place a tile and right click to delete a tile.**
**Also, load the compiled EXE from the _…\AutoTile\AutoTile\bin\x86\Release\_ folder.**
This code should only be used as reference.

Data: [32x32 tiles generated: 47 total]
**(Updated) Tiles will now attach to the map edges to create a 'seamless' feel.**
[AutoTile.exe (+src)](http://173.55.168.4/AutoTile.zip)
Link to comment
Share on other sites

Yeah, it does. But what I meant was is it the same your VB6 one?
I learned a lot from it but it's not the same as RPG Maker XP/VX.

Sincerely,
Rithy

EDIT: o.o umm something happen. Shouldn't there be like a delete post button or something?
Link to comment
Share on other sites

@Rithy58:

> Yeah, it does. But what I meant was is it the same your VB6 one?

No. This one is a lot more complex in comparison. Also, this one renders during the FixedTime loop (calculating at 60 frames per second). The concept is here. To optimize it, like Robin said, you must pre-render the tiles then literally just draw those to the screen (to avoid active-calculations).

@Rithy58:

> I learned a lot from it but it's not the same as RPG Maker XP/VX.

It wasn't. I picked up that method from some site online. This new autotiler does the job more adequately.

@Rithy58:

> Oh and btw, I think you broke the link.

Fixed.
Link to comment
Share on other sites

@Rithy58:

> I wish you program this in VB6.
> Or atleast in Java.

(C# == Java). If you want to look at the source, you can through Notepad. Just open Xna.cs with Notepad and you can see what I've done. It's not that different from VB6 and it's equally similar to Java-code.
Link to comment
Share on other sites

I knew C# is similar to Java, and I know I can see the code but I can't run it because I'm on a 64-Bit machine. If it was in Java, we wouldn't have this problem ;)

Anyway, I'm gonna download VC# 2010, will that work?
EDIT: Apparently, not. What version of VC# did you use?

Sincerely,
Rithy
Link to comment
Share on other sites

@Rithy58:

> I can't run it because I'm on a 64-Bit machine.

Sure you can. You got an on-board graphics card? If so, just change the setting to **Reach** instead of **HiDef**.

@Rithy58:

> What version of VC# did you use?

Visual Studio C# Express 2010.
Link to comment
Share on other sites

@MrMiguu:

> Sure you can. You got an on-board graphics card? If so, just change the setting to **Reach** instead of **HiDef**.

~~Umm, okay. I'll try. Not sure how but I'll find out. Thanks.~~
EDIT: I got it. Wow! Very nice! This will help me ALOT!

@MrMiguu:

> Sure you can. You got an on-board graphics card? If so, just change the setting to **Reach** instead of **HiDef**.
> Visual Studio C# Express 2010.

~~I thought so. I downloaded the 2008 and it said the project file is made with newer version.
When I open it with 2010, it said it doesn't support .contentproj~~
EDIT: I installed XNA 4.0 and that help.

Sincerely,
Rithy
Link to comment
Share on other sites

@Rithy58:

> Umm, okay. I'll try. Not sure how but I'll find out. Thanks.

Download the latest release of AutoTile. I recently uploaded it with 2 fixes and 1 change:

[FIXES]
- Set the project automatically to **Reach**. Should work for most users now.
- Altered code to allow tiles at the edge of the map/screen to 'attach' (thank Mr. Sean) for a 'seamless' feel.

[MODS]
- Made backbuffer default to **Color.Black**.

@Rithy58:

> I thought so. I downloaded the 2008 and it said the project file is made with newer version.
> When I open it with 2010, it said it doesn't support .contentproj

Why wouldn't I use the latest VS?

EDIT::Lolololololol. Forgot to mention that installing XNA was kind of necessary…
Link to comment
Share on other sites

Downloading the latest version now, even though I got everything working.

This is amazing though. I really really appreciate it. I probably should code it myself so I actually learn but this is way out of my knowledge. The algorithm and everything is not easy to do. Thank you so much.

Sincerely,
Rithy
Link to comment
Share on other sites

@Rithy58:

> this is way out of my knowledge. The algorithm and everything is not easy to do.

It actually is very simple. It becomes tedious once you learn how it works. I literally drew out 47 tile combinations to work with various setups in regards to different layouts within a 1-tile perimeter of the origin. The tile located at the origin adapts based on different combinations of the 8 tiles immediately surrounding it.
Link to comment
Share on other sites

@MrMiguu:

> It actually is very simple. It becomes tedious once you learn how it works. I literally drew out 47 tile combinations to work with various setups in regards to different layouts within a 1-tile perimeter of the origin. The tile located at the origin adapts based on different combinations of the 8 tiles immediately surrounding it.

I know what you mean. This is how I want to do it.

Sincerely,
Rithy
Link to comment
Share on other sites

@MrMiguu:

> My constant selection rectangles are not quite accurate. I don't know what Enterbrain did but they got it just right to work with larger objects within the tiles such as mountains for dynamic placement.

Well, for the XP version, I edited your rectangle constants to match the correct tiles and it work perfectly(I think it work perfectly.

Can I post it up so other can see it? All credits will go to you.

Sincerely,
Rithy
Link to comment
Share on other sites

  • 1 month later...
Hey amazing implementation you did there Mr.Miguu!
I was in the middle of the programming of an as3 tile engine when i suddently found it.
I already ported it to as3 and it works like charm.

So how about the wall tiles? I can see in VX walls also have some autotile algorithm, but it differs from the terrain tiles for the 'wall' part of the wall.

I mean, the walls tilesets (A3, A4) are 2 cells larger
Terrain:
xo
**
**
Wall:
xo
**
**
++

I can see both parts (* and +) are autotiled, but i cant manage to find the correct algorithm for the ++ tiles…

Any ideas?
Link to comment
Share on other sites

@Snaptothegrid:

> Hey amazing implementation you did there Mr.Miguu!
> I was in the middle of the programming of an as3 tile engine when i suddently found it.
> I already ported it to as3 and it works like charm.
>
> So how about the wall tiles? I can see in VX walls also have some autotile algorithm, but it differs from the terrain tiles for the 'wall' part of the wall.
>
> I mean, the walls tilesets (A3, A4) are 2 cells larger
> Terrain:
> xo
> **
> **
> Wall:
> xo
> **
> **
> ++
>
> I can see both parts (* and +) are autotiled, but i cant manage to find the correct algorithm for the ++ tiles…
>
> Any ideas?

I would have to sit on it and think it over. I'll get back to you.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...