Help with Bitwise not adding up correctly (solved)

Get help using Construct 2

Post » Sun Oct 18, 2015 5:59 pm

I'm trying to get this Bitwise to add up correctly. The values are not what they should be...what am I doing wrong? For each xy that equals 1(room(0 is no room)).


I using the info found here http://www.saltgames.com/2010/a-bitwise-method-for-applying-tilemaps/



Image
Image
Last edited by SEGamestudio on Mon Oct 19, 2015 7:53 am, edited 1 time in total.
B
44
S
13
G
7
Posts: 32
Reputation: 5,628

Post » Sun Oct 18, 2015 7:26 pm

I never understood that tutorial.
The very bottom of his example for the simplest binary does not add up. At the bottom you see a 1 with 15 over it. Using his description that would make the 1 tile = 15,
Image

yet his image example shows it as tile 1.
Image
Image

I have always just written it off as a Troll post.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sun Oct 18, 2015 8:04 pm

I'm working on a proc gen using pre built rooms. What I have are 3 arrays. Array 01, arraybit, arrayrooms. I use array01 to build rooms using 0s and 1s. Then I use arraybit to give each room a value depending on neighboring rooms. Then I use arrayrooms to place the appropriate layout.

One thing I noticed I did wrong was I was adding bit value to a value that is already 1. I need to add it to a value in bitarray, not array01 like I have it. I will see if this works tonight when I get home.
B
44
S
13
G
7
Posts: 32
Reputation: 5,628

Post » Mon Oct 19, 2015 5:17 am

@SEGamestudio
I can't see your images, so I can't say what the issue is.

Here are some examples of some working implementations if it helps.
viewtopic.php?f=147&t=117217&p=843513&hilit=bitwise#p843513
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Mon Oct 19, 2015 5:39 am

@R0J0hound

Thank you so much! I have wanted to see a working copy of this for a long time now. Now I know it is Real and it does exist :) Going to try reading the tutorial closer, with your great example, so I can see how it is actually doing things.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Mon Oct 19, 2015 7:56 am

My problem is fixed. I was indeed adding to a value that already equalled 1. Thanks everyone.
B
44
S
13
G
7
Posts: 32
Reputation: 5,628

Post » Mon Oct 19, 2015 7:56 am

For future reference, Why can't you see my images? I see them.
B
44
S
13
G
7
Posts: 32
Reputation: 5,628

Post » Mon Oct 19, 2015 8:01 am

@SEGamestudio

# polite, helpful suggestion #

The pencil icon allows you to edit your post, so you don't need to add multiple posts.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Oct 19, 2015 5:54 pm

@SEGamestudio
I'm guessing it's because it's not a public link from your dropbox. If you log out of dropbox, you probably won't see them either. You should be able to "copy public link" for your files.
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Tue Apr 12, 2016 2:42 am

I modified R0J0 example, make it compact & intuitive (and touch friendly) bitwise_mod.capx :idea:
ImageImage
B
102
S
45
G
22
Posts: 772
Reputation: 21,493


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests