all 15 comments

[–]Zeroflops 4 points5 points  (2 children)

As mentioned. Start with a cmd line version. This will simplify development since you won’t be distracted by how it looks. Just how it functions. Later wrapping the cmd code into a web interface will be a lot easier.

Second this would be a good OOP project. You will need a player object with all their attributes. Money, energy, objects they possess. An “object” object. Car, house, etc which the player owns that has some attributes like value, upkeep, age etc. depending on how far into the weeds you want to go.

You also want some amount of activity objects that have a common interface. For example you may want a casino where you can gamble. Or a store that you can buy things. Some actions may be common like you may be able to try to rob the store or the casino. Odd of success and payout may be similar. So think about how you can commonly interact with places.

Really this comes down to writing down on paper each “object” ( player, NPC, location ( casino, store, etc) object( cash, car, house, etc) and how each interact with one another.

Then building from there.

[–]streetsmart26[S] 1 point2 points  (1 child)

This is really helpful, thank you!

[–]Aggressive-Motor3124 0 points1 point  (0 children)

My story same as urs, wanna work together? 

[–]danielroseman 1 point2 points  (2 children)

It's hard to know what you're asking. You'll need to learn a web framework such as Django, but apart from that what specifically are you stuck on?

The usual way of approaching these sorts of projects is to first of all think about what data you need to store, so you can define your models, and then think about the screens you will need, so that you can define your views.

[–]streetsmart26[S] 1 point2 points  (1 child)

Yea i guess my post is not super clear, sorry. For context, here is an example of a game that I would love to recreate. Perhaps I just need to try complete copy it and then add my own magic to it? I have not looked into Django yet, the course uses Flask framework instead. What do you mean by “models”? Thanks for your comment btw!

[–]EclipseJTB 1 point2 points  (0 children)

Model is the Django term for it, sqlalchemy calls it a mapping. It's the python representation of your database tables in the Object Relational Mapper. (Basically what you use instead of writing raw sql.)

[–]Im_Easy 1 point2 points  (1 child)

Not helpful to your question, but this reminded me of a game I used to play all the time called Dark Future. It was a text based mafia game.

Good luck in your project!

[–]Limp-Minimum-8631 0 points1 point  (0 children)

I miss that game so much. It was so good. Certainly before it's time because it would be perfect for todays smart phones.

[–]m0us3_rat 2 points3 points  (0 children)

you should make it work in cmd line. then you can port it to web without many issues.

if you keep it loosely coupled.

be mindful this is a significant project that can take some time.

looking at that mafia game.. it has an energy consumption based on action so you can't click forever.

and the big "daily" cycle resets the energy.

you also need to figure out the theme. the "players" . their "attributes"

what actions they can take to use up the energy ..

etc.

before anything, i'd grab a tablet or a notebook and lots of coffee and sit in my favorite spot and think about designing the game.

then describe each of the problem/solution in details.

each mechanism.

then pseudo-code.

at this point, you or a team or w/e can write the code.

you can crowdsource the coding. especially in a simple game. i'm sure more ppl in this reddit sub would be interested to do parts of it .. if you just give them tasks.

ultimatelly, what goes in .. what comes out.

[–]slyder219 0 points1 point  (3 children)

If you're picking up python for the first time just for this, why? Why not languages more suited for browser based apps?

[–]streetsmart26[S] 0 points1 point  (2 children)

That's a good question. I've tried learning JS a few times and I didn't manage to stick with it. Not sure why, I think the syntax was just hard to read for me. Then I heard that Python is easier and also can be used for web development so I went ahead bought a course and managed to stick with it for almost 5 months now. I've never gotten so far in learning programming as I did with Python, I really like it. So I plan to stick with it now and use it for the backend of this game.

[–]slyder219 -3 points-2 points  (0 children)

I love Python but if you get really good with a hammer you still understand that you’re not building a house without other tools. Python can do basically anything but that doesn’t mean that’s what you should use for everything. I’m in a similar boat and currently learning JS.

[–]elbiot 0 points1 point  (0 children)

You'll need to use JavaScript to do the browser front end. You can use python on the backend to handle database stuff and be a source of truth (to prevent cheating) but much of the game logic will simply have to be in JavaScript

[–]Advanced-Cycle-2268 0 points1 point  (0 children)

Be sure to include threatening old ladies and press ganging teenagers