April 20, 2025, 09:18:12 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: 1 ... 25 26 [27] 28 29 ... 77

Author Topic: Official PyGG2 Development thread  (Read 306032 times)

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Porting GG2 to Python - PyGG2
« Reply #390 on: January 07, 2012, 04:42:36 am »

The only thing still confusing me is the creating of instances (i know you can type say shot.bullet() to create an instance of shot named bullet, but... iunno it's hard to explain my confusion), which i'm sure I'll get to in the pygame portion of learning.
Oh, and how to import pygame.
Don't know how to do that.

You type this at the top of your file (everything after the # is ignored by Python, that's a comment):

Code: [Select]
import pygame # import the pygame module

pygame.init() # initialize it (this must be done, but this only is the case for pygame, not in general for every library)

Logged

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 10312
  • Dust in a box under a table
Re: Porting GG2 to Python - PyGG2
« Reply #391 on: January 07, 2012, 12:41:22 pm »

I've heard that only works if pygame is in the same folder as the source of your project.

notajf

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #392 on: January 07, 2012, 01:09:57 pm »

I've heard that only works if pygame is in the same folder as the source of your project.
No, it also has a "search path" (basically a directory it will check afterwords), where pygame is installed.
Logged

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 10312
  • Dust in a box under a table
Re: Porting GG2 to Python - PyGG2
« Reply #393 on: January 07, 2012, 01:24:15 pm »

Yeah, but when I said 'import pygame' (the only line in the code, if it matters), python had a fit, or the window just closed really fast.

notajf

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #394 on: January 07, 2012, 01:25:11 pm »

Yeah, but when I said 'import pygame' (the only line in the code, if it matters), python had a fit, or the window just closed really fast.
You need to install it first
« Last Edit: February 16, 2024, 05:48:03 pm by MedO »
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to Python - PyGG2
« Reply #395 on: January 07, 2012, 01:35:44 pm »

Yeah, but when I said 'import pygame' (the only line in the code, if it matters), python had a fit, or the window just closed really fast.
Try adding "while True: pass" at the end.
The whole thing should hang, but you should be able to read an error, if there is any.
Logged

Meower

  • Elder God tier or Fagthulu, the great
  • Community Manager
  • *****
  • Karma: 230
  • Offline Offline
  • Posts: 22286
  • Went fat once, never went back
Re: Porting GG2 to Python - PyGG2
« Reply #396 on: January 08, 2012, 10:48:34 am »

How far is the project complete, percentage style?
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to Python - PyGG2
« Reply #397 on: January 08, 2012, 11:18:32 am »

How far is the project complete, percentage style?
~20%. +- 19%.
« Last Edit: January 08, 2012, 11:18:40 am by Orpheon »
Logged

notajf

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #398 on: January 08, 2012, 12:06:44 pm »

« Last Edit: January 08, 2012, 12:06:52 pm by ajf »
Logged

Meower

  • Elder God tier or Fagthulu, the great
  • Community Manager
  • *****
  • Karma: 230
  • Offline Offline
  • Posts: 22286
  • Went fat once, never went back
Re: Porting GG2 to Python - PyGG2
« Reply #399 on: January 08, 2012, 04:24:15 pm »

Well, not to tell you guys how to do your job, but when the whole thing'd be like, 80% done, you should probably notify people in Mods so they can stop fidgeting with their pirated game maker 8.0s and start learning some other language so they can start mod the new, better version.
Logged

MEDIK

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 272
  • winter is coming
Re: Porting GG2 to Python - PyGG2
« Reply #400 on: January 08, 2012, 04:38:28 pm »

Well, not to tell you guys how to do your job, but when the whole thing'd be like, 80% done, you should probably notify people in Mods so they can stop fidgeting with their pirated game maker 8.0s and start learning some other language so they can start mod the new, better version.

Python.
Logged



See you in another life brother

notajf

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #401 on: January 08, 2012, 04:40:19 pm »

Suddenly people think PyGG2 is a good idea.

I should work on my GML interpreter...
Logged

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16150
  • Yeah so now I have an idea
Re: Porting GG2 to Python - PyGG2
« Reply #402 on: January 08, 2012, 10:38:29 pm »

Well, not to tell you guys how to do your job, but when the whole thing'd be like, 80% done, you should probably notify people in Mods so they can stop fidgeting with their pirated game maker 8.0s and start learning some other language so they can start mod the new, better version.
Python is a free programming language, so I'm not so sure if transition will be a problem unless you want to invest in an expensive python ide (if one really exists, nightcracker/orpheon have been using notepad ++)

Everyone is welcome to pitch in in development, you know, although I haven't done jack
Logged

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Porting GG2 to Python - PyGG2
« Reply #403 on: January 09, 2012, 02:18:50 am »

Well, not to tell you guys how to do your job, but when the whole thing'd be like, 80% done, you should probably notify people in Mods so they can stop fidgeting with their pirated game maker 8.0s and start learning some other language so they can start mod the new, better version.
Python is a free programming language, so I'm not so sure if transition will be a problem unless you want to invest in an expensive python ide (if one really exists, nightcracker/orpheon have been using notepad ++)

Everyone is welcome to pitch in in development, you know, although I haven't done jack

In the beginning we have yes, but we've switched mostly to Komodo Edit (which is also free) because it allowed us to give a better overview of the project and it's files.

And about modding, I think we are going to try and make some secure modding model, which allows you to automatically play on modded servers without exposing your system to any risk.
« Last Edit: January 09, 2012, 02:20:53 am by nightcracker »
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to Python - PyGG2
« Reply #404 on: January 09, 2012, 03:26:18 am »

Well, not to tell you guys how to do your job, but when the whole thing'd be like, 80% done, you should probably notify people in Mods so they can stop fidgeting with their pirated game maker 8.0s and start learning some other language so they can start mod the new, better version.
Python is a free programming language, so I'm not so sure if transition will be a problem unless you want to invest in an expensive python ide (if one really exists, nightcracker/orpheon have been using notepad ++)

Everyone is welcome to pitch in in development, you know, although I haven't done jack

In the beginning we have yes, but we've switched mostly to Komodo Edit (which is also free) because it allowed us to give a better overview of the project and it's files.

And about modding, I think we are going to try and make some secure modding model, which allows you to automatically play on modded servers without exposing your system to any risk.
Secure model or not, we can still allow modding as it is now without any problem, so yeah.
Automatically downloading is for a feature that doesn't ~have~to be from the start, we can always add it at the end.

Suddenly people think PyGG2 is a good idea.

I should work on my GML interpreter...
:drool:
Maybe that's because it's a good idea?....

Well, not to tell you guys how to do your job, but when the whole thing'd be like, 80% done, you should probably notify people in Mods so they can stop fidgeting with their pirated game maker 8.0s and start learning some other language so they can start mod the new, better version.
We've already been telling to most modders informally that learning Python would be a good idea, if only to try to attract more PyGG2 devs.
But yeah, we'll do it officially as soon as it's clear that PyGG2 will replace gg2 soon.
Logged
Pages: 1 ... 25 26 [27] 28 29 ... 77
 

Page created in 0.025 seconds with 32 queries.