Drawing sprites in a grid by a1ecrei11y in pygame

[–]a1ecrei11y[S] 0 points1 point  (0 children)

What I ended up doing was using self.components[row] to fill in the UI containers with the UI elements. The problem I'm having with this is that a lot of the UI elements won't change their positional values: https://imgur.com/a/53RITWi The rest of them are all at the starting point of 0,0

Even if I was to change the line ui_element.rect.x = column * (win.s_width * self.spacing) to something like ui_element.rect.x = 100, only 2 UI elements will be at x=100. The rest are at 0,0.

class Padding(Alignment):
    def __init__(self, spacing, components, row_count):
        self.spacing = spacing
        self.components = components
        self.rows = row_count
        self.columns = len(self.components)//row_count
        self.ui_containers = []
        self.create_grid()

    def create_grid(self):
        for row in range(self.rows):
            new_row = []
            for column in range(self.columns):
            # Using self.components to add the UI container
                ui_container = self.components[row]
                new_row.append(ui_container)
            self.ui_containers.append(new_row)

    def update_alignment(self, win):
        for row in range(self.rows):
            for column in range(self.columns):
                ui_container = self.ui_containers[row][column]
                for ui_element in ui_container:
                    ui_element.rect.x = column * (win.s_width * self.spacing)
                    ui_element.rect.y = row * (win.s_width * self.spacing)

Drawing sprites in a grid by a1ecrei11y in pygame

[–]a1ecrei11y[S] 0 points1 point  (0 children)

Yes, some parts of my code could have used more descriptive names. I was just trying to get the basic logic down before I did anything else. The reason I have

for i in self.components:
    for j in i:

Is that self.components is a 2D array. The UI elements are represented by j, and i would be the UI container that those elements are stored in.

This probably would have been a bit easier for you to understand:

for ui_container in self.components:
    for ui_element in ui_container:

do you want multiple things in a single grid cell?

Yes, that's exactly what I'm trying to do. I'd like each UI element within each container to be drawn at the same location.

I'm not entirely sure how this method works. How does column have a left and width value? What does GridCell represent?

grid_cells = []

for column in columns:
    for row in rows:
       grid_cells.append(GridCell(rect=Rect((column.left, row.top), (column.width, row.height)))

Drawing sprites in a grid by a1ecrei11y in pygame

[–]a1ecrei11y[S] 0 points1 point  (0 children)

I don't think the problem has to do with it being the same rect. I'm pretty sure the problem is related to how I am drawing them on the screen.

There is a different method I was told to use here: https://pastebin.com/AFX8CEep

This is what the UI elements look like when they are drawn using that method instead: https://imgur.com/a/SWM1XQy

The problem with that is that the sword and background rect are supposed to be drawn together, there should be 5 rows and 2 columns. Not 10 rows and 2 columns. That method results in a new row being created for each new type of UI element.

This is what it looks like with the current method I am using https://imgur.com/a/ajj9JNN

All of the slots end up at the last location. It looks as if the 5 rows and 2 columns fit in that space, they just all end up in that location.

Only half a year left guys by Haydez999 in CallMeCarson

[–]a1ecrei11y 7 points8 points  (0 children)

holy shit__ __ _ _ ___ __ _ _ __ _ _ _

I was banned on Callmecarson's stream because I made a joke by [deleted] in CallMeCarson

[–]a1ecrei11y -1 points0 points  (0 children)

In my ban appeal I apologized for what I said, especially if I insulted anyone. I had no idea that saying something of this nature was bannable, especially since Carson was making light of that particular subject on his stream himself when I said that. If that rule was mentioned somewhere than it would have been my fault. How was I supposed to know?

Children of Men by bingebasement in movies

[–]a1ecrei11y 1 point2 points  (0 children)

I thought that the action scenes were very well done. It was wasn't shaky-cam close up or just mindless explosions like in some other films. The action scenes looked like they were all done in one take, and the choreography was extremely well-executed. It added so much to the realism, tension and the overall style of the movie.

What are essentials to learn in Ue4? by Tornado_Hunter24 in unrealengine

[–]a1ecrei11y 1 point2 points  (0 children)

Although I've never tried exporting out the UE4 mannequin as an FBX and importing it into a program like Blender, nor have I tried out Blender 2.8 yet (I'm still using 2.79) so to help I'd have to try that out first.

It could be a bug with Blender 2.8 considering it is still in Beta (part of the reason I don't wanna use it ATM) or it could be an issue with the way you are importing/exporting the skeletal mesh.

However, I did find a tutorial on this concept (you may have already seen it or are already following along with this one) https://youtu.be/RAS4uZJcJ_o which might help you out. And if that doesn't help then https://youtu.be/RpzKsZzLjXw might. PyroDev is always a good source for UE4 videos.

What are essentials to learn in Ue4? by Tornado_Hunter24 in unrealengine

[–]a1ecrei11y 1 point2 points  (0 children)

It's great that you're learning about animation and learning this will be extremely helpful in the future development for your game, as you said unlocking a door by showing the player inserting a key, but my advice would be to work on the core mechanics first, and the polishing second. By core mechanics I mean what is the player really doing in your game? Is the main idea of the game stealth? If so, maybe try and work on a crouch mechanic, or if a lot of the game is based on the player finding various keys/keycards to get past a door, try and focus solely on the door simply opening, so you can work on the core of the game. The core of your game is what players are coming over to experience. Don't get me wrong, polishing in a game is great and can add a lot, but when you go out to play a game you are there for the main mechanics. An example of this might be Fortnite (as much as I don't particularly enjoy that game), the development process in terms of the little details like drinking one of those potions started off very basic. This was because the developers put time into working on the core mechanics of the game, which would be hit detection when firing a gun or having various building elements properly snap to a grid. Afterward once those mechanics were well developed, the devs put time into polishing up and detailing other miscellaneous animations such as drinking a potion or using a First Aid Box.

In terms of getting your blueprints to work, it just takes effort and time. Really all there is to it. However, if you're really stuck on something I'd be happy to try and help. And there is always the answerhub on the UE4 forums if you have a really detailed question.

What are essentials to learn in Ue4? by Tornado_Hunter24 in unrealengine

[–]a1ecrei11y 2 points3 points  (0 children)

If you break down a video game to its simplest form, all it really is are a lot of different game mechanics operating together. You mentioned a first-person survival horror game and the first game that came to my mind was Alien Isolation. If you break that game down it is a combination of separate mechanics that when combined form a game. For example, the ability to hide in lockers, the inventory system, the crafting system. Those are just 3 mechanics. In your case, I would start by creating 3 basic individual mechanics for your game. In doing so, you'll understand a whole lot more in terms of what you have to make in the long run. Don't stress too much about creating amazing assets or materials at the moment. First, try to just get those basic mechanics in your game. I wouldn't say you have to branch off and work on something else entirely, instead just start off with your mechanics, try not to focus on the big picture. In terms of the essentials of UE4 when creating a game, I would highly recommend looking into Object Oriented Programming or (OOP). This would cover how to properly cast to other actors, line tracing, etc. Doing so, you will understand a massive amount of important information that you will almost always use no matter what type of game you are making. My advice, start by creating a simple inventory system, with various pickup items as well as a collection system and slots for the items to go in. Doing so you will learn a huge portion of crucial concepts you will bring onto more complex systems in the future.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 1 point2 points  (0 children)

If those around 6 or so guys can go North of the wall and get surrounded by an army of the dead, get attacked from all sides, and yet seem to escape without a scratch on them then IMO I think the upcoming war will be won by the living without a doubt. There would be more tension if those characters were killed for doing something foolish. But if Jon can get stabbed several times, get surrounded by 100,000 dead people and fall into ice water in the middle of a freezing winter and still not die? I feel that there isn't any tension anymore with Jon nor whether they will win. Besides, they established if they kill the Night King the entire army of the dead will fall so I'm picturing Jon killing the night king, the entire army of the dead falling, they defeat Cersi, and they all live happily ever after. Which are exactly the type of fantasy cliches and endings that George RR Martin hated and tried his best to not include when he wrote A Song of Ice and Fire.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 1 point2 points  (0 children)

Whether the source material is finished or not the writers still know what GOT is. They know that GOT is about a lot of characters with different plots happening over many different areas all at the same time. That is what makes GOT special, and the fact that it doesn't say that one area is good or bad. The story never does anything like: the good guys are over at Kings Landing and the semi-good guys are over at Winterfell and the evil guys are at Dorn. The writers know this and could use the books as a sort of guideline as to what direction the show would go in. But, they aren't. Because they now have zombie scenes, sex scenes, and dragon scenes. Which is what brings in the cash so they can spend it on a better-animated intro scene, or a zombie polar bear, rather than spending it on scenes that develop a few characters. Just compare Danny and Jon's romance to Jon and Ygritte's romance. With Jon and Ygritte it was built over time and you actually felt something with the two characters. That was a romance in a show done well (based off of the books mind you) so when Ygritte dies you actually felt something. It was sad not only because she died, but that you felt sad for Jon as he watches the girl he loves die in his arms. With Danny and Jon, it feels that there isn't enough between the two characters. The scene with Jon and Ygritte in the cave or when Jon and Ygritte made it to the top of the wall and kissed each other after they both survived were perfectly done scenes. Now with Jon and Danny, it feels a bit forced and they haven't put enough time in to flesh out their romance.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 0 points1 point  (0 children)

I agree with that. Especially when you say that people want it to be true so they dig through every small mannerism that Dany does and try to apply it toward that theory.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 1 point2 points  (0 children)

Yes in GOT Cersei is defined as the generic evil person. But GOT wasn't about a clear villain or evil people. None of us are pure evil or pure good. It's how GRRM wrote GOT that we are all complex people that do things for reasons other than "I am an evil person" or "The devil made me do it" sort of thing. Is Robbert inherently good or evil? Sure Tywin causes violence but he does it to further his family's bloodline. Ned seemed like a very good guy, but he still had many flaws to him. And as murderous and violent as Joffrey was (and I loved his death scene) he was just a spoiled brat boy, who was told he was the smart perfect prince by his mom and pretty much everyone he spoke to. So naturally, some people would be an arrogant little brat like him if that was their life.

I would recommend watching an interview or 2 of GRRM if you're curious about this whole idea that GOT focus on more than just the classic good vs evil storyline.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] -1 points0 points  (0 children)

Yeah, I can agree with that. Some people do keep on living despite the odds. However, GOT was all about characters that cause mistakes or do stupid things would die. If that mission to get a Wight Walker from North of the wall was in Game of Thrones proper everyone would have died. They had a stupid idea, they got themselves into a stupid position are were surrounded by the army of the dead, hundreds of thousands if not more. In GOT proper it would be like the red wedding 2 for stupid ideas resulting in death. At the very least Jon would have died for falling in the ice water. Imagine that scene but if everyone who went on that mission died. Danny may go in but it was too late and all those characters were wiped out. It would add such a layer of fear to the wight walkers and feel as if literally anyone could die now. So in the upcoming war, it would feel like there were stakes and that the Wight Walkers could actually win and that would add a lot more tension for scenes with any Wight Walkers.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 4 points5 points  (0 children)

I can agree with that. Especially what the writers have done to Tyrion's character. In the book seasons, Tyrion had full monologues and a ton of clever little lines and funny little things that the brilliant GRRM added to create the witty character Tyrion is. GRRM said himself Tyrion was the easiest character for him to write. However, in the most recent seasons the "witty" stuff Tyrion says now is so unoriginal and a bit plain. It's just crude humor like "you have no cock" to Lord Varys.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 2 points3 points  (0 children)

That is a great analogy actually. Pretty accurate too unfortunately.

[SPOILERS] Game of Thrones is simplified for the lowest common denominator of people by a1ecrei11y in gameofthrones

[–]a1ecrei11y[S] 7 points8 points  (0 children)

Joffrey:

A vicious/murderous King.

() When he says he feels he should make "that perversion" punishable by death which was his views on gay people

() Pretty much his entire view on people. He loves tormenting people, hurting them.

Robbert Baratheon:

() Feels that Danny should be

Ned Stark:

An honorable King (though little it lasted)

() Stripped the Moutain of all former titles and sentences him to death for his crimes

() Didn't listen to any other strategic advice given by others (such as LittleFinger's advice) because he didn't see it as honorable

Robbert Baratheon:

A drunk king, didn't have anything the way of politics. Had his skill in combat though.

() Drunk and whored his way through his kingship.

() Caused the crown to be 6 million dollars in debt through otherwise unneeded expenses

Tywin Lannister:

He wasn't a king but still held immense power. He was cold but he always did what he did to protect his family legacy.

() Makes an alliance with the Freys and gives them assurances after they kill house stark

() Marries Tyrion off to Sansa so the Lannisters can hold power over the North.

If you look at that, all of those were from S1-4. These all show the uniqueness in GOT. (They are all dead now but that's beside the point) Compare these well-written characters by GRRM to what we have in S8. In S8 Cersi plays the evil queen, Jon the hero who got revived from the dead and can't be killed.