|
Liosan
|
 |
« Reply #3105 on: January 05, 2013, 04:13:22 AM » |
|
Every now and then you get the rare pleasure of coding your ass off for a couple of hours, and seeing how it compiles without errors and works perfectly. Cherish it.
It's means all your bugs are hidden  Oh, wait, it's the happy thread, nevermind  Liosan
|
|
|
|
|
Logged
|
|
|
|
|
RobJinman
|
 |
« Reply #3106 on: January 05, 2013, 08:09:45 AM » |
|
Tried to implement proper resource management in my engine so that I can have large, seamless levels (unlike in my previous game), and it appears to work.. But I didn't do any research beforehand, so I'm not sure how sane my solution is (details here for anyone who wants to check it out).
|
|
|
|
|
Logged
|
|
|
|
|
ChevyRay
|
 |
« Reply #3107 on: January 05, 2013, 09:26:09 AM » |
|
That makes sense, I've written very similar code before (9-segments loaded at once, unload/load sets of 3 as you move).
One thing I usually do is separate the static terrain/details from the changing ones. So for example, each segment would have a TERRAIN file and a DATA file, and basically, the DATA file stores global information. Then I could do something like this when a segment is loaded:
Look at the data file Has segment been visited? Has segment been recently visited (check timestamp)? Leave data file as-is else Reset data file (which can have new random stuff in it) else Initialize data file
Load data file into segment
So now if I drop an item, walk a couple tiles away, then return to that tile, it will re-load the data which has the item I dropped still sitting there. But if I leave, and come back 10 minutes later, the timestamp (or travelstamp) will detect that I've been away for a long time, so when it loads it, it can load it up with something new.
So just think of DATA as variable changing terrain/details, and each segment can have its own instructions about what it loads based on the above conditions combined with conditions marked out either in the map file or the TERRAIN file (eg. type of area, near a town, near water, on a road, etc.)
|
|
|
|
|
Logged
|
|
|
|
|
Chill3r
|
 |
« Reply #3108 on: January 06, 2013, 11:09:57 AM » |
|
You know that awesome moment when you rework your old code and suddenly..... Smooth 4,5k fps.... Ouuu yeahhh 
|
|
|
|
|
Logged
|
|
|
|
|
Quarry
|
 |
« Reply #3109 on: January 06, 2013, 12:44:17 PM » |
|
Limit the FPS dawg it's gonna burn itself
|
|
|
|
|
Logged
|
|
|
|
|
goshki
|
 |
« Reply #3110 on: January 07, 2013, 01:58:12 AM » |
|
Now, display it.  You know that awesome moment when you rework your old code and suddenly..... Smooth 4,5k fps.... Ouuu yeahhh 
|
|
|
|
|
Logged
|
|
|
|
|
Chill3r
|
 |
« Reply #3111 on: January 07, 2013, 05:38:35 AM » |
|
Sure the FPS will be limited in the final version, but for now I keep it unlimited to show how stable it works;)
|
|
|
|
|
Logged
|
|
|
|
|
SeaWyrm
|
 |
« Reply #3112 on: January 08, 2013, 10:27:28 PM » |
|
About a week and a half ago, I worked on coding a feature for the game I'm working on, ran into several problems, kept digging myself in deeper, and eventually reverted all the changes back to the last version of the game that worked. Today I took another crack at it and got it clean, with only minor stumbling blocks that were quickly resolved. Now the door can tell the difference between the switch being hit and the player just walking up and spamming the interact button at it. 
|
|
|
|
|
Logged
|
|
|
|
|
Muz
|
 |
« Reply #3113 on: January 09, 2013, 10:25:17 PM » |
|
After enough struggling and swearing at anything, everything suddenly clicks and you understand why everything functioned in such an annoying manner 
|
|
|
|
|
Logged
|
|
|
|
|
InfiniteStateMachine
|
 |
« Reply #3114 on: January 10, 2013, 06:27:07 AM » |
|
Working on a multitierd system where a lot of functionality has been delegated to a giant global class that handles tons of unrelated tasks.
You'd think it would be a grumpy programmer post but the good side of this is that it's really shown me the value of dependency injection.
|
|
|
|
|
Logged
|
|
|
|
sublinimal
Level 6
This game is: UNPLAYABLE
|
 |
« Reply #3115 on: January 10, 2013, 11:09:47 AM » |
|
Figured out how to make online high scores work via the Kongregate API.
It's like, one moment you feel retarded because it shouldn't be taking this long, and the next it suddenly works and everything's alright in the world.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
_Tommo_
|
 |
« Reply #3117 on: January 10, 2013, 02:44:51 PM » |
|
I've switched to a fixed-timestep rendering cycle that is fixed to the vsync, and I'm measuring the performance of my game in terms of "used timestep percent". It makes so much more sense to see "9%" instead of a meaningless 694 fps  everyone, stop using FPS as a metric!
|
|
|
|
|
Logged
|
|
|
|
|
eigenbom
|
 |
« Reply #3118 on: January 10, 2013, 03:42:30 PM » |
|
I've switched to a fixed-timestep rendering cycle that is fixed to the vsync, and I'm measuring the performance of my game in terms of "used timestep percent". It makes so much more sense to see "9%" instead of a meaningless 694 fps  everyone, stop using FPS as a metric! i already do that, stop yelling at me! 
|
|
|
|
|
Logged
|
|
|
|
|
omgnoseat
|
 |
« Reply #3119 on: January 10, 2013, 03:44:14 PM » |
|
I decided to try making a voxel engine in Unity a week ago and it's just too damn fun to stop. I'm using four layers of 2d Perlin noise to generate terrain and rendering it in chunks of 16x16x16.  I'm going to have to add another layer of dirt around the bases of the mountains because they start a little suddenly as it is now, also it will look like erosion if I get it right. I couldn't get unity to render more than 100x100 blocks last time I checked 
|
|
|
|
|
Logged
|
|
|
|
|