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

Helladen

Members
  • Posts

    2272
  • Joined

  • Last visited

    Never

Everything posted by Helladen

  1. A few hard to choose, in one the world was being sucked into an abyss by what seemed to be a black hole. Although massive storms were going on, such as huge hurricanes. It's hard to explain but it was very intensive and scary. I could feel the pressure of the storm pulling me up and such. (In my imagination of course :)).
  2. ``` For i = 1 To 1000 Call PlayerMsg(Index, "Abcdefghijklmnopqrstuvyxyz", Yellow) Next ```
  3. Reminds me of Chrono Trigger (on the PlayStation I believe). Looks nice regardless, unique type of art.
  4. Thanks for the feedback. :P I added Singles and Doubles in Coding Basics, Binary and How To Use Types in More Advanced.
  5. Someone tested if a memory leak does exist and he ran the client for over 10 hours and it did not run out of memory. But the leak could of been very small. But thanks for the fix Lightning.
  6. Helladen

    Guild

    Also you should store MemberCount (byte, integer or long) and Member() which is a string. Member holds the name so you can send all the guild members even when their offline and MemberCount the amount of members in the guild. Just add one to it when someone joins and subtract one when they leave. (For the guild list). By adding this your also going to have to make a function to find the slot the guild member is on when they leave. Just scan through the constant for the max amount of guild members until it finds the name then set that as it and erase the Member() from the file.
  7. Thanks for the comments. I reorganized some of the text and added tools in IDE Basics and some other minor additions. @Willa56Seidenberg: > You should try out something more precise, as many far more better tutorials are available to learn VB 6. This is just a basic guide, not meant to teach you everything.
  8. Helladen

    Walk sound

    Try this… ``` If Player(Index).Moving > 0 Then If walktime = 0 Then walktime = GetTickCount + 3000 If walktime > GetTickCount Then PlaySound Sound_Walk walktime = 0 End If End If ```
  9. Lol who told you my name? ;3 But I don't know, it's a good idea. I wasn't saying it was bad or anything, I just don't agree with it. Sometimes making things too easy can make people rely too much on a system. When it's not there then people will complain and so on. But my opinion doesn't mean anything. I was just sharing my beliefs. Just because most people like something and support it doesn't mean I have to. My opinion is my own, something can seem flawed to you but your perspective could be flawed all together. So there is no true flaw interpretation of an opinion.
  10. Thanks for the feedback, trying to help some people understand the source better. :P Updated added more to IDE Basics towards the bottom and added Modules guide for Eclipse Origins.
  11. @xXwArIoXx66: > Definitely Silent Hill, creepiest game ever. ^ @Princess: > You mean "zeee flashlight…. it does nothing", or "its so freaking dark i can see crap!". Yeah Doom 3 was pretty scary. > Silent hill is creepy, but never really scared me. For me Fatal Frame makes me not want to play it. I really dont want to go into the next room when i play. > > I just got Amnesia... ive been seeing that its pretty scary. Play it in the dark, pitch black. Did it with a friend.
  12. There is no such thing as a flawed opinion. An opinion is whatever an individual thinks whether you believe their ideas or not.
  13. I was just giving my opinion. It's good to have it, wasn't saying not to do it because I refuse to use it. I just don't believe in it that's all. Also I have given a bit to this community, sure I don't write guides and still not very experienced at Visual Basic 6.
  14. Helladen

    LenB

    I came across a bug that returned a value greater than 0 when using LenB. I used LenB wrong though my bad.
  15. I will be explaining to all of you the basics of Visual Basic 6 programming and various things to help you understand the source better. **IDE Basics:** >! First of all, you must learn the interface. >! **Project & Properties Window** The project window displays all your source items such as forms and modules. Properties window is used in modifying the properties in a form. My advise is to keep the project and properties windows open and clip them on the right side of the screen. (Top project explorer and bottom properties window). >! **Immediate Window:** To be honest, the immediate window seems worthless to me. Never have used it once, but it is used for displaying print screen messages using debug.print. It is handy for camera testing and such, but for most sourcing it will have no use. My advise here may be wrong, because I have not used it so be warned. >! **Tools:** These enhance and add more control to your forms, you can add your own if your an experienced Visual Basic 6 programmer by making a component. You can locate them on the left side of the IDE, you click on the button you want to use. You click where you want to place it on the form and by dragging it will resize how large it will be. >! _Tip: They are referred as user controls_ _Tip: When you place something on a frame it will snatch to it, meaning you can't move it off of it until it is erased. So if you have issues with your things getting stuck on frames when you don't want them to, just erase and place it in a different spot away from the frame._ >! **References:** These are defined libraries the project uses. (.olb, .tlb, and .dll) >! **Components:** They are user control tools which are made using ActiveX, such as labels and text boxes. >! _Tip: References and components are only for advanced Visual Basic 6 programmers._ >! **Public & Private:** Private means it can only be called within the area it is at, for example if I make a private sub in modCombat it can only be called from a sub or function from this module. Public means it can be called globally. >! **Forms:** They are the visual part of your project. Something that allows you to interact with your code. >! _Tip:_ To call things from outside of forms you must type the name of the form then a period then the sub or function. >! **Modules:** They are sort of a fancy name for a folder. They allow you to store code into them that can be made public or private. >! **Classes:** They are an advanced way of initializing data. Primarily good for systems used a lot, because they are nice and clean to use. Such as a sound engine would be good to be a class, because you can initialize it and turn it off very easily. An example of a class is the clsBuffer, which is the only class found in Eclipse Origins. >! **Add-on:** The best improvement to the Visual Basic 6 IDE is an extension called CodeSmart which will enhance and fix various bugs with it. This costs a lot of money, so your best chance at using it is the free trial and if you like it enough buy it. **Coding Basics:** >! **Calling a Sub or Function:** You do not need to put "Call" in front of code for it to call, it will automatically execute everything. Call just makes it look cleaner because it will add brackets around it and make it more compact. >! **Functions and Subs:** Functions will return data back from where they were called just like if you use ByRef on a constant in a parameter header. Subs will not return data. >! **Useful Functions:** _Tip: Always use the first one, the second one is much slower._ _Tip: You must put brackets around the area you want the function to affect._ >! Trim$/Trim: This will get rid of blank spots around the string. Len: This will return the length. LenB: This will return the value in bytes. Dir$/Dir: This will return the name of the directory. ByVal: Any changes made to the variable are not returned to the calling procedure. ByRef: Any changes made to the variable are returned to the calling procedure. >! **Constant Types & Other Useful Terms:** Vbnullstring: Means null, an empty string. Byte: 0 through 255, this can't be negative. Integer: -32767 through 32767. Long: -2147483647 through 2147483647. String: This is a text constant, it has no limit it can be as long as the memory will let it go. So you must put a limit on it yourself. Sometimes you'll be able to get away with it, but it's advised to always use * and the length you want it to be. This will cause you to have to use Trim$, but it will save you loads of memory. Single - Limited to 7 digits. (4 bytes storage required). Double - Limited to 15 digits. (8 bytes storage required). >! **Arrays:** These are matrices, which hold multiple values. An example of how to use an array can be seen with Player(1 to MAX_PLAYERS), each value inside of here holds the player's data. >! **Visual Example of an Array:** >! >! [1][0][2] [3][0][1] [1][4][5] **Enumerations:** They are a list of names used to define numbers. >! _Tip: Packet header/first thing written to it is an enumeration._ >! **Types** They are a collection of variables. >! _Tip: PlayerRec is considered a type._ **More Advanced:** >! **Networking:** WinSocket is a very easy to use networking tool. Jacob programmed the clsBuffer which is the foundation of the packets that are read and sent. Both the client and server clsBuffer are exactly the same or should be. To use this is very simple compared to the old way it was done in Mirage Source 3. >! Sockets are opened and closed whenever a player joins and leaves the game. Winsocket has a few issues with this because it requires you to call DestroyTCP or send a packet which is how Eclipse Origins does it. (Packet is a waste because all you need to do is DestroyTCP). A socket will remain open even if it is not receiving a connection. It must be closed in order for it to show that the player has actually logged out. You can force close it by calling CloseSocket in the server though. The only time this would become a problem is if the client was force closed or you lost internet while logged in. >! First of all you should preallocate the values before you send them. Preallocating will speed up the sending slightly. (Bytes are 1, integers are 2, and longs are 4). An example of how to preallocate is to put it before you write anything and put Buffer.Preallocate then the added up number. >! Both the writing and reading of the data should match exactly. I'll give you an example of how to how to use the clsBuffer. You can look at the comments inside the code I left to explain what each thing does. >! ``` Sub SendMapReport() Dim Buffer As clsBuffer ' This is the constant we use to know what the clsBuffer is ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer ' This will initialize the class. Buffer.WriteLong CMapReport ' This will write the enumeration header for the packet. SendData Buffer.ToArray() ' This will send the packet to the server. Set Buffer = Nothing ' This will turn off the class. Exit Sub ' Error handler errorhandler: HandleError "SendMapReport", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear End Sub ``` You can trace where this is sent by going into the server and finding "CMapReport" in modHandleData. >! _Tip: C stands for client and S stands for server. This is an indication where it came from._ _Tip: CopyMemory is slower than actually sending the code over using packets from caches. To learn how to use a cache to send as a packet simply look at SendMap, HandleMapData, and MapCache() array in the server. The client uses HandleMapData and SendMap._ >! **How To Use Types:** When we use types, we're basically organizing it. There are many contributions that this helps such as clearing, saving and loading too. >! An example of a type being used: ``` If Player(Index).Level = 1 then ``` This will get the player's level which is one, by doing this you can compare values easily. The main thing about using types is understanding how to get the correct slot for the array. >! Now time to explain how to use the npc types, which are a bit trickier to use. ``` If Npc(MapNpc(MapNum).Npc(MapNpcNum).Num).Level = 1 Then ``` This will get the level of the map npc which is one. This uses two defined constants to find the slots of the arrays within the type. MapNum usually will be GetPlayerMap(Index), but if the sub does not have a player, it must be predefined from a source outside the sub or function, or in the parameter header of the sub or function (MapNpcNum too). The main thing about this is keeping data flowing correctly through many different subs and functions, it starts off defining the value and you must keep it moving until it is no longer needed. >! The NpcRec is a type which holds the npc's data, the .Num part of the code is a stored value of the npc's number so it can tell which data it should use from the npc editor. MapNpcRec is a type which holds the map npc's data. Map npc data is basically altered states, such as how much health they have left. >! **Binary:** These types of data storage work well with types, you can export and import data very quickly. You first have to clear the type out completely, then load it using the binary file and save it if it is modified. >! ``` Open FileName For Binary As #F ' This opens the binary file by the path specified. Get #F, , Item(ItemNum) ' This will put the binary file's data into the ItemRec of the item number specified. Close #F ' This will close it. ``` ``` Open FileName For Binary As #F ' This opens the binary file by the path specified. Put #F, , Item(ItemNum) ' This will put the ItemRec of the number specified into the binary file. Close #F ' This will close it. ``` **Modules:** >! This will explain to you what each module in Eclipse Origins primarily does. >! **Both:** modConstants - This holds all constants that are given a base value automatically. modGlobals - This holds all constants that are given a value within the code itself. modDatabase - This is where all the database code is placed that has anything to do with clearing, saving, loading or searching for files. modEnumerations - This is where all enumerations are placed. If you don't know what they are look above. modTypes - This is where all types are placed, if you do not know what a type is read above. modGameLogic - This is where all the logic for the game is placed. modGeneral - This is where general things are placed which do not fit into the other modules. >! **Client:** modClientTCP: This handles the client WinSocket and packets that are sent to the server. modDirectDraw7 - This is where all the DirectX/rendering code is placed. modGameEditors - This is where all the game editor code is placed. Such as initializing the editors, requesting to use them, and saving modified files. modHandleData - This is where receiving packets are handled from the server. modInput - This is what handles controls and key presses. modText - This is where all code which has to do with text. >! **Server:** modServerTCP: This handles the client WinSocket and packets that are sent to the client. modHandleData - This is where receiving packets are handled from the client. modPlayer - Subs and functions which affect the player and do not serve any other purpose. modCombat - This serves to handle all code which affects combat. modSysTray - This handles shell code. modServerLoop - This is like GameLoop sub on the client, but it is its own module on the server. It handles the looping process of the server for many calls and functions which are given a timer to when they are to be called again. All code which is intended to be looped should be placed in here. If you liked my guide just say so below and I will add more. Hopefully this was helpful. :) Special thanks to a friend of mine, he helped me with a few terms and preallocating values. I am very bad at terminology.
  16. The point we make tutorials is to teach people how to program themselves so they will contribute. If we make them automated like this, no one will read it.
  17. XtremeWorlds had this, really good for beginners. But automating source edits can sometimes break code and make it more of a niche environment, when this language is one of the easiest languages ever made. I never made my sadscript tutorials to work with it in XtremeWorlds, can't say I will do it for this either. It's just a good way of making the community even more reliant on the people who know how to program. I also would suggest using more defined areas, such as subs and functions within the program's opened file. If it doesn't do that already, just saying it doesn't due to seeing the code snippet in the repository.
  18. When I was a kid I loved the ant builder games, where you control an ant and bring things back to the colony. Someone should make one of those games. :)
  19. You shouldn't allow the founder to leave, erase the whole founder leave part and add a message exit at the very top. Have it where they promote someone else before they can leave. Also when the guild is created you probably missed the 2nd person, make sure you set all the data correctly.
  20. You must create a guild create sub to fix the issue with the founder not being saved. I'm not sure I would have to see every sub you edited to fix the bugs, sorry I couldn't be more helpful. Using the party system for a guild system is not smart. Robin coded it to be temporary data, it is not saved so it's best to just base the code in some areas with it and not copy it directly and expect it to work with a few modifcaitons.
  21. So you basically copied the party system. I have no idea, make sure your strings are actually strings. Such as in the GuildRec Member and in the PlayerRec make sure Guild is a string. Doing things like that is not smart, you should base them off something not copy them and start editing. That's mad…
  22. Helladen

    Eclipse Con

    @Azure: > I would assume that it would be located in a place that is accessible to most of the people who would actually attend. Nah Robin's house. :P
  23. XNA 4.0 runs on Windows XP. So does .NET framework 4.0, it just requires system pack 3.
  24. Helladen

    Walk sound

    No because it would only play when you stopped moving.
×
×
  • Create New...