1. Post #1401
    false prophet's Avatar
    October 2011
    943 Posts
    Tried my hand at captcha generating because it seemed fun. Took my program several seconds to generate it though...

    Answer is 5Sa1t2Oy, also I don't know anything about the science.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 12Dumb Dumb x 1 (list)

  2. Post #1402
    benji2015's Avatar
    October 2010
    476 Posts


    Making another tile thing... again

    (I only got about 60-80 fps in that screenshot, uncapped fps.. pretty bad)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 7 (list)

  3. Post #1403
    Gold Member
    Darwin226's Avatar
    January 2009
    4,073 Posts


    Making another tile thing... again

    (I only got about 60-80 fps in that screenshot, uncapped fps.. pretty bad)
    Render terrain to texture once and modify only when terrain is modified. Otherwise just draw the texture.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Agree Agree x 4 (list)

  4. Post #1404
    benji2015's Avatar
    October 2010
    476 Posts
    Render terrain to texture once and modify only when terrain is modified. Otherwise just draw the texture.
    I do. Without the lighting I get about 500 to 600 fps. With lighting, the maximum I get is around 85.

    Edited:

    Not having two separate passes through the lighting overlay, one for clearing and one for blurring, would probably help a lot....
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  5. Post #1405
    Gold Member
    Bambo.'s Avatar
    April 2011
    486 Posts


    Making another tile thing... again

    (I only got about 60-80 fps in that screenshot, uncapped fps.. pretty bad)
    I really do like this Terraria-esk art style, looks swanky.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 6 (list)

  6. Post #1406
    Team Hamster
    Mordi's Avatar
    January 2012
    312 Posts
    Did you do the passing the draw method the interpolation value?
    If not mind showing a minimal example of how your version works? I would much rather not have to use the draw(interpolation ) method
    I think only Update should need the interpolation variable, since the Draw functions should just do what it says on the tin; draw. If you change variables or do other stuff than drawing in the draw-functions, you might end up in trouble later if you want to leave the drawing out and just perform the update-function in any of your classes at some point, for example.
    Reply With Quote Edit / Delete Windows 7 Norway Show Events

  7. Post #1407
    Richy19's Avatar
    May 2010
    5,382 Posts
    I think only Update should need the interpolation variable, since the Draw functions should just do what it says on the tin; draw. If you change variables or do other stuff than drawing in the draw-functions, you might end up in trouble later if you want to leave the drawing out and just perform the update-function in any of your classes at some point, for example.
    Oh, I realize that you should do it that way but the way it shows here http://gafferongames.com/game-physic...your-timestep/ is by passing the interpolation value to Draw(), so I just wanted to know how he did it without that(if he did it without that is)
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  8. Post #1408
    NovembrDobby's Avatar
    April 2007
    1,147 Posts
    Did you do the passing the draw method the interpolation value?
    If not mind showing a minimal example of how your version works? I would much rather not have to use the draw(interpolation ) method
    Instead of passing it around I just make it accessible anywhere, because I have an absolute ton of different methods that use it. Unless you mean the between-frames alpha value that the article talks about, most of the time I just do this:

    Code:
    if(campaign_emphTimeTrials > 0)
       campaign_emphTimeTrials -= Core::deltaMult; //previously this was an int that was decremented each frame
    I think only Update should need the interpolation variable, since the Draw functions should just do what it says on the tin; draw. If you change variables or do other stuff than drawing in the draw-functions, you might end up in trouble later if you want to leave the drawing out and just perform the update-function in any of your classes at some point, for example.
    Pretty much this, although there are still some drawing funcs that use it. I don't plan on separating calls to update and draw in the future though so I didn't worry about that.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  9. Post #1409
    Team Hamster
    Mordi's Avatar
    January 2012
    312 Posts
    Pretty much this, although there are still some drawing funcs that use it. I don't plan on separating calls to update and draw in the future though so I didn't worry about that.
    Hmm, do you have any examples of when the draw-function would use it? It should be possible for the update-event to reflect any needed variables that draw might need.
    Reply With Quote Edit / Delete Windows 7 Norway Show Events

  10. Post #1410
    ben1066's Avatar
    August 2009
    1,025 Posts

    It renders but touch input is giving me some issues. The mouse cursor tracks the correct position, however I can only touch one element, once I do, I get stuck on that element, I think it's because the mouse cursor jumps....
    EDIT: Fixed, I was doing mouse click before mouse move. We now have cross-platform GWEN.

    Windows Phone 7


    Xbox 360


    Windows
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events Winner Winner x 35Programming King Programming King x 2 (list)

  11. Post #1411
    NovembrDobby's Avatar
    April 2007
    1,147 Posts
    Hmm, do you have any examples of when the draw-function would use it? It should be possible for the update-event to reflect any needed variables that draw might need.
    The ones I can find are mostly just little effects like this:



    (the white thing at the start)

    I could just move all that stuff to update but I won't unless I need to
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Artistic Artistic x 4 (list)

  12. Post #1412
    Richy19's Avatar
    May 2010
    5,382 Posts
    The ones I can find are mostly just little effects like this:



    (the white thing at the start)

    I could just move all that stuff to update but I won't unless I need to
    so to get this straight does your run method (or w.e. its called) now look kinda like this:
    const int TICKS_PER_SECOND = 25;
        const int SKIP_TICKS = 1000 / TICKS_PER_SECOND;
        const int MAX_FRAMESKIP = 5;
    
        DWORD next_game_tick = GetTickCount();
        int loops;
        float interpolation;
    
        bool game_is_running = true;
        while( game_is_running ) {
    
            loops = 0;
            while( GetTickCount() > next_game_tick && loops < MAX_FRAMESKIP) {
                update_game();
    
                next_game_tick += SKIP_TICKS;
                loops++;
            }
    
            interpolation = float( GetTickCount() + SKIP_TICKS - next_game_tick )
                            / float( SKIP_TICKS );
            display_game( interpolation );
        }
    

    but you have just made interpolation available to everything instead of passing it to draw?

    Edited:

    The reason im asking is because I get how it can work with custom physics (which I believe you use) but if your using something like Bullet/Box2D all you do is update the world passing in the delta, so in te draw method you cant just simply do:

    view_position = position + (speed * interpolation)


    Im quite tempted to just use the normal passing update the delta method but limiting the max fps to 200/300 and then clamp the delta to something like 0.2 (5fps) to 0.005(200fps)
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  13. Post #1413
    NovembrDobby's Avatar
    April 2007
    1,147 Posts
    so to get this straight does your run method (or w.e. its called) now look kinda like this:

    but you have just made interpolation available to everything instead of passing it to draw?
    Sort of, but I call update and draw right next to each other and don't use any skip stuff.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  14. Post #1414
    Team Hamster
    Mordi's Avatar
    January 2012
    312 Posts
    Now I've got the beginnings of a proper menu-system going. I've got it doing Update and Draw automatically now. I am adding these elements by doing this:
    // Add a box
    	AddBox("A box", 250, 300, 36 * 5 + 20, 36 * 5 + 20, 0);
    	// Add some buttons
    	for(int i = 0; i < 5; i ++)
    	{
    		for(int n = 0; n < 5; n ++)
    		{
    			AddButton(toString(i + (n * 5)), 260 + i * 36, 310 + n * 36, 35, 35, 0);
    		}
    	}

    Which makes it really easy to add and remove items.

    Reply With Quote Edit / Delete Windows 7 Norway Show Events Programming King Programming King x 7 (list)

  15. Post #1415
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts


    That's a bit better, but I'm still missing a bunch of triangles somehow and there's something wrong with my texture decompression leaving random paint splats everywhere.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Winner Winner x 9Artistic Artistic x 2Programming King Programming King x 1 (list)

  16. Post #1416
    Kate Adams
    COBRAa's Avatar
    June 2009
    975 Posts
    Well, I fixed my problem I had yesterday with VBOs performing slowly (I had enough of shotgun coding and rewrote the buffer shit, which somehow fixed my problem.)

    So, I added a light and shit. All is good except the lighting isn't smoothed:



    2 hours later, normals are per vertex:



    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Artistic Artistic x 3Winner Winner x 2Programming King Programming King x 1 (list)

  17. Post #1417
    Richy19's Avatar
    May 2010
    5,382 Posts
    Well, I fixed my problem I had yesterday with VBOs performing slowly (I had enough of shotgun coding and rewrote the buffer shit, which somehow fixed my problem.)

    So, I added a light and shit. All is good except the lighting isn't smoothed:



    2 hours later, normals are per vertex:



    How long does it take to for your smoothing normals method to run?
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  18. Post #1418
    Kate Adams
    COBRAa's Avatar
    June 2009
    975 Posts
    How long does it take to for your smoothing normals method to run?
    Haven't benchmarked it, but I assume slow at the moment.

    Edited:

    Ok, about 0.08 seconds for 18960 verts.

    Edited:

    Is that good or bad?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  19. Post #1419
    Richy19's Avatar
    May 2010
    5,382 Posts
    Haven't benchmarked it, but I assume slow at the moment.

    Edited:

    Ok, about 0.08 seconds for 18960 verts.

    Edited:

    Is that good or bad?
    mine use to take about 2-3 seconds for about 15 000 verts so not too bad.
    Mind sharing how you do it?
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Agree Agree x 1 (list)

  20. Post #1420
    ben1066's Avatar
    August 2009
    1,025 Posts
    I've put my Gwen.NET XNA port up at https://bitbucket.org/ben1066/gwen-dotnet-xna/src . It's the purexna branch. Since the above screen-shots I have fixed the cursor and cleaned up the code. I also reduced the Xbox 360 resolution to 1280x720 since that should run on all TVs. It is incompatible with Gwen.Net because it uses Microsoft.Framework.Xna.Color, Rectangle and Point instead of the respective System.Drawing classes, however it shouldn't be TOO hard to fix.
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events

  21. Post #1421
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    ...something tells me I've fucked up again...




    Why did I ever think this would work?
    uint32_t i = procedural->vercolormap[lastPlace];
    float index = i / (float)procedural->numPoints;
    
    gk::ColorRGB srccolor = gk::ColorRGB(0.f, 0.f, 0.f, 0.f);
    
    srccolor.setColor(gkDraw->program);
    
    Reply With Quote Edit / Delete Windows 7 Show Events Artistic Artistic x 4 (list)

  22. Post #1422
    Kate Adams
    COBRAa's Avatar
    June 2009
    975 Posts
    mine use to take about 2-3 seconds for about 15 000 verts so not too bad.
    Mind sharing how you do it?
    // No normals were present in the model
    if(!norms)
    {
    	for(unsigned int i = 0; i < faces * 3; i += 3)
    	{
    		face_t* face = (face_t*)&pVertexes[i];
    		CVector& a = face->v1;
    		CVector& b = face->v2;
    		CVector& c = face->v3;;
    		CVector norm = -(b - a).Cross(c - a); // My normals were backwards...
    		//cout << i << ": " << norm << '\n';
    		pNormals[i + 0] += norm;
    		pNormals[i + 1] += norm;
    		pNormals[i + 2] += norm;
    	}
    
    	for(unsigned int i = 0; i < faces * 3; i++)
    		pNormals[i].Normalize();
    
    	// Now, lets smooth the normals
    	double start = pEngineInstance->GetTime();
    
    	bool* pDoneVert = new bool[faces * 3];
    	for(unsigned int i = 0; i < faces * 3; i++)
    		pDoneVert[i] = false;
    
    	for(unsigned int i = 0; i < faces * 3; i++)
    	{
    		if(pDoneVert[i])
    			continue;
    		pDoneVert[i] = true;
    			
    		vector<CVector*> group;
    
    		group.push_back(&pNormals[i]);
    		CVector& apos = pVertexes[i];
    		CVector& anorm = pNormals[i];
    
    		for(unsigned int n = i; n < faces * 3; n++)
    		{
    			if(pDoneVert[n])
    				continue;
    				
    			CVector& bpos = pVertexes[n];
    			CVector& bnrm = pNormals[n];
    				
    			// TODO: Angle!
    
    			if(apos == bpos) //(apos-bpos).Length() < 0.00001 )
    			{
    				group.push_back(&pNormals[n]);
    				pDoneVert[n] = true;
    			}
    		}
    
    		if(group.size() == 1)
    			continue;
    
    		//cout << "Found a group of " << group.size() << " normals\n";
    
    		CVector avg = CVector(0, 0, 0);
    
    		for(int i = 0; i < group.size(); i++)
    			avg += *group[i];
    			
    		avg.Div(group.size());
    		avg.Normalize();
    
    		for(int i = 0; i < group.size(); i++)
    			*group[i] = avg;
    	}
    	delete [] pDoneVert;
    
    	double end = pEngineInstance->GetTime();
    
    	cout << "Smoothing took " << (end-start) << " seconds to run on " << (faces * 3) << " verts\n";
    }

    Edited:

    It has the ability to not group on angle too by finding the dot product of 'anrm' and 'bnrm' and checking it at "if(apos == bpos)".

    pNormals and pVertexs is the data right before it's sent to the card.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  23. Post #1423
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts


    Success!
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Winner Winner x 39Programming King Programming King x 1 (list)

  24. Post #1424
    Facepunch Staff
    layla's Avatar
    March 2010
    2,540 Posts
    Must resist the urge to remake GTA 3.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Dumb Dumb x 2Funny Funny x 1 (list)

  25. Post #1425
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts
    Hey, well that's what I'm doing. The plane controls annoyed me so I thought I'd rewrite the entire game to make flying stuff a bit easier.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 33Zing Zing x 1Programming King Programming King x 1 (list)

  26. Post #1426
    Kate Adams
    COBRAa's Avatar
    June 2009
    975 Posts


    Success!
    Keep posting progress on this, it's hella interesting.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 16Friendly Friendly x 1 (list)

  27. Post #1427
    Richy19's Avatar
    May 2010
    5,382 Posts
    For people that understand GPL, if I (or someone) uses a GPL Library to create a program, but that program is used only internally and is not distributed, do you still technically have to GPL the program?

    Best example is: some company creates a tool that makes use of a GPL library or code, the company isnt going to release the tool itsself because its for internal use. Do they still legally have to GPL it?
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Agree Agree x 1 (list)

  28. Post #1428
    Gold Member
    esalaka's Avatar
    July 2007
    10,132 Posts
    For people that understand GPL, if I (or someone) uses a GPL Library to create a program, but that program is used only internally and is not distributed, do you still technically have to GPL the program?

    Best example is: some company creates a tool that makes use of a GPL library or code, the company isnt going to release the tool itsself because its for internal use. Do they still legally have to GPL it?
    Most likely yes. And thus if they ever decide to distribute it to anyone they'll have to be able to provide the source code.

    Assuming this qualifies as the sort of linking the GPL mentions.

    Edited:

    But really, it doesn't matter. The GPL has no clause that forces you to ever distribute your program to anyone as far as I know.
    Reply With Quote Edit / Delete Linux Finland Show Events

  29. Post #1429
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Hey, well that's what I'm doing. The plane controls annoyed me so I thought I'd rewrite the entire game to make flying stuff a bit easier.
    You might want to have a word with Overv. I seem to remember him coming up with an idea somewhat like this last year.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 4Optimistic Optimistic x 1Funny Funny x 1 (list)

  30. Post #1430
    Gold Member
    Xeon06's Avatar
    September 2005
    1,222 Posts
    Must resist the urge to remake GTA 3.
    Do it.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Agree Agree x 2 (list)

  31. Post #1431
    EGN Founder
    CountNoobula's Avatar
    May 2010
    505 Posts
    Reply With Quote Edit / Delete Windows 7 South Africa Show Events Disagree x 18Winner x 5Dumb x 3Programming King x 2Friendly x 1Useful x 1Funny x 1 (list)

  32. Post #1432
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts
    You might want to have a word with Overv. I seem to remember him coming up with an idea somewhat like this last year.
    I remember that too, this was partly inspired by that and how I've been replaying the game recently (and avoiding revising for exams).

    I'm just making a streaming world viewer, but when I'm done we could have a go at getting that project started again with this as a foundation.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  33. Post #1433
    my portfolio
    Dennab
    April 2012
    1,392 Posts
    I don't mean to offend you CountNoobula, but HardcoreIDE looks shit.

    (User was banned for this post ("not very constructive" - garry))
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Agree Agree x 30Disagree Disagree x 4Dumb Dumb x 2Funny Funny x 2 (list)

  34. Post #1434

    August 2011
    196 Posts
    I don't mean to offend you CountNoobula, but HardcoreIDE looks shit.
    But he's the ultimate badass haxor for using [ ] in place of "O"!
    Reply With Quote Edit / Delete Mac Canada Show Events Dumb Dumb x 10 (list)

  35. Post #1435
    Team Hamster
    Mordi's Avatar
    January 2012
    312 Posts
    I don't mean to offend you CountNoobula, but HardcoreIDE looks shit.
    That's a bit harsh. I think it would look great with some modification. I don't like how it says "HardCode" in the background. Makes everything a bit harder to read, and makes everything seem a bit floaty. The magnifier-feature seems very useful. Having a dark theme is a good idea.
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Agree Agree x 7Late Late x 1 (list)

  36. Post #1436

    April 2012
    87 Posts
    ugly eclipse reskin
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Dumb Dumb x 11Agree Agree x 2Informative Informative x 1 (list)

  37. Post #1437
    DatZach's Avatar
    May 2011
    139 Posts
    It may be ugly, but that can be fixed. The actual features of the IDE seem to be pretty solidly implemented, good work so far.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 8Friendly Friendly x 1 (list)

  38. Post #1438
    Crabman [HUN]'s Avatar
    September 2010
    22 Posts
    The map editor tool is ready for Favágó!

    Currently there is one object to put down to the map:the tree. I will improve it.



    Be creative!

    Reply With Quote Edit / Delete Windows 7 Hungary Show Events Funny Funny x 1 (list)

  39. Post #1439
    Icedshot's Avatar
    April 2010
    2,327 Posts
    Been attempting to make more optimisations for the OpenCL renderer

    The latest optimisation that i've just implemented comes in two parts:

    Spawning one thread per triangle is an easy way to handle drawing stuff to the screen. However, with 2 million triangles, there comes the issue that most of these threads aren't doing anything and are simply wasting processing time (thread overhead for a large amount of threads). The solution to this is to have each individual thread handle more than one triangle. The obvious problem with this is that in a scene with large triangles, the load per thread becomes higher than you would ideally like, and the whole thing slows down

    The second part of the solution is pretty much just implementing the above solution, but applying the optimisation dynamically. Since you can't know how many triangles are drawn until you've drawn them, the number of triangles drawn last frame is used as an approximation of the number of triangles that will be drawn this frame. If this number of triangles is larger than some %age of the screen (/ average number of pixels per triangle above which this operates. Set to 4 for me), the program assumes that there a significant number of small triangles and applies the optimisation. Otherwise, don't.

    Seems to be working fairly well so far. I'm sure, as always, that there is a better solution than this, but for the moment I'm happy with it

    At best, the optimisation provides 5 ms of speed (from 36 -> 31), and in the test scene I use the frame time is ~29 ms/frame down from 33 ms/frame.
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events

  40. Post #1440
    I don't mean to offend you CountNoobula, but HardcoreIDE looks shit.
    I didn't like the UI too, but when I saw the customization options, I'll definitely try it.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Friendly Friendly x 2Agree Agree x 1Disagree Disagree x 1 (list)