Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Map Editors  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.
Map Editors
« on: May 07, 2007, 02:27:52 am »
  • MetalRidley was here
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 235
Alright so I'm trying to set up a map editor in C# (because of the form designer, and I've heard it makes development faster). I can figure out how to get basically all of it to work (including my own map and tile formats), besides the area of the form where you select tiles and the area where you place them. I've never worked with any kind of graphics in C# (besides SDL.net and DirectX, but I did that without the designer), so I really don't know how to get some kind of graphic box within the form that I can draw tiles, grids, etc to and get mouse clicks from as well. I vaguely remember seeing something about creating a custom control derived from the Image control, but I don't really know how to draw to it or even create it or anything.

Or if I'm way off using C#, what should I be using?
« Last Edit: May 07, 2007, 02:37:41 am by OriZak »
Logged



THE MUSIC IS REVERSIBLE, BUT TIME IS NOT. TURN BACK... turn back... turn back...
Re: Map Editors
« Reply #1 on: May 07, 2007, 10:11:55 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Whatever you do steer clear of GDI+, its slow as !@#$%. Try using Managed DirectX, you can download it off Microsofts website (quick google will find it), its more or less like normal DirectX except it has an OOP layer on top of it.

Personally my C# graphics engine has an abstraction layer so you can easily switch between the graphics API's but thats probably over complicating matters if your only after a simple Map Editor.

Anyway I'll give some more advise tommorrow, I need sleep now :D.
« Last Edit: May 07, 2007, 10:13:29 pm by Infinitus »
Logged
Re: Map Editors
« Reply #2 on: May 08, 2007, 12:36:29 am »
  • MetalRidley was here
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 235
Yep I already have Managed DirectX (that's what I meant earlier, I've just never used it with forms), and I guess I'll try using that. I'm following a guide on how to use it within forms, and so far it seems like it could work. I basically have an abstract class derived from UserControl that creates the device and has a Render() function, and to make my controls I just derive from that. I'll try this out and possibly edit later with what happens.

Ha well have a good sleep, it was only 5:11 over here when you posted :P
Logged



THE MUSIC IS REVERSIBLE, BUT TIME IS NOT. TURN BACK... turn back... turn back...

Antidote

>.>
Re: Map Editors
« Reply #3 on: May 08, 2007, 07:06:14 pm »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
OMFG the form editor teh devil D: Anytime i make a form i make it from scratch the form Editor over complicates things and i usually have nothing but problems Debugging that crap <_<
Logged
  • Axiomatic Data Laboratories
Re: Map Editors
« Reply #4 on: May 10, 2007, 12:59:38 am »
  • MetalRidley was here
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 235
lol well it seems to work for me..

Anyways, I have my class derived from the UserControl class, I've got the basics of the things I need in there, and now I can't figure out how to put it in to my form. Is there some way to get it in the toolbox? Google isn't being very helpful :P
Logged



THE MUSIC IS REVERSIBLE, BUT TIME IS NOT. TURN BACK... turn back... turn back...
Re: Map Editors
« Reply #5 on: May 10, 2007, 01:10:57 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
for that kind of stuff i've always used a picturebox with a paint event that I use to draw everything into, then you have the mouse click/move/up/down events etc. to support your mouse functions, that's how I useally end up doing it.
Logged

Antidote

>.>
Re: Map Editors
« Reply #6 on: May 10, 2007, 01:12:31 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
did you get an compile error? if so try google again with the error message that should shade some light. remember Google is a programmers friend.
Logged
  • Axiomatic Data Laboratories
Re: Map Editors
« Reply #7 on: May 10, 2007, 01:50:11 am »
  • MetalRidley was here
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 235
Oh, well I just built the project for the heck of it and my control just popped up in the toolbox, so that problem is solved.

for that kind of stuff i've always used a picturebox with a paint event that I use to draw everything into, then you have the mouse click/move/up/down events etc. to support your mouse functions, that's how I useally end up doing it.
I might try that if I can't figure out how to do inputs with DirectX, but this seems to be working now. It wouldn't be too hard just to copy all the code over into a different class later on.

did you get an compile error? if so try google again with the error message that should shade some light. remember Google is a programmers friend.
No, I just couldn't figure out how to get it to show up in the editor, but I get it now. And lol yep, I've googled many errors since I started programming.
Logged



THE MUSIC IS REVERSIBLE, BUT TIME IS NOT. TURN BACK... turn back... turn back...

Antidote

>.>
Re: Map Editors
« Reply #8 on: May 10, 2007, 04:16:36 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
I've only been programming for about 2 years, GML first, A bit of BASIC (Blitz), tiny bit of C/C++ (never made it past Basic MDI apps tho <_<), and I'm learning C# now. C# Is still pretty new but i can make simple DX apps and I made a simple game engine (No views though) I'm still trying. I have a pretty decent Graph calculator comes in handy when i get lazy.
Logged
  • Axiomatic Data Laboratories
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.061 seconds with 55 queries.

anything