Comments (102)
Well if have enough time, sure. At least it is possible to reuse roman troops in all those battle. :)
from masendor.
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.
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.
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.
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.
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.
ok thx
from masendor.
The new update should fix this issue now.
from masendor.
why is there a black box around the caracthers?
from masendor.
or soldiers
from masendor.
Is it still there? I don't see any.
from masendor.
from masendor.
also how to change weapons?
from masendor.
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.
yes
from masendor.
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.
where?
from masendor.
Run it as a new file entirely on its own please. This is just to check if it is pygame related problem.
from masendor.
from masendor.
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.
there are still black boxes
from masendor.
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.
maybe
from masendor.
Have you figured out why black boxes are appearing on my screen?
from masendor.
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.
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.
oh ok
from masendor.
did you get a macOS yet to test the error?
from masendor.
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.
ok
from masendor.
The black boxes might actually be hit boxes.
from masendor.
I also found out the boxes size depends on the units size.
from masendor.
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.
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.
from masendor.
Well you should also try run pip install -r requirements.txt too to check if it really is the issue with library.
from masendor.
If that still not work, I will make a new release for macOS for you to test with the release version.
from masendor.
it doesn't work
from masendor.
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.
it still doesn't work
from masendor.
the background is has no green. it's just grey with curved lines everywhere.
from masendor.
I can't even see the bases
from masendor.
Can you post screenshot? Seem more likely now that it is system related.
from masendor.
Also can you post screenshot for the animation maker too?
from masendor.
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.
from masendor.
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.
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.
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.
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.
aliens.py does not have any black boxes
from masendor.
Did you try uninstall pygame and install "pygame-ce" instead yet?
from masendor.
It still doesn't work :(
from masendor.
where is the folder that contains the soldiers
from masendor.
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.
The issue is not related to troop itself though since even the mouse surface also not working.
from masendor.
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.
what do you meen?
from masendor.
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.
my mouse and the game mouse does not align and I don't know how to do what you are asking me
from masendor.
You can get your computer system specification by following the step in this link: https://kb.wisc.edu/helpdesk/page.php?id=8208
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.
from masendor.
There is no more info on my mac
from masendor.
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.
Now that I think about it, have you try testing other games made in pygame so far?
from masendor.
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.
I tried dont touch my presents before. It works like a charm!
from masendor.
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.
yeah
from masendor.
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.
Well somehow that one things fixed itself. Can you post 2 screenshots of before and after the background change?
from masendor.
ok
from masendor.
from masendor.
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.
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.
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.
yes
from masendor.
Can you solve this?
from masendor.
Also. I can't use the map editor.
from masendor.
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.
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.
@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.
12.6.3
from masendor.
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.
from masendor.
@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.
If the new update still does not work. Can you screen shot what this part look like on your system?
from masendor.
from masendor.
this is for huge battle
from masendor.
OK for the next step, Can you post what this screen look like on your system?
from masendor.
for some reason, there is no settings under rename project
from masendor.
never mind I found it
from masendor.
from masendor.
also, the new updates caused the black boxes to come back to the soldiers.
from masendor.
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.
now it says No module named 'pygame.freetype'
from masendor.
did you delete pygame-ce as well? If so try reinstall only pygame-ce and try again.
from masendor.
I still have pygame-ce installed
from masendor.
Ok, will try to do a bit more test. Will let you know when the next update is.
from masendor.
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.
the black boxes are still there :(
from masendor.
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.
the boxes of the soldiers disappeared, but the boxes around everything else is still there.
from masendor.
Related Issues (20)
- Issue HOT 8
- issue #2 HOT 4
- issue #3 HOT 4
- Map editor issue HOT 2
- Mechanic Improvement HOT 2
- eRROR HOT 74
- Issue that I'm pretty sure is ok HOT 37
- Question? HOT 12
- 'Unsupported operand type(s)' Error HOT 2
- Change the term map "source" to something more specific HOT 1
- i18n & Translation - Separate game logic from translatable strings HOT 7
- Map editor HOT 4
- Add default module system
- main.spec seems to reference files you didnt put on github, HOT 2
- Unit cluster and visibility is quite bad in a larger battle.
- No module name 'PIL' HOT 1
- Missing map presets? HOT 7
- font declaration error HOT 24
- How to set small window mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from masendor.