Jump to content


Photo

Doogie's 39dll Example Thread


  • Please log in to reply
44 replies to this topic

#1 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 811 posts
  • Version:GM:Studio

Posted 06 March 2008 - 08:26 AM

Information:
Whenever I feel like making an example of the 39dll I will post the example here for the people of GMC to use, I try to make them as effecient and in-sync as I possibly can.

All versions will contain a gmd and a gm6.

Port Forwarding:
14804 - TCP
14806 - UDP

Back to Basics:

This is a very simple example, it uses an account system and uses a laggy method of movement.

Update 2.1:
*- Added Chat System
*- Clients are disconnected as soon as the server ends now.
*- Included Basics with Server Side Spawning examples.
*- Lowered D/C Times for Client. (Dropped from 16000 milliseconds to 12000 milliseconds)

Update 2.1.2:
*- Fixed Name Centering.
*- Registering no longer ends the game.
*- Fixed Un-Successful Login Bug.

Update 2.1.4:
*- Fixed Creation Code bug.

Download 2.0.0
Download 2.1.0
Download 2.1.2
Download 2.1.4

Platforming Basics:

This has a basic platforming engine, it was built off the previous engine, it has smooth movement.

Update 2.1:
*- Added Chat System
*- Clients are disconnected as soon as the server ends now.
*- You can turn off drawing in the GM6 version, this will lower CPU usage when you aren't watching players on the server (F1 is the magic button.)
*- Lowered D/C Times for Client. (Dropped from 16000 milliseconds to 12000 milliseconds)
*- Fixed new player vspeed syncing.
*- Fixed x movement vspeed syncing.

Update 2.1.2:
*- Fixed Name Centering.
*- Registering no longer ends the game.
*- Fixed Un-Successful Login Bug.

Update 2.1.3:
*- Fixed a bug where jumping was glitchy for the Server and other clients.

Update 2.1.4:
*- Fixed Creation Code bug.

Download 2.0.0
Download 2.1.0
Download 2.1.2
Download 2.1.3
Download 2.1.4

8-Directional Movement:

This is the back to basics example except for the fact that it uses smooth movement.

Update 2.1.2:
*- Fixed Name Centering.
*- Registering no longer ends the game.
*- Fixed Un-Successful Login Bug.

Update 2.1.4:
*- Fixed Creation Code bug.

Download 2.1.1
Download 2.1.2
Download 2.1.4

More Information:
When you look at the code you notice I use scripts like writex() and writey()

This is so later you can change the map size and the amount of data sent. Example if you were to increase the map past 32000 (roughly), then you would probably want to replace all the x writing codes to writeint() but this is an annoying hassle if you have to replace every lick of code to fit your new map size, so I decided to make it like this.

Credits:
* Jakethesnake, for helping me learn some tips and tricks along the way.
* Meiun for inspiration to learn how to make an awesome online game like his.
* 39ster for his dll of course.


Edited by Doogie_Forever, 11 April 2008 - 12:41 PM.

  • 0

#2 Bomb505

Bomb505

    A Holy Angel

  • New Member
  • 223 posts

Posted 06 March 2008 - 08:58 AM

*Drops Jaws* "Again" Wow...

What else is there to say?
  • 0

#3 Ampersand

Ampersand

    Greatest boolean of all

  • New Member
  • 796 posts

Posted 06 March 2008 - 11:10 PM

I like it... But with 39dll I tend more to turn to the route of a separate server. But nonetheless, its good, and I really like the quick code idea. Also, It would be positively easy to make this a separate server engine. 9.5/10 because its not perfect. I have yet to see the perfect GM compilation.
  • 0

#4 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 811 posts
  • Version:GM:Studio

Posted 08 March 2008 - 01:12 AM

I like it... But with 39dll I tend more to turn to the route of a separate server. But nonetheless, its good, and I really like the quick code idea. Also, It would be positively easy to make this a separate server engine. 9.5/10 because its not perfect. I have yet to see the perfect GM compilation.

<{POST_SNAPBACK}>


Keeping the Server and Client in one source is a good idea because its easy to edit everything on one interface.

Before releasing your game, simply save it as a new source-code file (gmd,gm6) and then delete the server folders and such.

Then compile. That's what I did for my Sky Riders Game.
  • 0

#5 matty_richo

matty_richo

    GMC Member

  • GMC Member
  • 470 posts
  • Version:GM8

Posted 09 March 2008 - 10:01 PM

any news on a new example?
  • 0

#6 Ampersand

Ampersand

    Greatest boolean of all

  • New Member
  • 796 posts

Posted 10 March 2008 - 01:25 AM

Hmm. So, Doogie, in theory I could just make a Client and a Server gm6, and delete just the server files in one and the clients in another? Ill try that.
  • 0

#7 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 10 March 2008 - 02:15 AM

No clue on what you said...I tried to answer...
  • 0

#8 mme

mme

    MME

  • GMC Member
  • 1007 posts

Posted 10 March 2008 - 04:18 AM

Looking good so far :(

Edited by mme, 10 March 2008 - 04:24 AM.

  • 0

#9 hotshotscott

hotshotscott

    GMC Member

  • New Member
  • 3483 posts

Posted 10 March 2008 - 09:38 AM

I have always wanted to learn how to make online games, i'll give it a try. I've given other engines a try, and have given up, but hopefully this one will be easy to work with :(

EDIT
Looks great so far, this is the first example i've been able to work with :) :D ;) :angry:
For the next version, could you please add chatting, and also, one thing that many engines don't have, is creating instances? Such as bullets ect

Thanks, keep up the great work!

Scotty

Edited by hotshotscott, 10 March 2008 - 09:52 AM.

  • 0

#10 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 10 March 2008 - 12:32 PM

ONL1N3's is possibly easier...By the looks of it...this one is like that too :(
  • 0

#11 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 10 March 2008 - 10:41 PM

This is a great engine! I thought I found a bug... but I didn't, it worked perfectly. The platformer has great movement. Kudos to the MAX...
NEWB language: T)-(!5 \/\/A5 U8ER A\/\/E50ME !!!

No seriously, this was very well made, I can't wait to restart my Online game I was planning last year that never really started :D

:( Doogie's 39DLL Example :)
  • 0

#12 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 811 posts
  • Version:GM:Studio

Posted 11 March 2008 - 05:43 AM

I have always wanted to learn how to make online games, i'll give it a try. I've given other engines a try, and have given up, but hopefully this one will be easy to work with :D

EDIT
Looks great so far, this is the first example i've been able to work with :) :P ;) :)
For the next version, could you please add chatting, and also, one thing that many engines don't have, is creating instances? Such as bullets ect

Thanks, keep up the great work!

Scotty

<{POST_SNAPBACK}>


I'll include chatting in both examples, I'll also add creating instances. :P
  • 0

#13 matty_richo

matty_richo

    GMC Member

  • GMC Member
  • 470 posts
  • Version:GM8

Posted 11 March 2008 - 06:24 AM

sounds good doogie cant wait to see them :D
  • 0

#14 hotshotscott

hotshotscott

    GMC Member

  • New Member
  • 3483 posts

Posted 11 March 2008 - 07:28 AM

I have always wanted to learn how to make online games, i'll give it a try. I've given other engines a try, and have given up, but hopefully this one will be easy to work with :D

EDIT
Looks great so far, this is the first example i've been able to work with :) :P ;) :)
For the next version, could you please add chatting, and also, one thing that many engines don't have, is creating instances? Such as bullets ect

Thanks, keep up the great work!

Scotty

<{POST_SNAPBACK}>


I'll include chatting in both examples, I'll also add creating instances. :P

<{POST_SNAPBACK}>

Great that would be awesome. If you could make a script which was like 'instance_create_object(x,y,object)' that would be awesome, and we could just use that for when we need to create the object, in both screens. Can't wait to see what you do with it, this is really helping! Thanks!

Scotty
  • 0

#15 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 811 posts
  • Version:GM:Studio

Posted 11 March 2008 - 08:26 AM

Basic MO example updated,

Platformer Example update coming soon.

EDIT: Platformer Example update has arrived.

Edited by Doogie_Forever, 11 March 2008 - 09:36 AM.

  • 0

#16 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 11 March 2008 - 02:22 PM

Wow, already an update, this is awesome! I thank you once again, it simply blowed my mind. The chat system is great (with the SERVER and everything), and with all those other features, you're almost making the game for everyone :D
  • 0

#17 BattleRifle BR55

BattleRifle BR55

    Moo

  • GMC Member
  • 8246 posts
  • Version:GM7

Posted 11 March 2008 - 02:39 PM

Nice! I think I may use this as a template for my FPS.
  • 0

#18 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 11 March 2008 - 04:01 PM

Does the second one have all the first one's features?
  • 0

#19 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 811 posts
  • Version:GM:Studio

Posted 12 March 2008 - 01:56 AM

Does the second one have all the first one's features?

<{POST_SNAPBACK}>


Yes it does.

If the versions match, they have each others features.
  • 0

#20 hotshotscott

hotshotscott

    GMC Member

  • New Member
  • 3483 posts

Posted 12 March 2008 - 09:27 AM

Awesome thanks so much! Please make the next version be able to create instances on all screens. Please make it commented and easy to understand!

Your drawing the name code didn't work real well so i changed it, now it works perfectly. Do this in the script draw_center.

{
draw_set_halign(fa_center)
draw_text(argument0,argument1,argument2)
draw_set_halign(fa_left)
}

Then make sure you center your player sprites. Also add this in the remote players draw event:
{
 //Draw Character
 draw_sprite_ext(sprite_index, image_index, x, y,image_xscale,image_yscale,0,-1,1);
 //Draw Name
 draw_center(x, y-40, username);
}

and this in the players draw event:
{
 //Draw Character
 draw_sprite_ext(sprite_index, image_index, x, y,image_xscale,image_yscale,0,-1,1);
 //Draw Name
 draw_center(x, y-40, global.username);
}

Thanks mate!

Scotty

Edited by hotshotscott, 12 March 2008 - 09:36 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users