1

Hi there. Here is my new minigame that I coded in less than a day. The objective in this game is to shoot as many objects as possible in a time limit. It gives you a score in the end that you can share with others.
This time not in bgt. This game is coded in python scripting language
Enough talking. The download link is
http://idt-group.ir/games/give%20it%20a%20shoot.zip
Let me know what you think about this little game. Do not forget to read the readme file!
Have fun

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up +1

2

sounds interesting. I was looking forward to learn python at some point and it is not disappointing to hear that a game like the above can be coded in less than a day's time. still, keep up your work.

He picked up the wrench and broke the guy’s wrist with it, one, and then the other wrist, two, and turned back and did the same to the guy who had held the hammer, three, four. The two men were somebody’s weapons, consciously deployed, and no soldier left an enemy’s abandoned ordnance on the field in working order.

Thumbs up

3

thanks kianoosh for this cool kind of game, i like this.
and thanks for including the source, now beginners like me can also understand how python works

best regards
never give up on what ever you are doing.

Thumbs up

4

@3 couldn't  you understand it by learning it? smile just saying

If you want to get in touch with me you can follow me on Twitter
have a nice day.
Paul

Thumbs up

5

@4, to be quite frank, i am still learning python.it is hard for me to stop using bgt and start using python, but it is deffinitly better.

best regards
never give up on what ever you are doing.

Thumbs up

6

and here is how python  shows its general slowness...
the game could be great, it's not the best in its kind but that's not your fault, it's python. it's slow and clunky for audiogames.

best.

Thumbs up

7

Good. I am trying it out. One thing I don't like about Python is a simple script can have a really large size. when it is converted to exe

Thumbs up

8

urh I don't like that either. And oriol i'm not seeing any slowness. What are you talking about?

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up

9

You can try to make the executable smaller by modifying the "excludes" list in
the spec file PyInstaller generates when converting the script, if you
use Pyinstaller but if you use another program I'm sure it will have
similar options.
For example, in my game's .spec file it contains the following:
             excludes=["lib2to3", "html", "pyinstaller", "numpy", "tkinter",
"unittest"],
But be careful with one thing: when you modify the spec file you need to
run pyinstaller pointing to it and not the py file, because if you run
it with the py file it will overwrite the spec file you just modified.
Hope it helps a bit.

Thumbs up +2

10 (edited by kianoosh 2018-06-26 05:16:09)

Oh yes thanks a lot! I didn't know that. I'm using pyinstaller
But there is no any exculdes in the excludes list in my .spec file

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up

11

@orielgomez
python is not the ideal choice then? how about someone who doesn't intend to produce complex or high end game, but something between a press-a-key-and-hear-a-sound game and a huge sidescroller for example, just curios.

He picked up the wrench and broke the guy’s wrist with it, one, and then the other wrist, two, and turned back and did the same to the guy who had held the hammer, three, four. The two men were somebody’s weapons, consciously deployed, and no soldier left an enemy’s abandoned ordnance on the field in working order.

Thumbs up

12

I'm not saying python is bad. I'm just saying I find it very slow for somethings.
Take undead assault for example. it was slow. It was laggy. and it wasn't always due to the network.
Python is generally slower than other languages it has nothing to do with game complexity.
again, I don't blame this on you Kianoosh it's good that you start coding games of course.

Thumbs up

13

i also don't see that the game is slow

best regards
never give up on what ever you are doing.

Thumbs up

14 (edited by kianoosh 2018-06-26 09:48:29)

I know what you mean oriol. Undead assault was slow because it was using outdated libraries, it didn't have a good sound engine, and their server was badly laggy. I turned the minigame into an fps, with rotation support and a map system. Everything works fine. I have experience of coding with C# as well but the timers showed that python can be a better one. The gun that i coded in C# had looping problems but now that I coded another one with python, I found out that python works better in that case(I'm not saying that python is better than C# though). Oh yes i've changed that from looping to timers but it is still like looping.
edit: It is already pruved that python is a bit slower than other programming languages, but that's not notissable. I mean it's not as much as that we call it "slow". If the developer manage their code correctly, performence is good enough.
And after all, hay! it's waaaaay better than bgt hahah.

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up

15

yes it is a hole lot better than bgt, for me it is not easier, but yes. it is more updated and if you find it hard to do some thing witch does not work right, when you google the error, you will most probably find some one who has the sam e error and a fix to the error. unlike bgt

best regards
never give up on what ever you are doing.

Thumbs up

16

@10, when you exclude a module from your project Pyinstaller will remove the DLLs that it needs, so the executable becomes smaller.
To facilitate seeying which modules Pyinstaller is including I usually run it with the default options so it creates a folder with the files,
and I take note of the modules I don't use and fill the excludes list.
But don't remove too much because your game can stop working if it doesn't find a module it needs.
In my case the libraries I put in the excludes list of my project I don't use, so it's safe to remove them.
About Python being slow or not, I have a small story to share. These days me and a friend were talking and he asked me "did you
notice that this new program is so fast?", and I became impressed. This
new program was written in Python. Previously we used a program that was
written in a compilled programming language but it had a bit of lag. So, with this, I learned that often
we that make programs slow in the way we code them, and often the problem is not a language limitation. The logic
was that a compilled program would be faster than the Python one, but it happened to be the contrary.

Thumbs up +1

17

@16, I share your same theory

If you want to get in touch with me you can follow me on Twitter
have a nice day.
Paul

Thumbs up

18

Yeah it's definltely better than using bgt, I switched to Javascript which is not 100% ideal but it's better than bgt for sure

Thumbs up

19 (edited by kianoosh 2018-06-26 19:35:13)

Oh thg gamer thanks a lot. I now got what you mean. Haha sorry i'm not a native English speaker smile I definitely need to do that because 20 mb executable file is erm, Too much for such a game big_smile
And that folder you are talking about is the build folder. Right?

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up

20

When you run Pyinstaller on your script with the default options, it creates a "dist" folder, inside it will contain the folder of your game with lots of
files in it, that's the folder I'm talking about. These files are included
inside your game when you use the one file option but we can't see them this way, so to facilitate
viewing what Pyinstaller includes I first use the default options and
then use the one file option and modify the spec file. To make the folder
smaller, take note of the modules you don't use inside this folder and add then in the excludes list of your spec file.
For example, in my project Pyinstaller included a lot of modules I don't
use (numpy for example had a DLL with 27 MB) so I needed to add this line to remove numpy and other modules I didn't use inside my spec file:
             excludes=["lib2to3", "html", "pyinstaller", "numpy", "tkinter", "unittest"],
and it reduced the size a lot, as the 27 MB dll I mentioned before and the other modules I didn't use weren't included anymore.

Thumbs up

21

Oh got it. Thanks

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up

22

I think RSGames was created using Python too, isn't it? And I don't seems to have the slowness issue.

Thumbs up

23

RS games is everything but not fast, however that isn't really due to python, it's more due to the way their server works. In fact RSG really doesn't need to be slow cause of python, all the game logic is on the server, the client is just an interface to it.

Thumbs up

24

Well the only problem with python is that its executables are big. Even if you exclude none required libraries. Assume when you can't do that and you need like all of those huge libraries like numpy, just like my project so a small game again like my project is 20 megabytes

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

Thumbs up

25

This game not work on my computer informing me about errors

You must know... Cats are soft!

Thumbs up