generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Concept too big for roblox?

Previous Thread :: Next Thread 
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:06 AM
Welp, a few days ago I created a "chunk loader" using roblox terrain. It kinda loads terrain like in MC, except it isn't render based. Jump off the side of a chunk and you'll appear as if you walked straight into a loaded chunk. I got it to load trees and animals and whatnot, And I had some kind of "DayZ but more survival and no zombies" type of game in mind. Theres just one teensy weensy teeny tiny problem:

After about 10, 15 minutes of exploring chunks, lag will become heavier and heavier, to the point of being just really choppy. I've tried adding newly created blocks to debris, streaming only makes it worse... I'm pretty sure it has something to do with the terrain that's being loaded or something.... I'm starting to feel the concept is "too big" for roblox.

If you honestly want to try it out for yourself, just explore some chunks for 10-15 minutes and tell me if you experience any lag (if your generous enough) So I can figure out if it's just me or not....

http://www.roblox.com/Sunlight-PRE-ALPHA-place?id=162460195
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
25 Jun 2014 06:23 AM
You need to have it 'unload' chunks, so when you get far enough away, they don't render. Also, make it generate chunks in a radius so you don't have to walk into nothing for a chunk to load.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:24 AM
I've tried streaming, but that only staves off the lag for a little while. Anyone know any way you could "dump" streaming data?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 Jun 2014 06:31 AM
Haha, this is not at all too big for roblox.
It also has nothing to do with the terrain.

It has to do with crappy coding.
To clarify, your crappy coding.

First off, it's slow. It takes like half a minute to generate one of those chunks, and there isn't even a whole lot to it. Granted, roblox terrain functions aren't particularly fast, but I've done stuff like this in the past, and generated bigger chunks in a matter of seconds, while using a combination of smoothed noise, as demonstrated here.

Secondly, it's very poorly executed. I walk out of a chunk, and I literally fall down to the bottom, sit there waiting for the chunk to get created, and then I get teleported back up. What you should do is generate all the chunks around the player (not just the chunk he walks in). This should be pretty obvious, as well, but clearly you didn't see it.

Lastly, you're probably storing everything very inefficiently, or just doing the checks very inefficiently. It does seem to slow down as the terrain expands, but that has nothing to do with the terrain itself. Roblox handles a whole ton more terrain than that, so it really just has to be your code.

Of course, I can't actually help you with the code itself, because I don't have access to it. And even if I did, this thread would belong in Scripting Helpers, not Scripters.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:31 AM
How would I 'unload' a chunk? Chunks are generated like a terrain generator. I'm not actually "rendering" anything, as I said. I'm going to reenable streaming. I have a little section where it updates chunk events, maybe I should try messing with that
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:34 AM
What I find wierd is that the first chunk is loaded fast, and it gets slower and slower the more you expand out. It probably is the way I'm storing it..
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 Jun 2014 06:43 AM
On the other hand, you know what this is too big (or too small) for? GAMES THEMSELVES.

Damn right. You think about it and it might seem like a cool idea, like "waoh dude ill have terrain generation so you can walk everywhere, bro" but in practice, it's really quite impractical. You'll end up with very repetitive stuff which makes it become boring. This also very difficult to work around. On top of that, you won't have any landmarks. Nothing to identify anything, as the map changes. You also get no fine tuned details or anything that fits really well with the world. Not to mention the fact that since the map expands and there are no landmarks, it becomes extremely hard to find other people to do anything, whether it's to group up or fight each other.

So yeah... You're pretty much better off just making a map yourself.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:44 AM
What I'm going to try is lowering the chunk size. Also, what can I use to make chunks load AROUND the player?, without the chunks colliding into each other?
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:45 AM
Oh please, ever heard of Minecraft?
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:46 AM
I plan on adding a dev console (triggered by pressing g or something) That will show X Y and Z coords, making going places easier, I plan on adding building and whatnot, so you could MAKE your own landmark
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
25 Jun 2014 06:52 AM
Your problem is not related to the terrain generation in any way.

You have a leak of instances somewhere. Open the shift+F1 menu and you can see that the amount of instances rises at a stready rate.

Use play solo to figure out what is it that is spamming instances (whatever they are in your case) and fix it.

I had something similiar in my own game (was spamming a couple of empty models every frame... got laggy after a while)

But you still should either:
a) Add proper chunk unloading and loading
b) Pre-generate the terrain

The latter might work better if it doesnt lag too much, since loading and unloading chunks probably isnt too smooth in roblox and youll have to deal with the issues that come with it.
Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
25 Jun 2014 06:54 AM
You generate chunks around the player by getting their chunk-coordinate, then generating that, and also generating adjacent chunks in the chunk grid within some specified radius. If that sounds difficult you can hardcode it to just generate the adjacent ones.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 06:58 AM
Wait, I remember implementing a part generation sequence earlier for some kind of prespawned "boat"


that might be my problem
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 07:07 AM
Found the problem :)

I have a part generator that generates parts every time you move around, its part of the terrain generator for the "oh poop the guy fell through an unloaded chunk" fail-safe teleport. Apparently, that's probably whats causing the lag. I mean, there's like 3 parts generating inside the character each step i take.
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
25 Jun 2014 07:20 AM
I don't really like chunks. I prefer making a sine wave terrain with randomseed landscape on it. It looks more pretty.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
25 Jun 2014 07:21 AM
"Oh please, ever heard of Minecraft?"

Clearly you did not understand my post.
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
25 Jun 2014 07:22 AM
"Oh please, ever heard of Minecraft?"

u cray cray gurl
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 07:36 AM
Minecraft terrain can go for 100 times the length of the earth yet people are still able to find each other

you cant seem to ever get away from people can you these days
Report Abuse
lateregistration is not online. lateregistration
Joined: 02 Apr 2013
Total Posts: 2630
25 Jun 2014 07:36 AM
Noob. Stfu. MineCraft Is MAde In Java. 100x Faster Than LAu. You need ot Learn How tO Roblox Java.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 07:38 AM
Also, I found the "instance leak" problem (another lag causer). Every chunk that was loaded, it kept reloading those chunks, so I set up a function to clear the table that defines chunks every so often (since roblox already handles terrain editing logging, and this isn't a renderer, its just a generator)
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 07:39 AM
I learned java pretty long ago before I found lua more fun :).
Report Abuse
lateregistration is not online. lateregistration
Joined: 02 Apr 2013
Total Posts: 2630
25 Jun 2014 07:45 AM
Noob. Dont Sass Me. I have more Posts ThanYou.Which I CAn Boss You Around OR Something. So follow The Forum Rules. telamon > oysi > me > you

TolaMan Can Boss Oysi Around Because Telloman Is A Admin Or Something And Hes More Important Than OYsi, Me, You, and Noobier Noobs Than You, You Noob. And He has More Posts Than You STupid Nob.
OySi Can Boss Me ARound Because HEs A Cool PErson And He HAs More Posts Than me.
I Can Boss You Around Because Youre a Noob And Dont Have as MAny Posts As Me.
You Can Boss Around Noobier Noobs Than youself Because They Dont Have As Many Posts As You.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 07:51 AM
says the 13'er to the 08'er
Report Abuse
lateregistration is not online. lateregistration
Joined: 02 Apr 2013
Total Posts: 2630
25 Jun 2014 07:54 AM
Lol Noob I Joined In 08. Apparently this New Concept I Just Presented Is To Complicated For Your Stupid bRain. Ugh All u Need to Do Is Buy a new GPU for That Stupid Brain of Yours And MAybe You'd Be Smarter yu Moran. Dude You Cant Even Do Proper Grammer Or Spelling....... MayBE oyU sHoudl Go Get a Life If You Know What I mean Like Get a GF orSeomthing bcus ITs Obivously You Not Have XDDDDDD.
But Sers.
Go Leave.
Report Abuse
jasondee1 is not online. jasondee1
Joined: 26 Jul 2008
Total Posts: 8002
25 Jun 2014 07:56 AM
says the guy with the tbc account

but seriously dude I've seen you hang around elsewhere.

this is my domain

actually its oysi's but still you dont tell people to get out
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image