Results 1 to 2 of 2

Thread: Want to make an editor for my game

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2006
    Posts
    17

    Want to make an editor for my game

    Hey folks. I basically want to make up an editor, though it isn't going to be very complex.

    I'm going to use VB6, though it's been a while.

    I'm wondering about a few things:
    -Is there any way I could load in a graphic (would like to do PNG, but other formats would work) that has the individual tiles in a sequence and then pull a specific 16x16 area of the graphic and display it on-screen? I could just take a simple screenshot of the tiles and crop it down so the tiles are there and use that. The only other approach would be to edit out and save a bunch of tile files, which I'd like to avoid doing.
    -I also want to have a textbox I can paste in my various tile ID #s into so that way I can paste and then load/interpret. Basically, is it easy to parse out characters such as everything except: numbers, letters A-F (case sensitive), dollar signs, commas, carriage returns? I'm dealing with hex numbers.

    I've done a simple editor before, but I just was hoping someone could give some info on those points as I've not done VB in a while. Thanks.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Want to make an editor for my game

    VB doesn't support PNGs directly. You'll need other code to read the PNG to a memory bitmap and section it out that way, using other APIs. If your tiles are 256 colors or less, you can save it as a GIF (smaller file size), load it into a hidden picturebox or image control. Then using PaintPicture, you can render 16x16 portions from it to elsewhere.

    Regarding texbox and parsing. If you are pasting values, if you paste in the correct format you don't have to parse them. But parsing is easy enough. To remove unwanted characters or parse out only specific characters, various methods can be used.

    When you start developing it, let us know what problems you come across.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width