May 13, 2024, 11:43:01 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 ... 3 4 [5] 6 7 ... 77

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

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to another Language - New Thread
« Reply #60 on: August 30, 2011, 03:24:42 am »

Great. Would you guys like to leave it open as a community thing, or would you like to put this somewhere and organize tasks as a team?
I think we'll leave it open atm.

If you have wishes of something particular you want to do, just say it an do it.

I don't think a core team is necessary yet, we are so few. Those who ever looked at the source are probably inside the core team  :hehe:


Priority now is probably the collision response, but don't go and do big stuff until I upload what I already have done.

If you absolutely want to, here are the functions you could use:

Code: [Select]
functions.place_free(x, y, wallmask)Obvious, checks whether a point is free in the wallmask.

Code: [Select]
objectCheckCollision(character, wallmask)Checks whether that object hits the wallmask somewhere.


Actually, I've already improved it a bit compared to what I just posted before, and I'm almost done with getting a git repos ready.
I'll upload everything as soon as I get home.
« Last Edit: August 30, 2011, 09:41:09 am by Orpheon »
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to another Language - New Thread
« Reply #61 on: August 30, 2011, 06:16:30 am »

Git Repository

Go and fork it, and then go work on the collision response (the second script in collision.py; characterHitObstacle()).
Logged

pandaturds

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 224
  • gg2oomer
Re: Porting GG2 to another Language - New Thread
« Reply #62 on: August 30, 2011, 09:02:37 am »

This looks awesome. :c1:
Logged
r.i.p [AT] / [THA]
bird goes tweet

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to another Language - New Thread
« Reply #63 on: August 30, 2011, 09:22:10 am »

Also, I got this:

My own collision code; written from scratch.

It works somewhat better than the ported gg2 one, and it's a great deal cleaner, but it doesn't even pretend to support stairs yet and is also quite buggy.

At least it's concept is simple.

Screenies:

Of course, you don't see how the collision engine is going, you're gonna have to try it out first :)
« Last Edit: August 30, 2011, 09:25:02 am by Orpheon »
Logged

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Porting GG2 to another Language - New Thread
« Reply #64 on: August 30, 2011, 09:59:37 am »

I'll probably work primarily on gameplay most (sentry logic, weapons, kills, round management, etc). Networking isn't exactly my field.

OFF TOPIC: Today, as a Rifleman, I shot an enemy Rifleman the instant they shot me.
Quote from: Kill-Log
Flaw (sniper) The End [be]
The End [be] (sniper) Flaw
« Last Edit: February 16, 2024, 04:49:43 pm by MedO »
Logged

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6409
  • Developer
Re: Porting GG2 to another Language - New Thread
« Reply #65 on: August 30, 2011, 10:22:20 am »

I'll probably work primarily on gameplay most (sentry logic, weapons, kills, round management, etc). Networking isn't exactly my field.

OFF TOPIC: Today, as a Rifleman, I shot an enemy Rifleman the instant they shot me.
Quote from: Kill-Log
Flaw (sniper) The End [be]
The End [be] (sniper) Flaw
Ok. Nice idea, because those things are tedious.
Still need to get that blasted collision code working.
Also, update to that code.
« Last Edit: February 16, 2024, 04:50:10 pm by MedO »
Logged

Psychopath

  • Developer In Training
  • ******
  • Karma: 167
  • Offline Offline
  • Posts: 6682
  • Stop telling me to do things
Re: Porting GG2 to another Language - New Thread
« Reply #66 on: August 30, 2011, 10:31:41 am »

OFF TOPIC: Today, as a Rifleman, I shot an enemy Rifleman the instant they shot me.
Quote from: Kill-Log
Flaw (sniper) The End [be]
The End [be] (sniper) Flaw
This happens because the hitscan code is called in the step and death script is called in the end step. Because of order of operation of those events, it is possible for two people to kill one another with any weapon; it happens with Rifles, Autoguns, Knives, explosives and every projectile. If we changed it to run the death script immediately after damage is dealt (I don't think you'd want to do that unless you just called a script that dealt damage that would in turn call the death script if the victim's health is low enough), that could work. Although it'd be a bit of a headache to redo, but hey, this is a rewrite, it can be done that way from the ground up if need be.
Logged
Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: :o

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Porting GG2 to another Language - New Thread
« Reply #67 on: August 30, 2011, 10:41:33 am »

OFF TOPIC: Today, as a Rifleman, I shot an enemy Rifleman the instant they shot me.
Quote from: Kill-Log
Flaw (sniper) The End [be]
The End [be] (sniper) Flaw
This happens because the hitscan code is called in the step and death script is called in the end step. Because of order of operation of those events, it is possible for two people to kill one another with any weapon; it happens with Rifles, Autoguns, Knives, explosives and every projectile. If we changed it to run the death script immediately after damage is dealt (I don't think you'd want to do that unless you just called a script that dealt damage that would in turn call the death script if the victim's health is low enough), that could work. Although it'd be a bit of a headache to redo, but hey, this is a rewrite, it can be done that way from the ground up if need be.

Okay.

Also, for this system, I recommend that we use a more method-based way of handling health and death.
More precisely, there's a .damage function on Character objects that can be called to inflict damage. Arguments could be amount, source and type, for example. That function would take care of subtracting health and other stuff. Then, it would also check if health was <= 0, then it would proceed to call the .kill, .onDeath, or .death (dunno about name) function which would take care of transmitting the death, removing player object, giving points, etc.
Logged

Psychopath

  • Developer In Training
  • ******
  • Karma: 167
  • Offline Offline
  • Posts: 6682
  • Stop telling me to do things
Re: Porting GG2 to another Language - New Thread
« Reply #68 on: August 30, 2011, 10:43:00 am »

OFF TOPIC: Today, as a Rifleman, I shot an enemy Rifleman the instant they shot me.
Quote from: Kill-Log
Flaw (sniper) The End [be]
The End [be] (sniper) Flaw
This happens because the hitscan code is called in the step and death script is called in the end step. Because of order of operation of those events, it is possible for two people to kill one another with any weapon; it happens with Rifles, Autoguns, Knives, explosives and every projectile. If we changed it to run the death script immediately after damage is dealt (I don't think you'd want to do that unless you just called a script that dealt damage that would in turn call the death script if the victim's health is low enough), that could work. Although it'd be a bit of a headache to redo, but hey, this is a rewrite, it can be done that way from the ground up if need be.

Okay.

Also, for this system, I recommend that we use a more method-based way of handling health and death.
More precisely, there's a .damage function on Character objects that can be called to inflict damage. Arguments could be amount, source and type, for example. That function would take care of subtracting health and other stuff. Then, it would also check if health was <= 0, then it would proceed to call the .kill, .onDeath, or .death (dunno about name) function which would take care of transmitting the death, removing player object, giving points, etc.

Don't forget the person dealing the damage in that too or we'd just have what people died to and not who. Also, kill assist tracking would go in there. It's not that complex, just tedious.
Logged
Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: :o

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Porting GG2 to another Language - New Thread
« Reply #69 on: August 30, 2011, 10:46:16 am »

Don't forget the person dealing the damage in that too or we'd just have what people died to and not who. Also, kill assist tracking would go in there. It's not that complex, just tedious.

Arguments could be amount, source and type, for example
source; origin of the damage (what is dealing it)
Logged

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Porting GG2 to another Language - New Thread
« Reply #70 on: August 30, 2011, 10:46:39 am »

don't forget the person dealing the damage

Quote from: Flaw
Arguments could be amount, source and type, for example
source; origin of the damage (what is dealing it)
« Last Edit: August 30, 2011, 10:47:56 am by Flaw »
Logged

notajf

  • Guest
Re: Porting GG2 to another Language - New Thread
« Reply #71 on: August 30, 2011, 10:49:35 am »

By the way,

for this project, I'd like it if GG2's event system was more asynchronous. We have the wonderful Twisted asynchronous networking here, why not asynchronous in-game events? Should we even keep the current step system? Although it would be quicker to copy the current design, a better, non-framerate-limited design might be a better idea.
Logged

Psychopath

  • Developer In Training
  • ******
  • Karma: 167
  • Offline Offline
  • Posts: 6682
  • Stop telling me to do things
Re: Porting GG2 to another Language - New Thread
« Reply #72 on: August 30, 2011, 10:59:13 am »

don't forget the person dealing the damage

Quote from: Flaw
Arguments could be amount, source and type, for example
source; origin of the damage (what is dealing it)
What: a weapon

There is no guarantee that the weapon exists in memory when the damage is dealt.

Who: the person using the weapon

Because it is based upon the player ID and not their physical presence, this will always work unless they leave the server before the damage is dealt. In that case, default to a constant that represents an invalid player but won't register as an error.
Logged
Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: :o

Flaw

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 109
Re: Porting GG2 to another Language - New Thread
« Reply #73 on: August 30, 2011, 11:00:15 am »

don't forget the person dealing the damage

Quote from: Flaw
Arguments could be amount, source and type, for example
source; origin of the damage (what is dealing it)
What: a weapon

There is no guarantee that the weapon exists in memory when the damage is dealt.

Who: the person using the weapon

Because it is based upon the player ID and not their physical presence, this will always work unless they leave the server before the damage is dealt. In that case, default to a constant that represents an invalid player but won't register as an error.

The initial origin of the damage is the player.
Logged

Psychopath

  • Developer In Training
  • ******
  • Karma: 167
  • Offline Offline
  • Posts: 6682
  • Stop telling me to do things
Re: Porting GG2 to another Language - New Thread
« Reply #74 on: August 30, 2011, 11:07:45 am »

The initial origin of the damage is the player.
This is why you don't call people "what."

People are "who."
Logged
Quote from: IRC
(8:01:46 PM) Psychopath: I'm just wondering what the next hot thing to fall on my lap will be
(8:01:57 PM) Lynn1: a girl maybe?
(8:02:01 PM) Psychopath: :o
Pages: 1 ... 3 4 [5] 6 7 ... 77
 

Page created in 0.037 seconds with 32 queries.