Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

showloco

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Everything posted by showloco

  1. hello, i have a question about the scriptcontrol in vb6 it it possible to connect it to variables out of his script?, or to text boxes of form, or to modules? if yes, how? thanks, John :)
  2. This is my new AutoUpdater which you can use any free webhost with ftp to use it, or use Apache, Warmpserver etc. to use it. so this is the auto updater logic: Open client -> run Autoupdater -> if new update found close the client -> download the updater -> updater auto runable after downloded open the client again -> redo until there is no new version. if you have 0.2 and the global version is 0.4 it will download 0.3 and then automatically will download 0.4 :)! How to setup the updater: First of all, create a Data folder and put inside two images, the form background image and name it: "bg2.png" and an icon and name it "2.co". Also create a "Version.txt" in the main folder and write inside a "0". now download c# (it's free) from the next link: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express now create a new project. Here is the code i made for the autoupdater: ``` //Created by ShowLoco using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Net; using System.Diagnostics; using System.Runtime.InteropServices; using Microsoft.Win32; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } string clientname = "Showloco",clientname2 = "Showloco - the best mmorpg"; // the name of your game (Window name to close). string url = "www.showloco.com/"; // here put youre webhost url, or your ip if your using Apache Wampserver or w/e, don't forget the '/' in the end!!!! string versionlocation = "patch/version.txt"; // here you put the version file location on the url. in this file write your correct global version. string patcheslocation = "paches/"; //This is the location where we going to save the patches, again don't forget the '/' in the end!!! string filename = "showloco.rar"; // the name of the files to .rar. double version,version2; // here we will save the current client version. version2 is the global version. [DllImport("user32.dll")] // import dll. public static extern int FindWindow(string ipclass, string windowname); // make a find Windows function [DllImport("user32.dll")] // import dll. public static extern int SendMessage(int hw, uint message, int wpa, int ipa); // message the windows. public const int syscom = 0x0112; // sys command. public const int closewin = 0xF060; // close command. WebClient versionserverdownloder = new WebClient(); // our Downloder basec webclient, this one we will use to check the global version. WebClient downloader = new WebClient(); //Our Downloder basic webclient, this one we will use to download the new version. Label status = new Label(); // We will create a new label named status. ProgressBar downloadstatus = new ProgressBar();// we will create a new progress bar. DateTime beforedownload, now; // Saveing the time for the download speed. string folderlocation = Application.ExecutablePath.ToString().Replace(Path.GetFileName(System.Reflection.Assembly.GetEntryAssembly().Location), ""); // getting folder location. private void Form1_Load(object sender, EventArgs e) { status.Location = new Point (0,20); // we will place status in x 0 y 20. Controls.Add(status); // we will add status as a new control(Create it on a form). this.Name = "ShowLoco Auto Update"; // The name of the form that you want. this.BackgroundImage = Image.FromFile(folderlocation + @"\Data\bg2.png"); // Your Background image location (Create a Data folder and put your background image and name it "bg2.png". this.Icon = new Icon("Data/2.ico"); // Your icon for the form. put one on the Data folder and name it 2.ico. // Form size. this.Width = 300; this.Height = 200; try { StreamReader read1 = new StreamReader(folderlocation + @"Version.txt"); // try to read our version.txt file. version = double.Parse(read1.ReadLine()); //Get the version and save it on the version double. we gonna save it as a double. read1.Close(); // we will close the reader. } catch { MessageBox.Show("Error to get to the Version.txt file"); // Ths file may be deleted or in use. Application.Exit(); // we will exit the application. } try { version2 = double.Parse(versionserverdownloder.DownloadString(url + versionlocation)); // Here we will take our global version and save it in version2. } catch { MessageBox.Show("Error to get to the version file"); // in this case it may be a wrong url, or version file doesn't exist. Application.Exit();// we will exit the application. } if (version == version2) //If the versions are equal, that mean we don't have any new version. { Application.Exit(); // We will close the updater. } else //if they aren't equal, so we do have a new version. { downloader.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(downloaderinprogress); // While downloding, we want to print information like speed and etc. downloader.DownloadFileCompleted += new AsyncCompletedEventHandler(downloadcomplete); //Add the download complete sub. status.Location = new Point(0, 20); // we will place status in x 0 y 20. status.Height = 10; // add some height. status.Width = 100;// add some wight. Controls.Add(status); // we will add status as a new control(Create it on a form). downloadstatus.Location = new Point(0, 60);// We will place the progressBar. downloadstatus.Width = 300; // we will add some width;. downloadstatus.Height = 30; // we will ad some height. Controls.Add(downloadstatus); // we will add the progressbar to form. beforedownload = DateTime.Now; // take time for the download speed. version = version + 0.1; downloader.DownloadFileAsync(new Uri(url + patcheslocation + version + "/" + filename), "newpatch.exe"); // we will download a new patch and save it as "newpatch.exe". } } private void downloaderinprogress(object sender, DownloadProgressChangedEventArgs e) { downloadstatus.Value = e.ProgressPercentage; // Progressbar will work by the precentage of the download. now = DateTime.Now; // take the time now for the download speed. FileInfo getfileinfo = new FileInfo("newpatch.exe"); // making a fileinfo to take information from the newpatch.exe file. double speed = (getfileinfo.Length * 8) / (beforedownload - now).TotalSeconds; // calculate the download speed (file length * by 8 (We want it to in larger bytes) and divide it by the seconds we had from the time we started to downlaod the file. status.Text = "Downloading a new patch " + e.ProgressPercentage.ToString() + "% Speed: " + speed + "Correct version: " + (version - 0.1).ToString() + "Global Version: " + version2; // print information in status label. } private void downloadcomplete(object sender, AsyncCompletedEventArgs e) { Process.Start("newpatch.exe"); // we will run the new patch. Application.Exit(); // exit the auto updater. } private void Closewindow() { int getclose = FindWindow(clientname,clientname2); // find the Window to close if (getclose > 0) { SendMessage(getclose,syscom, closewin, 0); // sent message 'close' to the window } } } } //Created by ShowLoco ``` you have comments on most of the things, but still here are the improtant things: ``` //Created by: ShowLoco string clientname = "Showloco",clientname2 = "Showloco - the best mmorpg"; // the name of your game (Window name to close). string url = "www.showloco.com/"; // here put youre webhost url, or your ip if your using Apache Wampserver or w/e, don't forget the '/' in the end!!!! string versionlocation = "patch/version.txt"; // here you put the version file location on the url. in this file write your correct global version. string patcheslocation = "paches/"; //This is the location where we going to save the patches, again don't forget the '/' in the end!!! string filename = "showloco.rar"; // the name of the files to .rar. this.Name = "ShowLoco Auto Update"; // The name of the form that you want. this.BackgroundImage = Image.FromFile(folderlocation + @"\Data\bg2.png"); // Your Background image location (Create a Data folder and put your background image and name it "bg2.png". this.Icon = new Icon("Data/2.ico"); // Your icon for the form. put one on the Data folder and name it 2.ico. // Form size. this.Width = 300; this.Height = 200; ```Compile the Autoupdater, name it "Autoupdater.exe" and put it in your game folder. Ok now open your client files and go to frmMain look for: ``` Private Sub Form_Load() ```and under it write: ``` Shell App.path & "/Autoupdater.exe" ``` Now you have an auto updater :)! Ok, now how to make a new Update: first, create a new Version.txt which is 0.1 more than your client version. (This is important, every new version will be only 0.1 more than the older one, or it won't work). If you want the updater to download to folders, just add the folders and the file inside (it won't replace the folder, it will add them, it will replace only old files to old files for example if i have showloco.exe on the client and i added a new showloco.exe it will replace them). ok After you have the new Version.txt and your new files you ready to make a new update! open new .rar file and add your new versions files with the new Version.txt. click on SFX ![](http://gyazo.com/f85ab06ffc2065bbc76fb7316edc0463.png?1329416833) go to SFX tub, tick "Add new new SFX Module" and go to Advanced SFX options". ![](http://gyazo.com/b397563872a91d286559d4e732e966b9.png?1329416889) now go to General and do this: ![](http://i.imgur.com/mLShg.png) (If you can't tick the "Create in Current folder" just type something in the Patch to extract then tick it and remove the thing you wrote in Patch to extract). now go to Setup tub and in Run After Extraction add your .exe client file name. ![](http://gyazo.com/71e78bb46ea33a478707ff6258b6bd5d.png?1329417228) now go to Update tub and do this: ![](http://i.imgur.com/WWZNN.png) Now press OK and OK again. Go to your desktop and you will have your file as .exe, rename it to .rar (Because some freehost won't allowed you to upload .exe but don't worrie, the updater will rename to .exe again before running it). Upload your new upload to the server (Your patches directory you used in the code and don't forget to create a folder of this version and put the .rar inside). add 0.1 more to your version.txt on the host and enjoy the new update! :) **I created all the codes and the pictures, do not copy this tutorial!** It took me a few hourse so please comment :)!
  3. This is the good part, use your imagination.
  4. So, i read some tutorials, collected some pictures and this is the result: ![](http://i.imgur.com/r6XH0.png)
  5. So this is a tutorial for the basic making of mmo. Im using an OCX file that's will make it easier for you. and yes, you can use the based Tcp and udp that come with your c#. But this OCX it's a little more user friendly. First, downlaod the OCX: http://www.mediafire.com/?zg0nnonokf2 Now open a new project which will be our server. right click on toolbox and then click on "Choose items" ![](http://gyazo.com/c57a1c0ceeae638377e0efebcebe6935.png) now go to COM COMPONETS ![](http://gyazo.com/53a08e2721d03dd0ce73d23a244c4921.png) click on Browse and add the OCX. Click ok. Now in the toolbox you have a new object called: "Winsock". drag it to your form. Do the same thing on the new project and call it "Client". Now go back to the server, click on Winsock then Properties. ![](http://up352.siz.co.il/up1/n2q1nixggnum.png) Ok, now main things we have it's the IP, Port and Protocol.. You can also check your ip in the following link: http://www.whatismyip.com Port- choose any port you want, for this tutorial ill use 8080. and you have Protocol- you can use TCP or UDP. After this step, create a new label and name it Status. Double click on the From, ``` private void Form1_Load(object sender, EventArgs e) { try { axWinsock1.LocalPort = 8080; // your port axWinsock1.Listen(); // we will start to listen, to use this port. status.Text = "Online"; // if we sucessed to start lisenning from this port, so we will print "Online" on the status label. } catch { status.Text = "Offline"; // if not, it will print Offline (Usually will happened if the port is used, just try another port. } //Code by ShowLoco } ```Now we have an open server. we will add a new Listbox and named it "IDS", in the Listbox we will print any username that is online. Now go to Winsock Properties and ConnectionRequest ![](http://gyazo.com/a1724016c00d8d1d2dbde348f2971c06.png) ``` private void axWinsock1_ConnectionRequest(object sender, AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent e) { //Code by ShowLoco axWinsock1.Accept(e.requestID); // Accept the ID request to join. IDS.Items.Add(e.requestID); /Add the id to our list } ```Now we will go to the Client. We will make a button and name it: Connect and a Textbox named message. Double click on the Connect Button ``` private void connect_Click(object sender, EventArgs e) { //Code by: ShowLoco axWinsock1.Connect("IP", "PORT");//On the ip, write your IP. On the port, write your port :) axWinsock1.SendData(message.Text); // here we will send our message from message textbox :) } ``` Go back to the server and create a new textbox and name it: "ARRIVE". Go again to Winsock Properties and go to "DataArrival". ``` private void axWinsock1_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e) { //Code by: ShowLoco axWinsock1.GetData(message.Text); // here we going to take any message that any client has been sended and we will save it on message textbox. } ``` Ok, so we learnt how to send a message and get a message. now lest say we want to create a MMO game right? so we need to update the characters location? Go to your client and make a new timer which will send every a few second the character location: ``` private void axWinsock1_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e) { //Code by: ShowLoco axWinsock1.SendData("loc/" + pictureBox1.Location.X.ToString() + "/" + pictureBox1.Location.Y.ToString()); // We gonna send a message with the character.x and character .y } ``` Now go back to the server, and make two new Listboxes named: locationx and locationy. ``` //Code by: ShowLoco string[] commands = message.Text.Split('/'); // We will split the string by the char "/". int count = 0; // We will count the location. string com = "";// here we gonna save the command. foreach (string command in commands) // For each command we have in the commands list by our split char. { if (count == 0) // first command. { com = command; // Save our command. } if (com == "loc") // If the command = to "loc" mean it's the location command. { if (count == 1) // First we got x, so it's 1. { locationx.Items.Add(command); // add Location x to Listbox location x } if(count == 2)// Now it's Y. { locationy.Items.Add(command); //Add location y to Listbox locationy } } count = count + 1; // check the next command (next split by our char). } ```So now you have a basic TCP or UDP for your mmo :) you can easily add your own commands! Sorry for my English… **This is my tutorial so far! i created all the pictures and the codes!! please do not copy this tutorial!**
  6. So after i made some music for skills and stuff, i tried to take it to the next level… it's only 45 minutes, i used fl studio and sounds from the fl studio. http://picosong.com/wsC6/ hope you like it :)!
  7. Looks good keep it up!, Eli.. sounds Israeli :P
  8. i used the website pixieengine.
  9. Again, it is a pixel-art. i don't care what you did to show is not. i created it, with a pixel-art software.
  10. I know and i thanks you about it. That is the only reason im posting my game, so people can tell me what to improve. But about the character, it is on pixel-art, you just pissed me off…
  11. The character is it. DONT TELL ME NOT. I CREATED HIM. i know it's hard to you to understand that. and ill take care of the titles.
  12. lol the character and the items are, i made them so don't tell me they are not…
  13. Just created some new Pixel-arts.. hope you like them: ![](http://i.imgur.com/A7pHI.png)
  14. not working but thanks :/ btw: nvm fixed.
  15. Is it exist? thanks, me :)!
  16. thanks, it's included weapons?
  17. Before im trying to write my own paperdoll script, i just wanna know if it's possible just to copy it from the 2.0 EO, and if yes how? have a nice day, me :)
  18. Just a simple Photoshop work: ![](http://i.imgur.com/yObTz.gif) (Forget the two boxes on the size). Hope you like it :)
  19. So, after my first pixel-art swords, i read some articles about pixel-art. So here is my second one(it's animated so look at it for a few seconds): ![](http://i.imgur.com/IJ9Og.gif) Still not perfect, but i think it's much better. Hope you like it! :)!
  20. Yea, maby you right. You think if i will split the light it will make it better??
  21. They both have effects, sorry for the small pictures ![](http://i.imgur.com/wvNDm.gif) ![](http://i.imgur.com/saDa7.gif) Hope you like them :)
  22. You may post some information about your VPS like internet connection speed and etc…
×
×
  • Create New...