[.net] My Game Maker Help?

Started by
17 comments, last by bdubreuil 13 years, 6 months ago
Ok my VB is a little rusty, I forgot the types.

Anyway, you know how a Type definition works in VB,
or you could create a Class and be able extend its functionality later.

For now, the type should contain the placement of the sprite,
as well as the dimensions of the sprite. For instance, if you want the
car image in the center of the window, and the car is 128x128, the window
being 800x600:

car_left = (800 - 128) * 0.5
car_top = (600 - 128) * 0.5

You can simply compute to check if two boundaries intersect by testing

car_left and car_right against an x value of the point to test intersection with.
car_top and car_bottom against an y value of the point to test intersection with.

You understand better now?
Advertisement
yes, but heres the thing. How can a user create a block border and position it were he needs it and save all the block borders? See a problem right. But if you could or someone else tell me how to save a list of pistureboxes into the C:/ drove and load them back in. I can actually use my code to detect weather a speacial picturebox has hit a block and then code the block from there. This a a advanced program. Maybe a little to advanced. Its a game maker but what surprisses me is that people done nessasarly stop to think maybe they need more than one. I mean the user could create 300 for all i care but as long as it saves and loads back in with the name location and Size and maybe color. I dont care. - civil
To be honest I have a hard time understanding what the problem is (and I guess a few others too)
Forgive me for asking the following questions, it is not my intention to make fun of you or doubt your expertise:
1. Do you know how to save data in a file?
2. Do you know how to create multiple instances of a class?
3. Do you know how to put those multiple instances in a list or array?
4. Do you know how to use serialization?

You see, the names you are using to explain your problem are not very common or at least ambiguous. PictureBox is something very particular in VB but my guess is you are using it to refer to a tile. But I might be wrong. Could you post the code that shows us how you are storing your leveldata so far?

Quote:Original post by civilwarrock
i can use a code to tell if one picturebox hit another. Thats why i am using it.


-This is what got me into the collision test mood, but from the first post it seems more like a serialization issue, yes. I believe you should either refine your question or answer the questions ernow put.

Is this problem about storing a continous images, storing information related to form controls such as a Picturebox or both. Also, why would you save Picturebox properties to a file? ...

When I save images, I prefer to RLE compress them, and save them all sequentially into one huge DAT-file. :)

It's easy to implement and easy to handle.
@SuperVGA: My guess is he is not using pictureboxes but uses this term to refer to tiles. And perhaps all he needs to know is how to write the tile data (not the images) to a file...
Enrow is right, that is exactly what i am trying to do. And no i dont know how to do those things, im only 12 and my game maker rocks. I just want to save a picturebox just the picturebox only no image or color. And then i want to load that back in. - civil
You say that Enrow (Ernow) is right, but then you say that
you only want to save the picturebox data to a file.

If ernow is right, you don't want to save the picturebox data to a file,
but the data of the individual tiles. Is this, then about saving other picturebox data such as size and position?

. . . .. . X X. . X X. . X X

-X'es are offset at (2,1), and have the dimensions 2 x 3

Because then i recommend saving the data in a grid structure, where
every tile is followed by the next and thus not needing to store the offsets,
-or sizes for that matter.

I really want to help, I'm just not sure >exactly< what you mean, and I don't want
to confuse you. 12 yrs? That's great, I was 8 when I began, but first moved to windows when I was 14.
But considering that we keep talking about pictureboxes, I still think you are
"crossing the river to get water". It may be easier to do.
I am afraid you're aiming a little too high for now. Focus first on the basics of the language such as Classes, Objects and Lists.

If you skip these you will be copying code without understanding it and that will bring you to a halt very soon.

As for being 12, that is no problem, do not worry about that.

Please post your code and I'll have a look.
What I suggest you is to learn the basic like ernow said and after you could learn the rest when you'll need to. Also for your case, I suggest you to use the BinaryReader/Writer because if you only need to save 2 types of data (like SuperVGA said ex: "." and "x") you could save booleans.

Hide yo cheese! Hide yo wife!

This topic is closed to new replies.

Advertisement