May 18, 2024, 06:16:40 pm

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 ... 28 29 [30] 31 32 ... 77

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

Nukleus

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #435 on: January 11, 2012, 04:32:35 am »

Nightcracker, how do I install Pygrafix?
Logged

cspotcode

  • Coder
  • Administrator
  • *****
  • Karma: 134
  • Offline Offline
  • Posts: 412
Re: Porting GG2 to Python - PyGG2
« Reply #436 on: January 11, 2012, 07:40:21 am »

Regarding map formats, I think you'll like what I came up with.  IIRC Medo and I already talked about it way back when.

For the .metadata file, it would be a JSON file (or YAML, something simple)  It would define everything about the map: entities, names, timers, game mode, and what images to use for background & walkmask.  And everything would be packed in a zip.

I disagree about using a third image for metadata, for the same reason Medo does.  Additionally, it would be difficult to have entities with custom properties, or complex entity-to-entity connections.

Regarding placing multiple game modes in a single file, I think it would only be worth it if those modes could somehow share resources.  That is, there might be a base.metadata file that defines the placement for entities common to all game modes.  Then other ctf.metadata and cp.metadata files would contain mode-specific content.  The implementation details (multiple metadata files vs single file with an appropriate data structure) aren't set in stone.
Logged
"The knack of flying is learning how to throw yourself at the ground and miss."
- Douglas Adams

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1752
Re: Porting GG2 to Python - PyGG2
« Reply #437 on: January 11, 2012, 07:53:51 am »

Regarding map formats, I think you'll like what I came up with.  IIRC Medo and I already talked about it way back when.
We did, I'll copy the thread to this board in a moment.

[/quote]Regarding placing multiple game modes in a single file, I think it would only be worth it if those modes could somehow share resources.  That is, there might be a base.metadata file that defines the placement for entities common to all game modes.  Then other ctf.metadata and cp.metadata files would contain mode-specific content.  The implementation details (multiple metadata files vs single file with an appropriate data structure) aren't set in stone.
[/quote]
I just see no advantage in this except saving space, and since our maps are not exactly huge this is a non-issue, compared to the extra complexity it would add to the map system.

It might be an advantage to support something like this on the tool side of things, but from there you can always compile to a set of individual maps.

Edit: Voilà
« Last Edit: January 11, 2012, 07:56:30 am by MedO »
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

cspotcode

  • Coder
  • Administrator
  • *****
  • Karma: 134
  • Offline Offline
  • Posts: 412
Re: Porting GG2 to Python - PyGG2
« Reply #438 on: January 11, 2012, 08:00:19 am »

It might be an advantage to support something like this on the tool side of things, but from there you can always compile to a set of individual maps.

My thoughts exactly.  It might save mappers time and effort.
Logged
"The knack of flying is learning how to throw yourself at the ground and miss."
- Douglas Adams

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Porting GG2 to Python - PyGG2
« Reply #439 on: January 11, 2012, 08:23:28 am »

Regarding map formats, I think you'll like what I came up with.  IIRC Medo and I already talked about it way back when.

For the .metadata file, it would be a JSON file (or YAML, something simple)  It would define everything about the map: entities, names, timers, game mode, and what images to use for background & walkmask.  And everything would be packed in a zip.

I disagree about using a third image for metadata, for the same reason Medo does.  Additionally, it would be difficult to have entities with custom properties, or complex entity-to-entity connections.

Regarding placing multiple game modes in a single file, I think it would only be worth it if those modes could somehow share resources.  That is, there might be a base.metadata file that defines the placement for entities common to all game modes.  Then other ctf.metadata and cp.metadata files would contain mode-specific content.  The implementation details (multiple metadata files vs single file with an appropriate data structure) aren't set in stone.

JSON, definitely JSON (NOT XML!~!!!!R!@$%!@TJ#G@UI). Python can also load JSON with the std lib, so that's fine.

I also have another random idea, the map maker could (if he wants to) make a preview image of the map, put it in the zip and link to it in the metadata. Just an idea.
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 #440 on: January 11, 2012, 08:35:06 am »

What's JSON?

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Porting GG2 to Python - PyGG2
« Reply #441 on: January 11, 2012, 08:37:20 am »

What's JSON?

JSON is a lightweight standardized data interchange format. It's just plain text, so you can easily read/write it. It is based on JavaScript, but many programming languages can parse/generate it. Read more here: http://www.json.org/.
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to Python - PyGG2
« Reply #442 on: January 12, 2012, 08:37:09 am »

Nightcracker, can you please move to a separate temp branch next time you do something that breaks the game until it's done?
Like, either leave the old systems and hooks in place at the last minute, or preferably, make another branch that we can merge later.

Because right now there is no way to pull without using old commits, and no way to push altogether with the broken pygrafix.
Logged

Nukleus

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #443 on: January 13, 2012, 08:57:18 am »

Still busy learning pygame :P
So far I can move three squares around the screen and bounce off edges.
I'll get there. One day.
Logged

MTK5012

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 773
  • if (ping <= 150) jaw.y += 100;
Re: Porting GG2 to Python - PyGG2
« Reply #444 on: January 13, 2012, 09:04:21 am »

is python easier than C++
coz i can't understand a shit in c++

Nukleus

  • Guest
Re: Porting GG2 to Python - PyGG2
« Reply #445 on: January 13, 2012, 09:05:51 am »

Easier than GML
Well not really, but close to it.
If you want to learn, read this: http://www.ibiblio.org/swaroopch/byteofpython/files/120/byteofpython_120.pdf
Logged

nightcracker

  • NC
  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 516
  • PyGG2 dev
    • NC Labs
Re: Porting GG2 to Python - PyGG2
« Reply #446 on: January 13, 2012, 10:22:27 am »

Easier than GML
Well not really, but close to it.
If you want to learn, read this: http://www.ibiblio.org/swaroopch/byteofpython/files/120/byteofpython_120.pdf

Easier to learn is a bit though to say. GML is quite easy to learn and even quite easy to master. The language has few features, so that's logical.

Python is a much bigger language making it slightly harder to learn and exponentially harder to master. The language has a shitload of features, I still discover them every day.
Logged

cspotcode

  • Coder
  • Administrator
  • *****
  • Karma: 134
  • Offline Offline
  • Posts: 412
Re: Porting GG2 to Python - PyGG2
« Reply #447 on: January 13, 2012, 02:42:01 pm »

I was reading through the PyGG2 code, trying to grok everything.  I noticed that, every frame, you're completely copying every single entity.  Surely that won't scale well.  Is there a good reason for that design decision?

I'm not trying to suggest we embark on some premature optimization, but this seems like a strange design choice and is in a core part of the engine; it would be difficult to refactor later.
Logged
"The knack of flying is learning how to throw yourself at the ground and miss."
- Douglas Adams

MTK5012

  • 2011 Haxxy Finalist
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 773
  • if (ping <= 150) jaw.y += 100;
Re: Porting GG2 to Python - PyGG2
« Reply #448 on: January 13, 2012, 11:27:19 pm »

what is the differents of C++,Java and Python?
in my mind:
C++:fast as hell but very hard to code,do powerful stuff but have little functions(i learned 12%)
Java:Normal,in the middle,the reason why i don't like java is every java game i had seen had to work on browser,i want stand-alone! (not count MineCraft,that's the launcher,not the game itself)
Python:faster than gmk but slower than C++,easy to learn and has many functions

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12532
  • Another one --
Re: Porting GG2 to Python - PyGG2
« Reply #449 on: January 14, 2012, 02:22:56 am »

hahahahhg
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters
Pages: 1 ... 28 29 [30] 31 32 ... 77
 

Page created in 0.026 seconds with 33 queries.