Really big map, that loads just a part

0 favourites
  • 5 posts
From the Asset Store
Minimap (2 in 1)
$2 USD
80% off
Two types of minimap: "full map" and "player is the center" (square map and radial map)
  • Hei Guys and Girls, I got a big question.

    What you need to know:

    • I try to create a browsergame in construct 2
    • I want to create a grid map
    • I want just load what the user see
    • The full Map is 255 * 255 (65025 fields)
    • The fields should not look same (trees, water, mountains and so on)

    First what I want to do:

    • A big Map in 3 resolutions (500*350px/ 120*80px/4*4px per field)

    - The Map should just draw the fields in the viewpoint and some around

    - The Map should only request informations from the fields in the viewpoint...

    - After Dragging it should draw more fields and load more

    What I send to my db and what I get:

    • I send the id from the city where I came from
    • Db take it as middle city and send me all informations from the fields around that city

    Sry for bad english ;)

  • I haven't done this myself, but I have had the same thought about it. At some point I wanted to do some kind of simple old school 2d Zombie GTA kind of thing. I figure the project would be fairly large so I never started. But I did ponder about the large map issue as I felt that would be the most difficult hurdle.

    As I approached the theory I cam up with two ideas. I don't claim these as only or best solutions. Just ideas based on how much I understand C2.

    One. C2 functionality

    Have a two large set of empty sprites of a variety of sizes and ID/Use types.

    Buildings, Cars, Roads, Sidewalks.... These empty sprites are always the same name. Your dynamic sprites are managed as two types(A and B) to manage sprite loading for when changing the environment.

    Define a system to alternating URL load different sprite set's based on the players position in city grid.

    Two. Plugin

    That does the above, but removes a very complicated Event Sheet.

    Anyways. that's my two thoughts on the subject. I would like to see someone pull off the really big map idea. I may end up tinkering on my project sooner than later :P

  • I got almost the same idea but all my tries didn�t work. For construct classic was there a perfect addon.. For 2 days I have tried everything, I hope some else got a good idea.

    Still big thanks to jayderyu.

  • An idea I had was to use the sprite bank and array plugins, dividing the area of the layout at runtime in a grid (by basically checking if environmentsprite x/y is within a square, then looping through all the grid sections in the layout) then saving all the objects in each section of the grid via the sprite bank plugin as a JSON string into a cell in the array.

    Then you can compare the location of the player and each time they move out of a grid section, create and destroy objects that are in/out of range.

    I haven't tried this yet, and it might be more complicated than it sounds, but it seems like it should work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hears really complicated, but thanks I will try it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)