Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

998267 Posts in 39150 Topics- by 30560 Members - Latest Member: kust

April 18, 2014, 01:23:25 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)The happy programmer room
Pages: 1 ... 206 207 [208] 209 210 ... 249
Print
Author Topic: The happy programmer room  (Read 317038 times)
Liosan
Level 2
**


View Profile
« 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 Lips Sealed Oh, wait, it's the happy thread, nevermind  Wink

Liosan
Logged

RobJinman
Level 0
***



View Profile WWW Email
« 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
Level 1
*



View Profile WWW Email
« 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

Unity Patterns - Tools & Resources for Unity Developers
FlashPunk - 2D Flash Game Engine
Chill3r
Level 0
**

Probably debugging right now.


View Profile Email
« 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 Smiley
Logged

YES I am using Java.
Developing http://forums.tigsource.com/index.php?topic=30698.0 right now. // Looking for a designer
-N
Quarry
Level 10
*****



View Profile WWW
« Reply #3109 on: January 06, 2013, 12:44:17 PM »

Limit the FPS dawg it's gonna burn itself
Logged

 
goshki
Level 3
***



View Profile WWW
« Reply #3110 on: January 07, 2013, 01:58:12 AM »

Now, display it. Cool

You know that awesome moment when you rework your old code and suddenly..... Smooth 4,5k fps.... Ouuu yeahhh Smiley
Logged

Chill3r
Level 0
**

Probably debugging right now.


View Profile Email
« 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

YES I am using Java.
Developing http://forums.tigsource.com/index.php?topic=30698.0 right now. // Looking for a designer
-N
SeaWyrm
Level 0
**


View Profile Email
« 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.  Grin
Logged
Muz
Level 10
*****



View Profile Email
« 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 Smiley
Logged
InfiniteStateMachine
Level 10
*****



View Profile WWW Email
« 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 8
***



View Profile
« 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
Martyr
Level 0
**



View Profile Email
« Reply #3116 on: January 10, 2013, 11:22:58 AM »

Quadtrees, so wonderful Tears of Joy

Logged

_Tommo_
Level 8
***


frn frn frn


View Profile WWW
« 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 Smiley

everyone, stop using FPS as a metric!
Logged

eigenbom
Level 10
*****



View Profile WWW
« 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 Smiley

everyone, stop using FPS as a metric!

i already do that, stop yelling at me! Wink
Logged

omgnoseat
Level 3
***



View Profile
« 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 Sad
Logged

Pages: 1 ... 206 207 [208] 209 210 ... 249
Print
Jump to:  

Theme orange-lt created by panic