David McMurdo
Member
Hello Everyone,
I recently began a thread in the Programming forum asking how one might have Game Maker randomly generate a Risk-style map for a strategy game. I got some good advice, but it quickly became apparent that the requirements are way beyond an absolute beginner like myself, especially considering some of the features that I ultimately want my game to have. And so, for now, I have settled for pre-made maps.
One of the aforementioned features is the ability to transform or even destroy vast swathes of land, for I'm making a "god game" that gives the player the ability to do so. What I intend to do in order to achieve this in my pre-made maps is to draw the entire thing out in my art program, including the regions, and then cut those regions out of that image one by one. Then in Game Maker I reassemble them again like a jigsaw, with each region sprite belonging to an object. I've attached a screenshot of my testing room which has a reassembled map, a makeshift city, and a makeshift human. The water that the land tiles rest within is not the background, but an object of its own on a lower layer.
To my novice mind, having every region be its own instance seems to be a very easy way of having as much control over them as possible. I can have the player drown, drought, burn, plague, or do anything to any region, very easily show the effects visually by just changing the instance's sprite, and change the properties of or remove that instance entirely, and every other instance that might be on it at the time. I also don't see why this would cause any problems when it comes to creating an MP grid upon which the sentient entities of my worlds will travel. The one issue is that this approach would seem to demand that I have different versions of every region's sprite to account for everything a player might do to it, which will be a lot of work in terms of art, something that could be negated by having the landscape formed by tiles which all adhere to the same rules, which I think would be more complex in terms of coding.
The thing is that for me it isn't enough to simply emulate someone else's code to accomplish something, I really want to understand exactly what is going on, and according to my current, lowly understanding, this is the best way of accomplishing what I want to. However, I'd appreciate your thoughts on how I've approached this issue. Perhaps it is a terribly crude way to accomplish what I want.
I recently began a thread in the Programming forum asking how one might have Game Maker randomly generate a Risk-style map for a strategy game. I got some good advice, but it quickly became apparent that the requirements are way beyond an absolute beginner like myself, especially considering some of the features that I ultimately want my game to have. And so, for now, I have settled for pre-made maps.
One of the aforementioned features is the ability to transform or even destroy vast swathes of land, for I'm making a "god game" that gives the player the ability to do so. What I intend to do in order to achieve this in my pre-made maps is to draw the entire thing out in my art program, including the regions, and then cut those regions out of that image one by one. Then in Game Maker I reassemble them again like a jigsaw, with each region sprite belonging to an object. I've attached a screenshot of my testing room which has a reassembled map, a makeshift city, and a makeshift human. The water that the land tiles rest within is not the background, but an object of its own on a lower layer.
To my novice mind, having every region be its own instance seems to be a very easy way of having as much control over them as possible. I can have the player drown, drought, burn, plague, or do anything to any region, very easily show the effects visually by just changing the instance's sprite, and change the properties of or remove that instance entirely, and every other instance that might be on it at the time. I also don't see why this would cause any problems when it comes to creating an MP grid upon which the sentient entities of my worlds will travel. The one issue is that this approach would seem to demand that I have different versions of every region's sprite to account for everything a player might do to it, which will be a lot of work in terms of art, something that could be negated by having the landscape formed by tiles which all adhere to the same rules, which I think would be more complex in terms of coding.
The thing is that for me it isn't enough to simply emulate someone else's code to accomplish something, I really want to understand exactly what is going on, and according to my current, lowly understanding, this is the best way of accomplishing what I want to. However, I'd appreciate your thoughts on how I've approached this issue. Perhaps it is a terribly crude way to accomplish what I want.
Attachments
-
34.3 KB Views: 5
Last edited: