Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, TipmyPip, VoroneTZ, Quad, 1 invisible), 688 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 4 of 6 1 2 3 4 5 6
Re: python wrapper [Re: ventilator] #276786
07/06/09 12:27
07/06/09 12:27
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
i downloaded the demo version of the latest A7.77 and now it seems to find the dll, but i fails to run the examples because there are few assets missing, bitmaps like zeiger.tga, ball.pcx or tap.wav. It would be nice to have all included in the package. thanks anyway.

Traceback (most recent call last):
File "D:\pyA7\example1.py", line 10, in <module>
p_bitmap = Bitmap("ball.pcx")
File "a7_types.pyx", line 281, in a7.Bitmap.__cinit__ (a7.cpp:6804)
IOError: bitmap file 'ball.pcx' couldn't be opened!

Last edited by enrike; 07/06/09 12:29.
Re: python wrapper [Re: enrike] #276787
07/06/09 12:31
07/06/09 12:31
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
ah ok! just realised is looking for them in the 3d game studio folder! i thought they where local files you produced for the examples. sorry. Now it is working thanks!

Last edited by enrike; 07/06/09 12:44.
Re: python wrapper [Re: enrike] #276788
07/06/09 12:32
07/06/09 12:32
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
there shouldn't be anything missing.

i use some assets from the gamestudio folder. maybe you have to adapt some paths like this one:

add_folder("C:/Program Files (x86)/GStudio7/projects/carlevel")



...and i think the current version of the wrapper lacks the ang() function. if you need it just define it yourself until i upload the next version.

Code:
def ang(x):
    return cycle(x, -180, 180)



Re: python wrapper [Re: ventilator] #276919
07/07/09 05:52
07/07/09 05:52
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
yes that was the problem. i had to edit the path to GStudio7 in my computer.

another issue ... you say in earlier posts that the wrapper covers around 75% of the engine commands. For my current project I need ent_blend and ent_animate. I tried and they dont seem to be there

>>> import a7
>>> help(a7.ent_blend)
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
help(a7.ent_blend)
AttributeError: 'module' object has no attribute 'ent_blend'

I guess there are part of the 25% still not covered.

Re: python wrapper [Re: enrike] #276993
07/07/09 10:41
07/07/09 10:41
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
they are there but they are methods of the entity class.

entity.animate()
entity.blend()

what's missing is the multiplayer commands and some other stuff like that where i don't have an idea yet how to best wrap it for python.

i could upload epydoc api documentation but i didn't really work on it yet. at the moment it's an auto generated mess and i am not sure if it would be more confusing than helpful. smile

Re: python wrapper [Re: ventilator] #277013
07/07/09 11:52
07/07/09 11:52
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
thanks. dont worry about docs if they are not ready.

Re: python wrapper [Re: enrike] #277712
07/10/09 10:31
07/10/09 10:31
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
i have been playing around for couple of hours today (after going though a nightame of C-lite problems wink and so far looks very nice how this Python wrapper works. At first it took me some time to find out how to do few things but using dir() and help(), and checking the scheduler.py code I found the solutions.

Do you have plans to release it? and which license would it have? i can see now that it prints "pya7 alpha" at the bottom, so i assume you might want to sell licenses?

Last edited by enrike; 07/10/09 10:31.
Re: python wrapper [Re: enrike] #277731
07/10/09 11:57
07/10/09 11:57
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
thanks for your feedback! i will soon release a new version with some new functions that were previously missing and a first version of the api documentation.

my plan was to release a free fully functional version with a watermark, a 25€ version without watermark and maybe a bit more expensive source code version but i am still not sure about it. also depends on the feedback i get... so far it seems like only two persons really gave it a try. :p

Re: python wrapper [Re: ventilator] #277735
07/10/09 12:12
07/10/09 12:12
Joined: Jul 2009
Posts: 40
E
enrike Offline
Newbie
enrike  Offline
Newbie
E

Joined: Jul 2009
Posts: 40
sounds good to me. not sure about the source code version, i mean i dont know in my case how could i use that. i am not good at C/C++ at all.

any dates in mind for the release? i am just about to enter a project with 3DGS and to be honest (and not pretending to start a flame at all) I dont like very much C lite. I find some things really hard and even annoying. I guess I am too much used to programming languages like Python or C#. So being able to use Python would be great, also the availability of libraries is a plus. The problem I see is that we go into a pretty important project and we have to choose a technology that works 9000% error proof. Also we would have to go into this in a very few days, probably end of next week. Too short time I guess.

anyway it is really nice and it seems to work quite smooth and fine so far. I tested it with a model which has few polygons and animations.

Re: python wrapper [Re: enrike] #277763
07/10/09 14:36
07/10/09 14:36
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i wouldn't really rely on it for an important project. it's too early.

the wrapper already works nicely but there still are some areas that aren't very tested (like the material system) and some stuff i still have to think about (like game_save()/game_load() - i think saving the script state could probably be done with pickling somehow).

i don't know how long it will take me. it would be helpful if more people played around with it and gave feedback about any problems but unfortunately there aren't many python users here. smile

...
i also prefer python over lite-c in most cases. lite-c isn't that bad but often i find that c forces you to work on a too low level and the debugging features are a bit lacking. debugging can be very annoying with lite-c. there isn't even a stack trace.

...
by the way, the wrapper is written in cython. it kind of is a python to c compiler. so you wouldn't have to directly work with c source code but you still need good c knowledge for writing a wrapper. you need to know how pointers and so on work.

Page 4 of 6 1 2 3 4 5 6

Moderated by  aztec, Blink, HeelX 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1