Pygame

29 views
Skip to first unread message

DB32

unread,
Sep 1, 2016, 8:24:31 AM9/1/16
to Django users
Is Django able to support pygame? For example am I able to display somethings made in pygame onto a web page?
The pygame will have a lot of different assets, images ect which are imported from my files

ludovic coues

unread,
Sep 1, 2016, 8:41:45 AM9/1/16
to django...@googlegroups.com
As long as the product of pygame is a python program and not a set of
HTML and JS file, django won't help you.

The other way can work. You can make HTTP request from pygame to
django, to get a list of high score for exemple or a set of
instruction in a turn based game, like a move in a chess play.

Django handle the server side while pygame is a client side thing.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f89cdc4b-e4b2-4a21-8ff2-0408ffacc659%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

M Hashmi

unread,
Sep 1, 2016, 8:59:03 AM9/1/16
to django...@googlegroups.com
Lets divide the answer in two different segments knowledge and information.
1. Information:

No you cannot.

2.Knowledge:
Every framework works with basic request based structure comprising on requests of GET and POST.
When you are interacting with a website from browser all that is working at background services is GET, POST.
In django views you have a "request" as main component to define the way your function will be used. Request is a Meta class that further divides into two more segments of request.GET and request.POST. Both contains bunch of information such as session, context variables, IP addresses, users etc. Pygame is devised for Desktop or even Mobile architectures to an extent and Django request structure is alien for it. 

Having said that...there is no limitations in programming and you can do anything you want. However to achieve an objective you need to define shortest possible path. In this case if you will try to work with PyGame on Django you can do it but its like reinventing the wheel. You will have to write integration mechanism for PyGame to Django. There are other options available and you can google it to find the best one that suits you.

Just remember! I didn't said its not possible I just told you can't do it with current available architecture of both as far as I know of it. Impossible just takes a longer while for things to happen.
:-)
Cheers.

On Thu, Sep 1, 2016 at 5:19 AM, DB32 <legu...@gmail.com> wrote:
Is Django able to support pygame? For example am I able to display somethings made in pygame onto a web page?
The pygame will have a lot of different assets, images ect which are imported from my files

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages