Creating Level Editing Software in CNC/MMFE

Status
Not open for further replies.
I have already done this, but I thought about it, and decided there must be a better way then what I did and decided to ask you guys how you think it should be done.

Basicly, what I did is used 4 listboxes, one to save the x position, one to save the y position, one for the object type, and one for if the object is an obstacle or not.

During runtime, the user uses the arrow keys to move a crossbow around the play area. To place Objects, the user presses certain keys.
If an object is placed, the values of an object are added to the listboxes.

You can probably guess how the rest works out.
 
Two Words:
Visual.
Basic.

If you give me the level structure and format, I could probably make you a special version of Snap that includes your level format by default.
Snap is my level editor for STH:LOTBB.

I'd make a suggestion: Use a tile-based terrain system, where you could have different solidities and textures for the tiles. Then, you could maybe save all of the object data with each tile, so that you wouldn't need to... uh...
 
I would make one in .net, but I'm not very good at it yet.

If you could tell me how to do the following things, it would make it a lot easier:

- Create a new picturebox at runtime
- Load text using filestream
- Collisions

By the way, what is STH:LOTBB?
 
Have you already tried MMF hotdog? I'm not sure if Visual Basic is better or worse, even though I have the trial version of MMF. If it IS better, is it also free?
 
I use Fénix for create games. Is a sprite-oriented language, free and portable (Windows, Macintosh, Linux, BeOs)... Is an easy language, but you can't do 3D games and is too slow (really, you can't run a Galaxian in a Pentium I because the speed goes really slooooow).
 
Ugh, heck no, it's not free. I'd guess that VB6 Standard would cost $400. But, go onto eBay, and I'm sure that you could find vb4 as low as <$50, I'd guess.

No, I havn't tried MMF. But, the VB code would look something like this:

You said:
- Create a new picturebox at runtime
I'm not sure about this. You could look in the manual about how to do these types of things, but I'd guess:
Code:
dim picture1 As New PictureBox
picture1.top = 0
picture1.left = 0
picture1.width = 128 '(or something)
picture1.height = 128 '(or something)
picture1.visible = True
picture1.show

You said:
- Load text using filestream
Code:
open "C:/test.txt" For input As #1
   input #1, i 'load the first line into i
close #1

'If you want to get all the data, then try this:
open "C:/test.txt" For Input As #1
   Dim x As String
   Do
      input #1, i
      x = x & i
   Loop Until EOF(1)
'There. Now, you have all the data into the string x.
Close #1
You said:
Coolisions
I'm not sure about this. I do have a cool coolision .BAS file, but I'm too lazy to copy and paste it right now.
 
Why would you need a .bas file for a collision?


Also, could you put objects in a group so you could test them all for something at the same time?

ex)

if pictureboxgroup.name = textbox1.text then 'Tests all untill it finds one that matches
pictureboxgroup.picture = new bitmap(textbox2.text) 'uses that one
end if
 
Because I use the collision code a lot, and I put it in a .BAS file for future use.

Also, you might want to use a control array for the group testing.

Example:
picture1(0)
picture1(1)
picture1(2)
etc.
Code:
Dim i As INteger
For each object in picture1
   i = i + 1
   if picture1(i).name = Text1.Text then
      MsgBox "Match."
   End If
Next
 
Code:
Private Sub Form1.KeyDown (KeyCode As Integer)
msgBox "BOO!"
End Sub

Seriously. Double click on the form, and choose keyDown, keyUp, or keyPress.
 
Hm, Fénix is really better... You don't need to program video and sound commands, they are implicit to the language... And collisions are perfect at pixel-level. It's slow, but when you do games for the newest hardware (and not too newest)...
 
How is TGF better then MMF?
MMF is so much more complex and you can do so much more then what you can do in TGF.


By the way, MMFE is what I have and it's almost exactly the same as TGF, from what I've heard.

Also, I got the picturebox creation code working.

Code:
If e.KeyCode = 134 Then
Dim i As Integer
i = i + 1
Dim pic(i) As PictureBox
pic(i) = New PictureBox
pic(i).Location = New System.Drawing.Point(positioning.Left, positioning.Top)
pic(i).Image = New Bitmap(Imagefile.Text)
pic(i).Width = pic(i).Image.Width
pic(i).Height = pic(i).Image.Height
Me.Controls.Add(pic(i))
pic(i).Visible = True
End If
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top