Scrolling Game Development Kit Forum
Welcome, Guest. Please login or register.
2010-09-08, 07:29:11 PM

Login with username, password and session length
Search:     Advanced search
8920 Posts in 1007 Topics by 168 Members
Latest Member: mogzdogz
* Home Help Search Login Register
+  Scrolling Game Development Kit Forum
|-+  SGDK Version 1
| |-+  Script
| | |-+  How do you make a net game use special functions?
« previous next »
Pages: [1] Print
Author Topic: How do you make a net game use special functions?  (Read 1114 times)
Pizzaman
Fanatic
***
Posts: 145


Current Project:The Speed of Pandomonia


View Profile Email
« on: 2008-01-17, 06:02:20 AM »

Don't say use SGDK this time, really, or I'll jump down another well again... (SEE PSEUDO 3D TOPIC) Kiss Wink       Angry
Logged
bluemonkmn
SGDK Author
Administrator
Fanatic
*****
Posts: 2146


2678251 BlueMonkMN@gmail.com
View Profile WWW Email
« Reply #1 on: 2008-01-17, 06:47:54 AM »

What's wrong with special functions in a network game?  Are you having problems because only the player sprite can trigger special functions? On player 1's system, player 2 doesn't trigger special functions and on player 2's system, player 1 doesn't trigger special functions -- is that the problem?  Network gaming is very complicated, and I don't think it would be possible to detail all the issues in a single post, but to summarize, you probably have to have a lot of communication about the state of the game in order to make sure both systems are in sync.  You probably have to devise some scheme to transfer inventory and position data for both players.  Maybe then the special functions don't need to be triggered on both ends because the only thing they could affect is the position and inventory anyway.
Logged

Pizzaman
Fanatic
***
Posts: 145


Current Project:The Speed of Pandomonia


View Profile Email
« Reply #2 on: 2008-01-17, 04:20:19 PM »

I tried every method of tweeking (I avoid scripts that aren't from the Net Game Demo) But I could never make player 2 use dynamic functions...( 2 Global functions that switch between sprites constantly without new inst.) And If I can't do that, can I at least make it pick up items and make the script apply to only 1 multiplayer map?? Grin Kiss       Angry ugly
Logged
bluemonkmn
SGDK Author
Administrator
Fanatic
*****
Posts: 2146


2678251 BlueMonkMN@gmail.com
View Profile WWW Email
« Reply #3 on: 2008-01-17, 09:27:26 PM »

I don't really remember now the net game demo works, but have you tried combining relevant pieces of the 2 player script with the net game demo script?  I wonder if player 2 was a scripted sprite instead of a normal sprite in the net game demo.  I think scripted sprites don't interact with functions, if I recall correctly.
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!