Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bearable single building generation algorithm. #4

Open
Piliponful opened this issue Aug 6, 2017 · 10 comments
Open

Add bearable single building generation algorithm. #4

Piliponful opened this issue Aug 6, 2017 · 10 comments
Assignees
Milestone

Comments

@Piliponful
Copy link
Owner

Because right now, this is the code to make buildings -_-

        for (int x = 0; x < width; x++)
        {
            for (int y = 0; y < height; y++)
            {
                for (int z = 0; z < length; z++)
                {
                    if (Random.value > .5)
                    {
                        this.buildingScheme[x, y, z] = null;
                    }
                    else
                    {
                        Vector3Int position = new Vector3Int(x, y, z).multiply(this.blockSize);
                        if(Random.value > .5)
                        {
                            this.buildingScheme[x, y, z] = new BlockScheme(null, null, position, blockSize);
                        }
                        else
                        {
                            this.buildingScheme[x, y, z] = makeScheme(position);
                        }
                    }
                }
            }
        }
@Piliponful
Copy link
Owner Author

https://vimeo.com/89729897
https://vimeo.com/90137520
That what I was originally inspired by and what I planed to do. And subsequently I have some code already written for it. It's not some mind blowing algorithms, but it's might be ok as a starting point.

@Piliponful
Copy link
Owner Author

Piliponful commented Aug 16, 2017

Also I like those pictures:
image
This because of the attention garbing color.
image
And I like this because as I said before I have script which let's you walk on any of 3 axis. На любой плоскости. So we might make our world to be one big cube with buildings on all of the faces.

@locovna
Copy link
Collaborator

locovna commented Aug 16, 2017

aw, looks wonderful!
screen shot 2017-08-16 at 19 22 34

screen shot 2017-08-16 at 19 22 59 screen shot 2017-08-16 at 19 23 42

Colors of the first pic (blue/white) are great. I thought it would be nice if we provide few types of the arena for players, which could be different in structure and colors, at least. (but this is not for MVP)

Could you please provide your raw algorithm in some way?

@locovna locovna closed this as completed Aug 16, 2017
@locovna locovna reopened this Aug 16, 2017
@locovna
Copy link
Collaborator

locovna commented Aug 16, 2017

cause I'm busy writing neat html

@locovna
Copy link
Collaborator

locovna commented Aug 16, 2017

one big cube with buildings on all of the faces

sounds cool, but I'm not sure, we should try

@Piliponful
Copy link
Owner Author

Piliponful commented Aug 17, 2017

Don't judge please. I took a few pics to show what the building would look like using that algorithm. But spoilers... It's not much better then what we have right now
image
image
image

Not as good as on your screenshots from video. And the code... Oh good. When I looked at thet code I almost cried. Not only because of nostalgy from remembering times when I wrote it, but also from how bad it is. My good. At the time I could barely tell what byte is. All I knew was loops and if statements. So I post it, but you better not even look at it. It should be rewriten!
And as consequence of that I think we should decide on the exact "algorithm" together. I will write down the logic(in pseudocode or close to it) how I initialy see it. And you can comment what you think and any thought on improvement. And if you can overcome you're "sloth" and we meet we could have a great and most notably, fun, discussion.
image
^ you

I plan to quit today or tomorow at the end of the day.

Here's code - https://pastebin.com/7Lyn912a

@Piliponful
Copy link
Owner Author

Piliponful commented Aug 17, 2017

cause I'm busy writing neat html

Oh, I see. You're now html coder? What a great news!
image
You know what's my favorite programming language? HTML!
Just joking, don't take close to heart😊
Is it for your portfolio site or blog you talked about? Will you show it?

@Piliponful
Copy link
Owner Author

Piliponful commented Aug 17, 2017

And thanks for project management! Because I don't know how any of that works-_-!

@Piliponful
Copy link
Owner Author

A few pics with different lighting
image
image
And a vid with wall walking just to show that it works.
https://streamable.com/kiw8a

@locovna
Copy link
Collaborator

locovna commented Aug 18, 2017

a vid with wall walking

can you commit it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants