|
-
Jan 27th, 2009, 03:36 PM
#1
Thread Starter
Junior Member
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.
-
Jan 27th, 2009, 04:48 PM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|