Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

Search the Community

Showing results for tags 'vb.net structures interaction'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Main Center
    • Announcements & News
    • Feedback, Bug Report and Forum Help
    • Introductions and Farewells
    • Community Contests & Events
  • Game Development
    • General Game Development
    • Engine Discussion
    • Support
    • Requests
    • Project Recruitment
  • Community Projects
  • Creativity & Design
    • Programming & Web Development
    • Stories and Literature
    • Resource Showcase & Critique
    • The artsy side
  • Off Topic
    • The Cafe
    • Computers, Internet and Tech Talk
    • Video Games
    • Entertainment & Media
    • Role Playing, Interactive Story Telling & Forum Games
  • Archive
    • Forum Archive
  • RPG Maker VX
  • Gamers Corner

Blogs

  • Emily_Konichi's Blog
  • Wyzrd's Blog
  • Marks Bloggy
  • Punkid's blog
  • isaacsol's Blog
  • Cloudstrife's blog of items
  • Lammorra's Blog
  • The most magnificent blog EVER!
  • dietcherrycoke
  • Elric1816's Blog
  • COPY RIGHT...???
  • Chaos Impact - Production Blog
  • Encounters
  • Kiriashi's RMXP Activity
  • bugbite250's Blog
  • polraudio's Blog
  • The Silent Assassin Horror Blog
  • Elandryal's Blog
  • niemitoad's Blog
  • Awakening project Blog
  • XDoggStrafe's Blog
  • Code Geass: Painful Memories Daily Progress
  • Check out what I'm doing... you stalker
  • Aerow's Blog
  • Omar510's Blog
  • Agckuu Coceg Blog
  • My RMXP Projects Blog
  • Franklin's Adventures
  • RMXPUnlimited Dev Blog
  • HedgeKnight.net
  • Zanime Dev Blog
  • Tomo2000's Blog
  • The Programmer's Blog
  • A Bayonetta Inspired game
  • Elviar: Erufu Tairiku Blog
  • ShinyToyGuns' Development Blog
  • Zeriab's thoughts
  • Blogotry
  • Leerox4eva1's Blog
  • Tatsu's
  • O
  • Zark: The Time Storm Blog
  • DS (Devine Shadow) Development Blog
  • Silver Moon Blog
  • Rhijun568's Blog
  • Rhijun568's Blog
  • Mundane's Blog
  • Meh
  • Cutting Through Time Itself
  • This is not a Blog
  • RGangsta's Blog. :D
  • jporter917's Blog
  • Leon's Blog for the Minions
  • Inner Monologue
  • White Rabbit's cave with a view.
  • Darktom77's Blog
  • Salsa de salsa en Malaga
  • mwillems' Blog
  • aaa135139's Blog
  • withinsin's Blog
  • Final Fantasy XP VI
  • The progress of Crym
  • Free to Listen
  • Final Fantasy XP
  • Mega Man Transfer
  • Random Blog
  • Random Blog
  • RPG Maker Inventions
  • Xeyla's Blog
  • 808_legend's Blog
  • My First Non-Fan game
  • kellessdee's Blog
  • Chronicles of the Chronicles
  • YAY! Factors
  • Merlin The RPG Blog
  • newgamergirl2011's Blog
  • Calathandias Blog
  • Jon Bon's Blog
  • RMU Development Blog
  • Glaze Of The Slient
  • Illuminate the pathway, blind the corrosion and set sail for awakening!
  • Project GK
  • frida89's Blog
  • Octopus Shoes
  • Stuffs
  • Uninstaller
  • Music Mayehm
  • Development Blog 2.0
  • Nickz's Blog
  • RageMage's Blog
  • UrHappyPlz's Blog
  • Gmack's Blog
  • Night Horror
  • Tales of Druidia Blog
  • Arcatis Progress
  • Ex-Stigma
  • yiyi's Blog
  • yiyi's Blog
  • jianren925's Blog
  • gaogen's Blog
  • Prince Liam
  • Bon Ink Creations Independent Showcase
  • Video Game Series Where Are They Now?
  • buwawa's Blog
  • Bon Ink Creations Blog
  • Bon Ink Creations Forum Feed
  • White Rabbit's Thought Bubble
  • Pyramid_Head's Grotto of Wonders
  • DarthVollis's Project
  • Day of the Darkness
  • Ovan35's Blog
  • nightprince75's Blog
  • Arcatis Project
  • Code Runners Dev Blog
  • valerinwuba's Blog
  • shontellewilson's Blog
  • Bob Rambles
  • The Other World
  • Audio bible
  • Audiobible

Categories

  • RMXP Projects
  • RMVX Projects
  • Other Games
  • RGSS(RMXP) Scripts
  • Graphical Resource Packs
  • Audio Downloads
    • Audio Packs
    • BGM
    • BGS
    • ME
    • SE
  • Tools & Utilities
  • Misc. Downloads
  • Eventing Systems/Tutorials

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Steam Profile


Website URL


Skype


Facebook


Location


Interests


Other Skills


Project(s)


Referer


Google Plus Profile

Found 1 result

  1. I do not support the usage, selling, buying, or anything to do with illegal drugs. Structures aren't exactly the easiest thing for someone to get used to. Their concept is really neat, but an example of actually using one is not all that easy to figure out. The main difference between classes and structures is, classes are reference types and structures are value types. In practical terms, structures are used for smaller lightweight objects that do not persist for long and classes are used for larger objects that are expected to exist in memory for long periods. I was helping a friend the other day with creating a game system (the game's called Drug Wars, a clone of the Linux/DOS version), and realized that a method for storing information wouldn't work with just Lists & Array's alone. I realized that I should be creating a Structure. Here's an example of a Class & Structure side by side: See the difference, or lack thereof? As I said earlier, when one creates a Class, VB.net is expecting the class to persist in memory for quite some time (like the lifetime of the program's execution state), while a Structure is temporary. Take the game I was helping out with, there has to be a way to store all the "Drug" information, and keep it nice and clean. I could create a "Drug Class", but why? I don't need an entire Class just to do that. I can create a structure, which is basically like creating another object type (Examples of object types: Strings, Integers, My.Setting variables). The Structure would need 3 major items: Name, Cost, Description. Now I have a structure that I can easily create many instances of at low memory costs. On top of that, I can even store them inside lists: Now I have a fully Object Oriented Structure that I can use (if placed in a publicly available module) anywhere in the program. That being said, what if I created a different structure that required our current one? For example, the Player. The structure would need...what? Name, Money, Inventory List, and a way to add/remove the drugs from his inventory. As you can see, the structure code for the Player is MUCH more in-depth, so let me break this down: There are the regular Properties that you should recognize, such as the ones to Get/Set the Name and Money, but there are some different ones: There's a WriteOnly Property of adding a Drug. Why not use a sub? There's no real reason I couldn't, it's just a preference really. The hard one was the removing of the drug. Basically, you pass in the name of the drug, the structure loops through the Inventory list (Which is the List(Of Drug)), and when it finds a matching name, presto, it deletes it, credits the money back, and you're good to go. As you can see, these two structures are prime examples (Although the usage of them for the game..I don't necessarily agree with) of how structures can be used and how they can interact with each other seamlessly, and call it's own properties within itself. Feedback is greatly appreciated for my blog posts so I can improve them in the future!
×
×
  • Create New...