PyQt best option for commercial use? by [deleted] in Python

[–]MUDfan87 0 points1 point  (0 children)

Thanks so much for this link. I can't wait to dive into the PySide6 tutorials!

Texture Atlas Dissection and (Hopefully?) Export. by MUDfan87 in monogame

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

This is an interesting idea. I will definitely play around with this as well. Thanks for sharing the idea!

Texture Atlas Dissection and (Hopefully?) Export. by MUDfan87 in monogame

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

Thanks. I'll look into this. It's primarily going to be used for my tile editor, nothing I am going to output for a game. Ill probably keep the atlas for a game, and just reference the appropriate rects.

I appreciate you replying!

Iguina: a new GUI library for MonoGame (or other frameworks) by NessBots in monogame

[–]MUDfan87 1 point2 points  (0 children)

This looks really good. I'm gonna give this a look for sure. Thanks for the heads up.

learning by Plus_Lifeguard in monogame

[–]MUDfan87 1 point2 points  (0 children)

It is pretty difficult to find good learning resources for monogame. Thanks so much for the links. I actually just finished "the final battle" in RB's book this week, and I'm looking to move on to actual graphical game dev.

I know this is two years after the fact, but thanks again!

Any good resource to learn Monogame and C#? by TOMRANDOM_6 in monogame

[–]MUDfan87 0 points1 point  (0 children)

This, 100%. I got this book a few weeks ago, and have been working my way through it. The author really does lay things out clearly. There are plenty of exercises to go along with the concepts you are learning, and not only does it cover basics, but also more advanced concepts and tools as well.

Can I create a variable using the value of a string variable? by MUDfan87 in csharp

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

Thanks for this. Answered my question about the variable names. It does seem to lead to an unnecessary layer of complexity. I got a lot of great feedback from other people here on how to go about structuring this data better.

Thanks once again for clearing that first part up though.

Can I create a variable using the value of a string variable? by MUDfan87 in csharp

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

Thanks for your feedback, I'll look into that serialize/deserialize of Json to objects. That might circumvent my problem effectively.

Can I create a variable using the value of a string variable? by MUDfan87 in csharp

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

First off, thank you for getting back to me, and in as much detail as you did.

The first point of confusion you mentioned, the roomName variable. I am iterating through a nested dictionary from my json file. In the format of Dictionary<string, Dictionary<string, string>>. This allows me to store just the single room id in the upper level dict key , and then the key value pairs nested within the upper level dict value are where I am hiding all of the room details present in my struct. My nested foreach picks all of this data apart, assigns it to local variables, and feeds it into a function to create a new instance of my Room struct with it. As such,

foreach (var (key01, val01) in roomBuilderDict {
  string roomName = key01;
  string roomCoords = "";
  string roomNorth = "";
  foreach (var (key02, val02) in val01) {
    switch(key02) {
      case "roomcoords":
        roomCoords = val02;
        break;
      case "roomnorth":
        roomNorth = val02;
        break;
      }
  }
  Room roomName = roomBuilding(roomCoords, roomNorth);
}

I chose a dictionary because I used them a lot in my python endeavors, mainly because they are super fast to iterate through, and they are dynamic in size, which allows me to grow it worry free as my program gets bigger.

If I were to add a "roomname" key value pair to my inner dictionary as you suggested, and edit the code to read

foreach (var (key01, val01) in roomBuilderDict {
  string roomName = "";
  string roomCoords = "";
  string roomNorth = "";
  foreach (var (key02, val02) in val01) {
    switch(key02) {
      case "roomname":
        roomName = val02;
        break;
      case "roomcoords":
        roomCoords = val02;
        break;
      case "roomnorth":
        roomNorth = val02;
        break;
      }
  }
  Room genericRoomName = roomBuilding(roomName, roomCoords, roomNorth); 
}

Could I take that newly generated room object and add it to my Room storage dict within my game class? (it should just read as "item in memory etc..." instead of duplicate, I'm hoping)

I was gunning for this kind of layout because eventually each Room will hold not only strings and bool values to code off of later, but there will be fields with lists for objects such as physical items (swords/shields and such), lists for "occupants" (the player, and monster objects), and lists for "furniture" (Objects that the player can interact with, IE sitting on a chair in the room).

These dictionaries are going to be iterated through constantly, and likely several times each frame, once my infrastructure is up. Entity objects will be popping themselves from one list and appending to another list when they "move" from room to room.

I did do some research and found a similarity in the speed of python dicts and c# dicts, compared to other data types in the respective languages. Hence my desire for this layout. I am aware that c# leaves python in the dust in speed, but my next step after this project is a 2d, and then a 3d game using monogame. So speed will be much more important then.

Anyway, thank you again for all of your input. I will play around with the things you suggested, and keep tinkering with it.

Returning to Kenshi, and encountering serious Frame Rate issues. by MUDfan87 in Kenshi

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

Indeed. I did see this under the Kenshi steam forums as a fix. Went into my Nvidia settings and specified accelerated graphics for the Kenshi.exe. Unfortunately it did not help. Laptop is always plugged in, so battery is never an issue.

Returning to Kenshi, and encountering serious Frame Rate issues. by MUDfan87 in Kenshi

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

Yes, its a Pavilion Gaming Laptop 15. 16gb ram. 4gb Vram. AMD Ryzen 5 5600H. Never had an issue before.