hanyuone / Ways-to-NOT-make-money

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

More improvements, including moving more logic into the model class #97

Closed joshgit closed 8 years ago

joshgit commented 8 years ago

More improvements, including moving more logic into the model class

ghost commented 8 years ago

This branch has conflicts that must be resolved

GRRRRR!

joshgit commented 8 years ago

How do we see the conflicts?

hanyuone commented 8 years ago

Whoa...

Hang on, I might want to fix up the game for py2 a bit. Can you wait a while?

joshgit commented 8 years ago

No, fix it after these changes. :(

@joshgit Or we can fix it right now, and it saves us the time of making a new pull request and stuff. (TBH, I just want to do something...)

hanyuone commented 8 years ago

@qlstudio @joshgit Some queries/issues I currently have.

Some things I have implemented:

ghost commented 8 years ago

Remember that Python 3 only supports accessing globals and not creating globals

joshgit commented 8 years ago

initialize_vars has been in there. frames.py is GUI companents. log has been in there. The globals calls have been in there.

I think we should definitely keep the millions and stuff in the savefile (OverflowError does happen, someone has playtested the game for me - albeit for an earlier version - and the game has broke because of the number being too large).

If that's the case you should add the steps to reproduce the bug. But I don't believe it happens in this version of the game anyway. If it does still happen, we should just fix the way it save/loads, which should be pretty easy.

joshgit commented 8 years ago

Remember that Python 3 only supports accessing globals and not creating globals

I don't see anything that says that. Where did you see this?

ghost commented 8 years ago

Python 3 doesn't support creating a global variable named "l" in function "f" just by doing this:

def f():
    global l
    l = 5
    ...
ghost commented 8 years ago

I think we should definitely keep the millions and stuff in the savefile (OverflowError does happen, someone has playtested the game for me - albeit for an earlier version - and the game has broke because of the number being too large).

we are using a different algorithm (namely ASCII-85 encoding)

joshgit commented 8 years ago

Python 3 doesn't support creating a global variable named "l" in function "f" just by doing this:

Says who???

ghost commented 8 years ago

I did it before.

joshgit commented 8 years ago

It seems to work now. How else do you work with globals? Show me a link that substantiates this, please.

bortkiewicz commented 8 years ago

Huh? YOU KNOW THAT I DID version 3.0.7.1. It was APPROVED to work.

bortkiewicz commented 8 years ago

I'm actually QlStudio. I deleted my account (LOL)

joshgit commented 8 years ago

YOU KNOW THAT I DID version 3.0.7.1. It was APPROVED to work.

What does that mean?

bortkiewicz commented 8 years ago

This is the proof that I did it: https://github.com/DerpfacePython/Ways-to-NOT-make-money/commit/3f5d45b80ff629851a90ea0d892d334d519d8008

joshgit commented 8 years ago

Proof that you did what?

bortkiewicz commented 8 years ago

That I did version 3.0.7.1

joshgit commented 8 years ago

What is that version? Why are you talking about this?

bortkiewicz commented 8 years ago

Python 3 Version 0.7.1 (I did that)

bortkiewicz commented 8 years ago

HELLO???

joshgit commented 8 years ago

Ok, why are you telling me that?

bortkiewicz commented 8 years ago

I created the initialize_vars() function in version 3.0.7.1. It was the only way to make the program WORK. run your program. see if it works

bortkiewicz commented 8 years ago

I may be wrong, but then it's python's problem.

joshgit commented 8 years ago

Oh, I get it! Thanks. :) I did test it without that function and it does work, at least as far as I saw.

bortkiewicz commented 8 years ago

Oh well. Sorry.

bortkiewicz commented 8 years ago

I WISH THAT @DerpfacePython WOULD ADD ME AS A COLLABORATOR

hanyuone commented 8 years ago

Hang on, can you get rid of the globals() calls for Python 2, @joshgit or @testitem? Thanks.

joshgit commented 8 years ago

Don't we need those calls?

bortkiewicz commented 8 years ago

Don't we need those calls?

I'm pretty sure we do...

bortkiewicz commented 8 years ago

IMPORTANT: Please DO NOT MERGE. Merging conflicts cause distortions to the executable and the single file executable, which is (almost) impossible to fix. Just let me copy-paste the code when you say it's approved.

hanyuone commented 8 years ago

Hang on, @joshgit, @testitem, can one of you test the Pything (Python thing... going to call it Pything from now on) - gamePy2.py - without the globals and check if it works?

Also, just asking, @joshgit, is there a way to move all the building functions (e.g. "deduction1h1", "boostauto3" etc.) into a new file? We could save a heckuva lot of lines in the main file.

joshgit commented 8 years ago

@DerpfacePython Most of game.py is GUI-related stuff, including the deduction* functions. bugfixer() and lotto() are game logic that I think we should move into the game_model class. If we do that, all the game logic will be in the model and the main file will be all GUI stuff.

Do you remember what was the point of bugfixer() exactly? Will it work at all if I just remove it?

hanyuone commented 8 years ago

@joshgit So sometimes when you buy a building, the building number displayed gets "clogged", I.e. it doesn't move up. That's what bugfixer() is for.

Also, I feel that game.py is pretty cluttered, in my opinion. Too many lines.

@testitem, maybe next time you should merge one pull request at a time, in order, so that we don't have conflicts.

hanyuone commented 8 years ago

@testitem, can you fix up the exe and sfexe so that they're zipped? Maybe that could help with the conflicts a little bit - also, rearrange the files so that they match (almost) exactly with the layout that the master branch is at currently. @joshgit, you need to be active more.

joshgit commented 8 years ago

What should I do?

hanyuone commented 8 years ago

@joshgit Uh... heh heh... I was mainly saying that because you didn't reply to my pull request.

bortkiewicz commented 8 years ago

Could you keep the compare branch up-to-date with the base branch so we don't have conflicts from now on? Thank you.

hanyuone commented 8 years ago

@testitem Can you change all the file formatting so that they're exact with the current version?

bortkiewicz commented 8 years ago

no. I need to wait until @joshgit adds me as a collaborator for his Ways-to-not-make-money fork. I couldn't edit his repo files.

joshgit commented 8 years ago

Why do you need to be a collaborator?

bortkiewicz commented 8 years ago

@DerpfacePython told me to edit some files in your fork repo to make it up to date or it's impossible to merge the pull request.

bortkiewicz commented 8 years ago

JUST DO IT.

bortkiewicz commented 8 years ago

@joshgit @DerpfacePython @Cyber-Shadow by the way, I may not be active June 23 - July 1

joshgit commented 8 years ago

@testitem so clone it and send me a pull request?

bortkiewicz commented 8 years ago

sure. uh.. that's going to be difficult... (Why the heck does my computer lose the git clt every time when I want to use it?)

bortkiewicz commented 8 years ago

Actually, I can only fix conflicts for the exe things. If I fix all conflicts it's going to overwrite the pull request.

bortkiewicz commented 8 years ago

I am replacing this pull request with one that has conflicts fixed since don't have push access to joshgit/ways-to-not-make-money

joshgit commented 8 years ago

@testitem can't you just send me a pull request? Is this not how github works?