hanyuone / Ways-to-NOT-make-money

A basic Python (2.x/3.x) incremental game.
8 stars 3 forks source link

Delete "Animation" pictures, update to 1.0.0a1 #115

Closed hanyuone closed 8 years ago

hanyuone commented 8 years ago

Because that portion of the screen is changed for messages, we can safely get rid of the pictures.

hanyuone commented 8 years ago

We really don't need two exe's. Does the single-file exe download all the requirements, @testitem?

Also, guys, DON'T MERGE THIS YET. I still have things to do.

hanyuone commented 8 years ago

@joshgit What was the GameFrame class for in Frames? I got rid of the whole thing on my side, and the game works just fine without it.

bortkiewicz commented 8 years ago

Which one do you want to keep? Anyways after this PR is merged we would have to update the exe. The sfexe doesn't have tcl bundled, so sfexe is pretty much useless...

bortkiewicz commented 8 years ago

The GameFrame class was used to make a sample of how the frames were supposed to work. As the class is not initiated in any module, we can get rid of it. @DerpfacePython , we can avoid the threading issue in a better way by making the program object-oriented. (Maybe @joshgit could help with that? Almost all of his contrbutions were either updates to game.py or adding helper classes.)

hanyuone commented 8 years ago

So... for object-orientation... which program do you mean, @testitem?

Also, we should probably keep the normal exe file until we (mostly you though) figure out how to include the tcl files in sfexe.

bortkiewicz commented 8 years ago

I mean the game.py program, to me it looks like a big mess of functions.

hanyuone commented 8 years ago

Yeah, I agree with that. So how can we do this?

bortkiewicz commented 8 years ago

I'm gonna show you.

bortkiewicz commented 8 years ago

Anyways, once the OOP version comes out it's going to be 1.0.0. I got this template:

# Welcome to the New, Reformatted 1.0.0a1 Ways To Not Make Money!

try:
    from Tkinter import *
except:
    from tkinter import *
from random import *
from tkinter.messagebox import showerror
import math
import save_and_load
import frames
import game_model
import webbrowser
import sys

class GeneralFunctionMixin(object):
    '''Collection of functions both used by MPSFM and UFM.
Gold upgrade handling and the lotto function will also be
placed here.'''
    pass

class MPSFunctionsMixin(object):
    '''Collection of functions handling building buying/
MPS handling/money addition'''
    pass

class UpgradeFunctionsMixin(object):
    '''Collection of functions handling upgrade buying/
handling results of buying them'''
    pass

class CentralProcess(Frame):
    '''The class in which all game functions are processed.
This includes frame layouts, button layouts,
signin methods, and reporting.'''
    def __init__(self, master):
        '''Initializes the game.'''
        Frame.__init__(self, master)
        self.grid()

        self.signin()

    def signin():
        pass

def main():
    root = Tk()
    game = CentralProcess(root)
    game.mainloop()
bortkiewicz commented 8 years ago

Feel free to commit to master. I could do (evil) stuff like git rebase master and git push --force to master. That should do to overwrite any commits.

bortkiewicz commented 8 years ago

Uh... @DerpfacePython ? What are you working on these days? I haven't heard from you much.

hanyuone commented 8 years ago

1: I'm working on a school online canteen thing with a bunch of my classmates (one of whom is Cyber-Shadow) called Falcon's Nest. It's available on Github, search "FalconsNest". 2: I'm also currently on holidays right now, so I won't have access to the interwebs from time to time.

hanyuone commented 8 years ago

So, should we merge this? We should probably find a way to strip down game.py as much as possible - like, put all the buildings and upgrades into one file, put the signin stuff into another, that sort of thing.

N.B. What's the point of frames.py?

bortkiewicz commented 8 years ago

Yeah... the problem is communicating back and forth constantly between programs (all the global var calls)

I do not know what frames.py is for. Ask @joshgit (where is he?)

joshgit commented 8 years ago

Frames.py has the Tk GUI frames the application uses.

bortkiewicz commented 8 years ago

yeah.. so what's the point?

joshgit commented 8 years ago

Of having GUI classes not put in the same file as our model classes? Have you read about the MVC pattern?

bortkiewicz commented 8 years ago

I mean why do we need GUI classes?

bortkiewicz commented 8 years ago

To sort everything out? Adding classes just makes it more complex.

joshgit commented 8 years ago

No, adding classes keeps the GUI stuff separate, so it's not mixed in with the model logic. What's your proposed alternative? Use functions in the model module to create the GUI? Please, read about the MVC pattern!

bortkiewicz commented 8 years ago

73 We are going to simply get rid of the Tk version and use a different graphical interface that actually supports animation. It is way simpler to keep all the buttons in a list and assign those functions to stuff.

joshgit commented 8 years ago

That's exactly why you want separate GUI classes. Now you just have to change what's in the existing GUI classes to switch to a new GUI library. If the GUI stuff wasn't separated into it's own class, you'd have to comb through the model module or other places and hope you'd updated all the GUI stuff correctly.

bortkiewicz commented 8 years ago

img

so what this basically does is input, processing and output - I don't see how you implemented it.

bortkiewicz commented 8 years ago

Okay. I see. So the only thing is we have to change is the functions?

joshgit commented 8 years ago

Hopefully you only have to change what's in the GUI classes. That's the idea at least.

hanyuone commented 8 years ago

So, when are we merging this PR?

Also, I was thinking, maybe we could continue using Tkinter because we've done so much of our code off of it - we just have to make our own styling so it doesn't look ugly. Is there any possible way to change the texture for the buttons and stuff so that they're not the ugly default?

bortkiewicz commented 8 years ago

groan don't change frames.py, change game.py!

bortkiewicz commented 8 years ago

Also, I was thinking, maybe we could continue using Tkinter

Tk does NOT support animation!

hanyuone commented 8 years ago

Yeah, you've got a good point there, @testitem. Should we just change it now?

bortkiewicz commented 8 years ago

What should we switch to? Pygame is the best choice. (I said before it was horrible I saw 3.5 users using it.)

bortkiewicz commented 8 years ago

HOORAY!

I made a single file executable with tcl IN IT!

hanyuone commented 8 years ago

WOOT! Can you update the exe branch then?

bortkiewicz commented 8 years ago

I did,

bortkiewicz commented 8 years ago

update: do not use the EXE, tcl is not 100% installed on it, malicious software. I am reinstalling and recompiling game.py

hanyuone commented 8 years ago

Ah, cool.