Giter Site home page Giter Site logo

error about masendor HOT 102 CLOSED

remance avatar remance commented on May 22, 2024
error

from masendor.

Comments (102)

remance avatar remance commented on May 22, 2024 1

Well if have enough time, sure. At least it is possible to reuse roman troops in all those battle. :)

from masendor.

RybenHill avatar RybenHill commented on May 22, 2024 1

Hello @Hamster-lord

Is the original Issue with the black boxes solved?

Can we consider that bug fixed, so we can close this issue ticket?

Would it be possible that you report every bug in a different issue ticket?
Like... what do you do to trigger the bug? does it happen 100% of the times with those steps (can it be reproduced)? what's the version you are testing? what are your hardware specs? Any useful attachments, logs or screenshots?

I think it's going to be easier to track and fix them that way.

Thanks!

from masendor.

remance avatar remance commented on May 22, 2024 1

So two things I manage to derive from the last screenshot. The sprite transparency work fine IF they are blitted on to another surface first (for example weapon icon on top left UI). The transparency issue seem to occur mostly for sprite that are blit on UI interface mostly. But I am not sure why map weather effect transparency also does not work. At least this narrow down what to look for.

from masendor.

remance avatar remance commented on May 22, 2024

Thanks for the report, This error should be fixed with the newest update. Made a mistake not checking for the error before commit :P

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

I got this:
Ruleset: Historical, Mode: arcade
Map: Testmap, Source: Modern Historians, Character: 1
!! Traceback (most recent call last):
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/main.py", line 12, in
game.Game(main_dir, error_log)
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/game.py", line 744, in init
self.run()
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/game.py", line 1150, in run
self.menu_char_select(mouse_left_up, mouse_left_down, mouse_scroll_up,
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/common/game/menu_char_select.py", line 26, in menu_char_select
self.start_battle(self.char_selected)
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/common/game/start_battle.py", line 13, in start_battle
self.battle_game.run_game()
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/battle.py", line 892, in run_game
pygame.mixer.music.load(self.musiclist[self.music_current[self.picked_music]])
!! IndexError: list index out of range

from masendor.

remance avatar remance commented on May 22, 2024

yeah I notice this error. Although I can't commit the update I am working yet. Will let you know when it done.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

ok thx

from masendor.

remance avatar remance commented on May 22, 2024

The new update should fix this issue now.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

why is there a black box around the caracthers?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

or soldiers

from masendor.

remance avatar remance commented on May 22, 2024

Is it still there? I don't see any.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Screen Shot 2023-02-11 at 8 25 15 AM

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

also how to change weapons?

from masendor.

remance avatar remance commented on May 22, 2024

Well that is very weird. Wonder if it related to pygame version or macOS. This never happen in the previous version before rework update right?

To change your character weapon, just press 1 or 2 (the one not on numpad).

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

yes

from masendor.

remance avatar remance commented on May 22, 2024

For the weird black box, can you try run this code below and post a screenshot to show how it look?

class HeroUI(pygame.sprite.Sprite):
    weapon_sprite_pool = None

    def __init__(self, screen_scale):
        self._layer = 10
        pygame.sprite.Sprite.__init__(self)
        self.screen_scale = screen_scale

        self.image = pygame.Surface((200 * self.screen_scale[0], 200 * self.screen_scale[1]), pygame.SRCALPHA)

        self.health_bar_size = (10 * self.screen_scale[0], self.image.get_height())
        self.health_bar = pygame.Surface(self.health_bar_size, pygame.SRCALPHA)
        self.health_bar.fill((0, 0, 0))
        self.health_bar_original = self.health_bar.copy()
        self.health_bar_rect = self.health_bar.get_rect(topright=(self.image.get_width() - self.health_bar_size[0], 0))
        self.health_bar.fill((200, 0, 0))

        self.health_bar_height = self.health_bar.get_height()

        self.stamina_bar = pygame.Surface(self.health_bar_size, pygame.SRCALPHA)
        self.stamina_bar.fill((0, 0, 0))
        self.stamina_bar_original = self.stamina_bar.copy()
        self.stamina_bar_rect = self.stamina_bar.get_rect(topright=(self.image.get_width(), 0))
        self.stamina_bar.fill((0, 200, 0))
        self.image.blit(self.health_bar, self.health_bar_rect)
        self.image.blit(self.stamina_bar, self.stamina_bar_rect)
        self.rect = self.image.get_rect(topleft=(0, 0))

import pygame

pygame.init()
wndsize = (400, 400)
window = pygame.display.set_mode(wndsize)
clock = pygame.time.Clock()

test = HeroUI((1, 1))
run = True
while run:
    clock.tick(60)

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            run = False
    window.fill((255, 255, 255))

    window.blit(test.image, test.rect)

    pygame.display.update()

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

where?

from masendor.

remance avatar remance commented on May 22, 2024

Run it as a new file entirely on its own please. This is just to check if it is pygame related problem.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Screen Shot 2023-02-17 at 7 57 49 AM

from masendor.

remance avatar remance commented on May 22, 2024

seem to work fine on that end then. well this is quite weird since it use the same setup. Can you check in game again with the newest update to see if it still has the same bug?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

there are still black boxes

from masendor.

remance avatar remance commented on May 22, 2024

Tested the game on another pc and no black box issue. Guess it is likely related to macOS. Will have a test on that later.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

maybe

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Have you figured out why black boxes are appearing on my screen?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

I got !! Traceback (most recent call last):
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/main.py", line 15, in
game.Game(main_dir, error_log)
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/game.py", line 559, in init
self.change_ruleset()
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/game.py", line 587, in change_ruleset
self.troop_data, self.leader_data, self.faction_data = make_faction_troop_leader_data(self.main_dir,
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/common/game/setup/make_faction_troop_leader_data.py", line 12, in make_faction_troop_leader_data
troop_data = datastat.TroopData(main_dir, weapon_images, ruleset_folder, language)
!! File "/Users/Emma/Documents/GitHub/AnchientBattleSimulator/gamescript/datastat.py", line 252, in init
self.weapon_lore |= {key: value for key, value in weapon_lore_list.items() if key
!! TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'

from masendor.

remance avatar remance commented on May 22, 2024

Unfortunately not, I have no access to macOS to test it yet. The last error is because you need python 3.10 to run the game.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

oh ok

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

did you get a macOS yet to test the error?

from masendor.

remance avatar remance commented on May 22, 2024

Probably will be a little while longer, I don't have access to my pc yet and my laptop is not good enough for virtual machine. Will let you know when I manage to do it. For now, can you try update the game and all python library to see if it work now?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

ok

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

The black boxes might actually be hit boxes.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

I also found out the boxes size depends on the units size.

from masendor.

remance avatar remance commented on May 22, 2024

I see thanks for checking, well I should be able to test the game on macOS soon. Will let you know when I mange to get to it.

from masendor.

remance avatar remance commented on May 22, 2024

so I managed to run the game on macOS 12 in my virtual machine and could not manage to replicate the black box issue. So I think the issue may be from outdated requirement on your pycharm. Can you post a screenshot of your package list?

Here is what mine look like: For some reason pygame 2.3 can not be run on my macOS so I had to revert to 2.1 version.
image

from masendor.

remance avatar remance commented on May 22, 2024

Well you should also try run pip install -r requirements.txt too to check if it really is the issue with library.

from masendor.

remance avatar remance commented on May 22, 2024

If that still not work, I will make a new release for macOS for you to test with the release version.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

it doesn't work

from masendor.

remance avatar remance commented on May 22, 2024

Just release mac version in the newest update. Can you try it from here?

https://github.com/remance/Masendor/releases/tag/0.6.8.4

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

it still doesn't work

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

the background is has no green. it's just grey with curved lines everywhere.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

I can't even see the bases

from masendor.

remance avatar remance commented on May 22, 2024

Can you post screenshot? Seem more likely now that it is system related.

from masendor.

remance avatar remance commented on May 22, 2024

Also can you post screenshot for the animation maker too?

from masendor.

remance avatar remance commented on May 22, 2024

So if this blackbox only appear in the newer version, I think this may solve the issue.

Can you try downgrade Pillow library from 9.4.0 to 9.3.0. And maybe all of the following libraries below to these specific version? Maybe the newer one are incompatible with your system.

iniconfig==1.1.1
numpy~=1.22.2
pandas~=1.4.1
Pillow~=9.3.0
pygame~=2.1.2
pyperclip==1.8.2
pywin32-ctypes==0.2.0
screeninfo~=0.8.1
pathfinding~=1.0.1
scipy~=1.8.0

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Screen Shot 2023-04-03 at 8 58 04 PM

from masendor.

remance avatar remance commented on May 22, 2024

Thank you for the screenshot, the black box around mouse icon make it more obvious now that there is some issue with transparency. Likely with pygame and your system for some reason. I will have a try to make a quick test for this.

from masendor.

remance avatar remance commented on May 22, 2024

What happen when you run Aliens.py game? You can find it in python folder (not sure where it is in your macOS system). Here is an example of where mine is : C:\Program Files (x86)\Python\Lib\site-packages\pygame\examples

from masendor.

remance avatar remance commented on May 22, 2024

In any case, can you post your system spec, the pygame version you are running on? If nothing is working, I think I will have to go ask in a forum or pygame issue. Maybe I can replicate it if I try using the exact same macOS version as well.

from masendor.

remance avatar remance commented on May 22, 2024

So I receive a suggestion to replace pygame with pygame-ce. Can you try update the game, and uninstall pygame from your pycharm and then install pygame-ce instead?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

aliens.py does not have any black boxes

from masendor.

remance avatar remance commented on May 22, 2024

Did you try uninstall pygame and install "pygame-ce" instead yet?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

It still doesn't work :(

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

where is the folder that contains the soldiers

from masendor.

remance avatar remance commented on May 22, 2024

Well that is bad to hear :( Can you post screenshot of animation maker?

Do you mean the troop sprite or data (like attack stat and stuff)?

For sprite it is here: data\sprite\subunit

For data it is here: data\ruleset\historical\troop\preset

from masendor.

remance avatar remance commented on May 22, 2024

The issue is not related to troop itself though since even the mouse surface also not working.

from masendor.

remance avatar remance commented on May 22, 2024

Also I am going to submit this issue on pygame-ce github. Can you list the following info below?

  • Operating system (e.g. Windows, Linux(Debian), Linux(Ubuntu), Mac):
  • Python version (e.g. 3.7.9, 3.8.5) : (Shown when run game)
  • SDL version (e.g. SDL 2.0.12): (Shown when run game)
  • PyGame version (e.g. 2.0.0.dev10, 1.9.6): (Shown when run game)
  • Relevant hardware (e.g. if reporting a bug about a controller, tell us the brand & name of it):

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

what do you meen?

from masendor.

remance avatar remance commented on May 22, 2024

what do you meen?

To which comment are you asking this?

If you mean this one:

Also I am going to submit this issue on pygame-ce github. Can you list the following info below?

  • Operating system (e.g. Windows, Linux(Debian), Linux(Ubuntu), Mac):
  • Python version (e.g. 3.7.9, 3.8.5) : (Shown when run game)
  • SDL version (e.g. SDL 2.0.12): (Shown when run game)
  • PyGame version (e.g. 2.0.0.dev10, 1.9.6): (Shown when run game)
  • Relevant hardware (e.g. if reporting a bug about a controller, tell us the brand & name of it):

Then I need your system information so I can ask the pygame developer to check with this issue we are having.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

my mouse and the game mouse does not align and I don't know how to do what you are asking me

from masendor.

remance avatar remance commented on May 22, 2024

You can get your computer system specification by following the step in this link: https://kb.wisc.edu/helpdesk/page.php?id=8208

image

I need to know the information in graphic/display and the one shown in the image above.

Then I need to know your python version and all library version like the one in image below.

image

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

There is no more info on my mac

from masendor.

remance avatar remance commented on May 22, 2024

That is weird. Do you have other computer to test the game? My guess is that your computer may be too old for new pygame to work properly.

from masendor.

remance avatar remance commented on May 22, 2024

Now that I think about it, have you try testing other games made in pygame so far?

from masendor.

remance avatar remance commented on May 22, 2024

Maybe try this one: https://ghastly.itch.io/meltdown or https://github.com/Gooodgis/dont-touch-my-presents or https://internal.markop1.cz/chess/

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

I tried dont touch my presents before. It works like a charm!

from masendor.

remance avatar remance commented on May 22, 2024

Well this is even weirder. Although the game use older version of pygame. I wonder why this game does not work when both use pygame.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

yeah

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

tHE BLACK BOXES ARE REMOVED I THINK, BUT THE BACKGROUND ISN'T LOADING PROPERLY. The background loads properly when you just start the battle, but after about 1 second, the background changes into a more lazy version of the background.

from masendor.

remance avatar remance commented on May 22, 2024

Well somehow that one things fixed itself. Can you post 2 screenshots of before and after the background change?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

ok

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

before
Screen Shot 2023-04-24 at 9 08 42 AM
after
Screen Shot 2023-04-24 at 9 08 25 AM

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

You should add romans and make the game kind of similar to shield wall on steam: https://store.steampowered.com/app/1216320/Shieldwall/ , because romans were very cool and popular and you should know that romans were pretty famous for their shield wall.

from masendor.

remance avatar remance commented on May 22, 2024

Hmm yes roman battle would be a great addition. What do you think is more interesting, Romans vs barbarian (german or celt), vs carthage, parthia, egypt, greek, or maybe against roman themselves (civil war)?

from masendor.

RybenHill avatar RybenHill commented on May 22, 2024

Hmm yes roman battle would be a great addition. What do you think is more interesting, Romans vs barbarian (german or celt), vs carthage, parthia, egypt, greek, or maybe against roman themselves (civil war)?

A whole campaign against them all ;)

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

yes

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

before Screen Shot 2023-04-24 at 9 08 42 AM after Screen Shot 2023-04-24 at 9 08 25 AM

Can you solve this?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Also. I can't use the map editor.

from masendor.

remance avatar remance commented on May 22, 2024

The issue seem to be related to pygame in someway but is impossible to replicate so far in any other machine. He ran the game on macOS that the only thing I really know.

from masendor.

remance avatar remance commented on May 22, 2024

before Screen Shot 2023-04-24 at 9 08 42 AM after Screen Shot 2023-04-24 at 9 08 25 AM

Can you solve this?

Even the before image already doesn't look right. So I think something is wrong with map effect instead now. I will have a try to fix it.

from masendor.

RybenHill avatar RybenHill commented on May 22, 2024

@remance can you show a screenshot of how it should look like? (ie., how it looks on your local computer)

What's the macOS version you are using @Hamster-lord ?
What about the python interpreter version and the rest of the python libraries @Hamster-lord?

I can try myself to trigger the bug in a Virtual Machine with the problem environment, but first I need to know the details to reproduce it in the same circumstances.
Any information will be of help.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

12.6.3

from masendor.

remance avatar remance commented on May 22, 2024

@RybenHill

Here is what mine look like before and after the snow weather effect got added. Actually my previous was misinformed before. The before image seem to be what the game look like few second before the weather effect kick in. And I can see that the blackbox issue is not really fully solved yet. I can still see blackbox around the snow sprite on Hamster-lord screenshot. So there is something between different between the way image is loaded for troops and other sprites that fix the black box issue.

image

from masendor.

remance avatar remance commented on May 22, 2024

@Hamster-lord ok I just tried something. Can you update the game and have a test again? Maybe it (hopefully) fix your issue.

from masendor.

remance avatar remance commented on May 22, 2024

If the new update still does not work. Can you screen shot what this part look like on your system?

image

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Screen Shot 2023-04-27 at 7 51 06 PM

not working

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

this is for huge battle

from masendor.

remance avatar remance commented on May 22, 2024

OK for the next step, Can you post what this screen look like on your system?

image

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

for some reason, there is no settings under rename project

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

never mind I found it

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

Screen Shot 2023-04-29 at 10 13 49 AM

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

also, the new updates caused the black boxes to come back to the soldiers.

from masendor.

remance avatar remance commented on May 22, 2024

So first thing first, you need to uninstall pygame 2.3.0. Try run the game after that and see how it go.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

now it says No module named 'pygame.freetype'

from masendor.

remance avatar remance commented on May 22, 2024

did you delete pygame-ce as well? If so try reinstall only pygame-ce and try again.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

I still have pygame-ce installed

from masendor.

remance avatar remance commented on May 22, 2024

Ok, will try to do a bit more test. Will let you know when the next update is.

from masendor.

remance avatar remance commented on May 22, 2024

So here is what I found. You need to uninstall pygame-ce and reinstall it again to make the pygame import work properly.

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

the black boxes are still there :(

from masendor.

remance avatar remance commented on May 22, 2024

Well that suck :l I wonder what fix the black box issue before. But it is not related to pygame-ce version for sure. Wonder if they actually manage to fix it on normal pygame. Maybe can you try remove pygame-ce and reinstall pygame only again?

from masendor.

Hamster-lord avatar Hamster-lord commented on May 22, 2024

the boxes of the soldiers disappeared, but the boxes around everything else is still there.

from masendor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.