Ariane Soft PPL2 Pocket Programming DataMite
Old 05-03-2010, 05:07 PM
Nicknack Nicknack is offline
Senior Member
Join Date: Nov 2006
Location: Germany
Posts: 527
Talking Want to play with me???

here finally I finished this fat project somehow:
- a remake of my old minisock: TCP.ppl which lets you write multiplayer games fast and with little trouble. wether bluetooth pan or internet, as long you have an ip addresss this code will work. if used correctly no blocking programs and the server can constantly add clients thanks to threading (see attached screenshot of my chat example). it is that simple, try it out! I have included a nearly complete 2 player tron game with online support.
- for the online support I have added a extra code file: net.ppl. It features several function to connect to my webserver and make information availabe to any on the internet. just register your game and if your port is open, everybody can see and connect to your game (if you are behind a router, you must forward your used port to be able to host games). if you interested, you can use your own webserver, you need only php and mysql. ask me for the needed php code.
- gui.ppl is a remake of ui.ppl and let you create a sprite based graphical user interface. it features buttons, checkboxes, editboxes, listboxes and captions. every graphical item is menu sorted, you can switch between menus with a single command. see my gui system in action in the tron game.

all and everything is open source, three examples are included, every command is shortly documented and it should work for every PPL version and on every device. just download it and play around with the examples.
if this doesn't motivate you to start coding I don't know what else

there is a bug with threads, so sometimes it just chrash. hopefullly kornalius will sort this out with next release
Attached Thumbnails
Click image for larger version

Name:	chat.PNG
Views:	2056
Size:	133.2 KB
ID:	333   Click image for larger version

Name:	tron.PNG
Views:	2044
Size:	19.6 KB
ID:	334   Click image for larger version

Name:	gui.PNG
Views:	2060
Size:	45.3 KB
ID:	335  
Attached Files
File Type: zip (270.1 KB, 3001 views)

Last edited by Nicknack; 05-03-2010 at 07:36 PM.
Reply With Quote
Old 05-04-2010, 03:53 PM
c4esar c4esar is offline
Join Date: Mar 2009
Location: Germany
Posts: 41
Thumbs up

Cooool Stuff!
Reply With Quote
Old 05-04-2010, 08:08 PM
zehlein zehlein is offline
Senior Member
Join Date: Sep 2006
Location: Leipzig, Germany
Posts: 596

One simpel thing to add: WOW!
Reply With Quote
Old 05-13-2010, 08:03 AM
Mike Halliday Mike Halliday is offline
Senior Member
Join Date: Sep 2007
Location: Crewe, Cheshire, UK
Posts: 821
Send a message via Skype™ to Mike Halliday


PPL instant messaging! - Now if we can get some 256bit encryption from PPL we could have a really secure IM session! Kornalius should incorporate this into the next release of the IDE so we can see who is developing and chat to them???
Reply With Quote
Old 05-15-2010, 05:53 PM
Nicknack Nicknack is offline
Senior Member
Join Date: Nov 2006
Location: Germany
Posts: 527

thanks for the nice comments gals ;D
@Mike: great idea, but it would be better implemented in UDP. with UDP you would have simple NAT punching and you wouldn't have to forward a port.
the downside: UDP is really unreliable and I was too lazy to make it more reliable for sensible use. if you make it correctly you would have sth. similar reliable as TCP, but in comparison worse in speed and cleverness. why reinventing the wheel? and with Ipv6 we don't need NATs anymore. maybe its already possible to use Ipv6, I'll look into this.

Last edited by Nicknack; 05-15-2010 at 06:00 PM.
Reply With Quote
Old 08-08-2010, 02:36 PM
juppmaifeld juppmaifeld is offline
Join Date: Aug 2009
Posts: 43

Hi Nicknack,

I just tried to get the chat example running with ppl 1.53 pro. It failed because ppl 1.53 dosen't know the expresion "var(buffer$, sz$)" in

func tcp_recv(s$, sz$)

local(buffer$, read$);

//var(buffer$, sz$);

// PPL 1.53 dosen't know "var(buffer$, sz$);" therfore I used ->
SDIM(buffer$, TBYTE, sz$);

if (s$ == 0)
s$ = tcp_socket$;

read$ = recv(s$, &buffer$, sz$, 0);

if (read$ < 0)
return ( - 1);
setbyte(&buffer$ + read$, 0);
return (char(buffer$));

To get it running I used "SDIM(buffer$, TBYTE, sz$);" instead of "var(buffer$, sz$);" . It worked but I am not sure whether I will run into a memory problem because I do not explicitly free buffer$ at the end of the function. I hope ppl's garbage collector will take care of it. Am I wrong? Is there an other workaround for var(buffer$, sz$);?

Realy good stuff what you have done.

Reply With Quote
Old 08-08-2010, 09:18 PM
Nicknack Nicknack is offline
Senior Member
Join Date: Nov 2006
Location: Germany
Posts: 527

as far I remember is type() the best complement to var() and objects should be the only variables which have to be freed.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:06 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.
Copyright © 2009 - All rights reserved
Web Design by BR Web Consulting Ltd