4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

You must understand the Game Editor concepts, before post here.

4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

Postby EvanBlack » Sun Oct 09, 2011 7:49 am

Update:

Ok here is what I got....

Use the arrow keys to move around the map.

The reason why you can't reach the edge of the map is simple, you SHOULD NEVER REACH THE EDGE OF THE MAP! lol Maps should be created with a cushion of tiles so that the player will not be able to reach the maps edge or they will see that it cuts off and it will break the illusion of being a world instead of a flat image.

With this method of displaying tiles you could even have the tiles loop around so that when you reach the edge of the map you go back to the other side, so that it looks as if the map never ends, or that you are viewing a part of a world rather than a flat surface.

basically

going left:

if x > 0:
x = x + mapwidth

going right

if x > mapwidth:
x = x - mapwidth

Same thing with the height.

Although, this version moves the tiles themselves to new game coordinates and updates the tile. If more tiles were added to reach beyond the view then you could loop the array around and move the player to the new coordinate all the inner tiles would stay the same and only the outer tiles that are out of view would change.


UPDATE:

This map has 4,000,000 tiles. But only 121 actors. It displays an 11x11 clone array over the view to show that it doesn't have an map edges. Moving by the actor could be done using Move To() to create smoother moving and still no map edges and no lag and maps as large as you want.

Go ahead.. put the keydown on repeat... your computer won't lag and it will still take forever to reach the other side of the map.

Windowed or Fullscreen, FPS does not drop.

1 glitch, going diagonal with repeat on tears holes in the map. I am sure its because hes going to fast...


The Iso version uses a 35x35 actors = 1225 tile actors + 1 player actor. To display a 4 Million tile map.
Attachments
screenshotiso.jpg
Iso Version
Last edited by EvanBlack on Mon Oct 10, 2011 7:35 am, edited 2 times in total.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: 4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

Postby EvanBlack » Mon Oct 10, 2011 7:28 am

Wow.. No comments at all... Does anyone realize what I did? I made it where you no longer have to load maps, you can put all your maps into one array and then just use a little bit of code and poof, your in the new location with no downtime.

This doesn't use ANY create or destroy functions as they are very CPU intensive. It also uses minimal actors to display on screen. I am going to work on getting objects and creature arrays to put in and smooth movement, but I just want to let you guys know. This is a good way to start making your games and use of the CPU.

I am not nearly finished with all the work I need to do, such as creating the RPG engine, the Map Maker, and my game. Those things branch off into other things and code samples that I will make available for use.

I guess when its all available it will be 2000% more useful to make all types of games than its current state. But I hope everyone sees this. No more clone arrays, no more activation regions, no more create and destory to bring things into view. Well as far as background tiles go.

I am trying to figure out a way to make the map array smaller, I thought maybe using short ints but it doesn't seem to make a difference. I might start using char maps if they are smaller, I just don't know much about data types and the effects of conversions.

Can someone help me out with this? My maps only need to be so many numbers large they dont have to be huge, because I can use tile sets for different maps, Right now ints are wasting a lot of space...
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: 4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

Postby skydereign » Mon Oct 10, 2011 7:50 am

First you edited this post, so it was buried before you edited it people may not have seen the change. And second, it is a nice system, but people have done it before, and for the most part I haven't found it especially nicer than other systems of level design. There are still things that aren't added to this that are sort of required to make it useful as currently all it does is show the map. But, to answer your question, you can use chars, and not use conversions. Just do the math and checking as if they were ints, but using chars. They are essentially the same thing.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: 4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

Postby EvanBlack » Mon Oct 10, 2011 8:04 am

Alright thanx, but yeah, there are some things missing but the things that are missing are pretty much the same. It will use as minimal amount of actors as possible, as well as minimal create/destroys. Keeping instead a ready available average set of actors made for use that will be moved to the location where needed then when off map will be put back into a holding area.

Tiles are the most taxing thing since they make up just about everything, while the objects will be pulled from an average pile, pushed on to the map as needed, then if more need to be created, such as if all the trees in the holding area are used up then it could create more, but honestly, I would just use a larger actor that would take up more space rather then using more trees.

1 actor that holds 3 trees is more useful and cpu friendly than 3 actors that hold 1 tree each.

Mostly this system is to reduce the taxing of having to waste so many actors on tiles, when you could use all those precious actors creating objects. Also some things could be tiles themselves rather then being an object.

What I am trying to do is create a large map that uses minimal actors but appears to have a large amount of them. The least amount of actors I can use the better.


Let me add all the other stuff to the Map Maker, clean up the code, fix my variables making them more uniform to each "fitting", optimize and get back to you ;)
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: 4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

Postby Hblade » Thu Oct 13, 2011 2:36 pm

Outstanding :) However, no way possible would I be able to understand the code at this moment xD
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 4 MILLION TILES!! 122 Actors, Fullscreen map. No Lag.

Postby EvanBlack » Thu Oct 13, 2011 6:18 pm

The code on this one sucks lol for a better look at the code look at my mapeditor. It has cleaner code with better functions.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron