One problem with my game that I haven't given much attention recently is graphics. My player appears as if he is hovering instead of walking. I think I will add a player-specific update for movement by checking which series of pictures (up, down, left, right [and for each of those stationary, step1, step2]) and direction the player is moving and make a counter, like the one we did for top down shooter, except the player isn't going to explode (at least I hope he doesn't). My question is though, should I work on that first, or the algorithm for catching/ increasing the level of the poke***? The latter seems more necessary, but I am afraid I might not be able to finsh it considering the problems I previously mentioned I needed to fix. Is there any way I can fix the creepy white eyes when I scale this picture to 20x20?
Sunday, May 16, 2010
Thank you for your suggestion. I have successfully added the pause menu and have a good start on the party menu. It worked on the school computers, but a problem I have as of now is that the program does not respond to pygame.mouse.set_visible(bool) in a manner that would be expected. The computer does not seem to want to display the mouse the way the program used to, and I hope it is just the computer at my house. I have tried many combinations of the command above, pygame.mouse.set_pos([x,y]) and pygame.display.flip() to see if the mouse appears, and it seems to have shown me the location of the problem: in readEvents(events), the new command for opening the menu is supposed to open the menu and display the mouse on the screen. I know it works because the menu opens, but the mouse flashes on the screen and disappears. The command for releasing the menu is preceded by an elif, and also the menu does not release at the same time the mouse does, so that cannot be the problem. Why does the mouse not show? It also stopped working for the battle phase, and I can't figure out what caused that change because that wasn't even edited during the addition of the menu.
Friday, May 14, 2010
I have successfully added buttons for various functions such as attacking. I am curious though: if I want the function to open a "menu" or perhaps release the current buttons on the screen and replace them with other buttons, would it be easier to make a gameLoop inside the readEvents function that loops while a local variable is set to True, or should I make another global variable like the battle variable that determines whether or not a certain menu is on the screen? I realize the former would involve making an updateScreen and a sub- readEvents, but the latter would involve making a global variable for each of the menus within each mode (I plan to make a pause menu on the map mode and within that a party menu, etc.) and either a separate _ObjToDraw list for each or systematically adding and removing objects from each mode list of objToDraw. Are you leaning towards any particular method?
I have finished much of the program involving the attacks and their resulting effects, but is it possible to easily change the status file that loads the image for the health bar/name/level and the poke*** file that loads the picture and the variables containing the stats into one class? As of now, I have two classes for each poke*** and it will be cumbersome to write the "catching" option until I combine the classes. Can a class have two images simultaneously displayed?
Friday, April 30, 2010
I have figured out how to include multiple objects inside one image. In order to determine which of the objects has the longest width or height, pygame.surface.Surface.get_width() or pygame.surface.Surface.get_height() will help with determining where to blit the surfaces in the image and how large to make the image. So I ahev finished the statusDisplayFile's __init__ function. Now I need to write the deductHealth function, which I think I will put in the main file. It will call the deductHealth function in the statusDisplayFile that I will write using the arguments attack of attacker (not of the defending poke***) and the power of the move used. I believe that I will finish soon and when I do, I will look into the midi module in python in order to include background music. Is there an easy way to get the sound from a youtube video into a format python will accept?
At this point, I have already finished the map navigation (for the most part) and the random initiation of battles in tall grass. For the battle mode, I already have the status and pictures of the player poke*** and the wild poke***. I need to write a function for the effect the attack and defense status have on the deduction of HP. I know what I want the math for the function to be but I am not sure where to include it. Should I make this function in the main file or in a class of some sort? I also am not sure how to include a health bar and name in the same image for the status. I tried looking at the shooter statusDisplay file and that just made it more confusing. Any suggestions?
Monday, April 19, 2010
I've already decided what my final project will be--a spin-off of pokémon using fake ones, battling and hopefully being able to walk around on a map or two. I really haven't gotten into the programming stages yet, but I am still trying to understand exactly how the format will work because I intend to have two stages: the map and the battle. Any suggestions for calling a function to specify between these in updateScreen(), readEvents(events), and animateStep()?