Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411517 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 01:06:10 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 186 187 [188] 189 190 ... 279
Print
Author Topic: The happy programmer room  (Read 678681 times)
rosholger
Level 1
*



View Profile
« Reply #3740 on: May 12, 2014, 01:23:41 PM »

implemented glsl rendering in angel2d! now that i have the basics, the cool stuff can follow! Beer!
Logged
SodiumEyes
Level 0
**



View Profile
« Reply #3741 on: May 19, 2014, 11:12:28 AM »

Added a visible trail behind the player



I think it really adds to the sense of movement
Logged
Graham-
Level 10
*****


ftw


View Profile
« Reply #3742 on: May 19, 2014, 11:24:04 AM »

I think I'm cured of oo-itis.

be careful. it hibernates.
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #3743 on: May 20, 2014, 08:47:20 PM »

Figured out how to prevent my TUI in cmd.exe from flickering. Even though I'm not clearing the entire screen, and only certain elements the console still exhibits signs of flickering. So, why not double buffer the console? Thanks to some low-level kernel32.dll calls, it works like a charm.

Really glad to have spent some time refactoring and getting the TUI in order. Onto networking!
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #3744 on: June 16, 2014, 06:57:01 AM »

Found a typo that was locking some prototype systems at a way lower tick rate than intended - nice to see it jump from 17fps to 60fps without breaking a sweat (<5% CPU utilisation), even with TTF rendering and the like mixed in there. Annoying that the typo was in there in the first place, but I can at least get to sleep a happy man.
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #3745 on: June 27, 2014, 08:11:12 AM »

Code:
///////////////////////////
// Hash Example code
///////////////////////////
/*
using namespace hash;
//construct
Hash h = createHash<char*>();
char** temp;
//add
add<char*>(h, "hello", 1);
add<char*>(h, "world!", 3);
add<char*>(h, "there", 2);
//iteration + getting elements
for(begin(h); !end(h); next(h))
{
temp = current<char*>(h);
}
//reverse iteration + getting keys
for(rbegin(h); !rend(h); prev(h))
{
ID i = currentKey(h);
}
//find
temp = lookup<char*>(h, 1);  //hello
temp = lookup<char*>(h, 2);  //there
temp = lookup<char*>(h, 3);  //world!
//remove
remove(h,3);
remove(h,2);
remove(h,1);
//free
FreeHash(h);
*/
///////////////////////////
Got all of this Hash code working (along with a similar List structure and interface) in a day and a half's spare time. Particularly pleased with the iteration stuff - looks a lot like STL iterators without the huge awful iterator declarations, because the container works as it's own iterator - if you need more than one iterator for the same container for some reason you can just make a simple data copy of the container because its type is a POD struct (with members considered read only in most cases).

I'm taking the approach laid out by the bitsquid guys with their foundation code, putting related functions into a namespace rather than implementing everything as member functions, which has had the interesting side effect with these containers of allowing untemplated containers - all hashes are a Hash instead of a Hash<T>. I've yet to discover if this is a bad thing or not :^)

I'm still unsure if I really enjoy this kind of "low level" work or not, but it's nice to see it working either way.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #3746 on: June 27, 2014, 11:18:47 PM »

I think I'm cured of oo-itis.

be careful. it hibernates.

hahah don't worry, I'm pretty sure it's dead. Unless I'm using a language where I'm forced.
Logged

Rhatos
Level 0
***



View Profile
« Reply #3747 on: June 29, 2014, 03:28:12 AM »

I finally figured out how to make my guy shoot in the other direction in Game maker  Smiley 
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #3748 on: June 29, 2014, 03:41:29 AM »

Haha, welcome to the thread Smiley congrats.
Logged

gamerzap
Level 0
***



View Profile
« Reply #3749 on: June 30, 2014, 09:41:27 AM »

I've been making a raycaster for a game, and even with no walls at first it was getting 8 FPS.  I did a bit of optimizing and got it up to 45ish.  Still more to go, but I'm pretty happy I was able to make that much of a difference in it.  Smiley
Logged
Slader16
Level 8
***



View Profile
« Reply #3750 on: June 30, 2014, 03:45:18 PM »

I finally figured out how to sort an array, took me 2 weeks but I did it!  Coffee
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #3751 on: June 30, 2014, 04:50:24 PM »

Haha, times like these I'm glad to have been formally taught that stuff as part of my degree. Congrats for working it out on your own, but be careful that you're doing it a performance conscious way, there are fast ways and slow ways to sort data.

I've been making a raycaster for a game, and even with no walls at first it was getting 8 FPS.  I did a bit of optimizing and got it up to 45ish.  Still more to go, but I'm pretty happy I was able to make that much of a difference in it.  Smiley
congrats, remember you can always parallelise that sort of rendering for a very healthy speed up too.
Logged

Slader16
Level 8
***



View Profile
« Reply #3752 on: June 30, 2014, 05:22:30 PM »

Haha, times like these I'm glad to have been formally taught that stuff as part of my degree. Congrats for working it out on your own, but be careful that you're doing it a performance conscious way, there are fast ways and slow ways to sort data.

I've been making a raycaster for a game, and even with no walls at first it was getting 8 FPS.  I did a bit of optimizing and got it up to 45ish.  Still more to go, but I'm pretty happy I was able to make that much of a difference in it.  Smiley
congrats, remember you can always parallelise that sort of rendering for a very healthy speed up too.
Well I don't feel 100% confident that it's the best way to do it. I'm using array.orderBy() in a void Update (Is that a bad thing?) Who, Me?
Logged

Geti
Level 10
*****



View Profile WWW
« Reply #3753 on: June 30, 2014, 05:30:53 PM »

What you just asked is incredibly domain specific (Arrays in C aren't "objects", for example, and raw arrays in C++ aren't either, and Arrays in ActionScript are objects but have different methods, and so on) but, assuming you mean C# arrays, it should be fine for small collections.

If you want to avoid the overhead of creating a new array and sorting data into that (which would be important if your array is like, megabytes large) you might want to use array.Sort but people seem to feel that array.Sort gets messy quickly.


With my comments about doing it in a performance conscious way I had assumed you implemented your own sorting algorithm - and if you aren't aware of the theory there it's easy to write a slow sort. If you're using library implementations it's usually a safe bet that they're using one of the fast algorithms.
Logged

Slader16
Level 8
***



View Profile
« Reply #3754 on: June 30, 2014, 05:37:58 PM »

What you just asked is incredibly domain specific (Arrays in C aren't "objects", for example, and raw arrays in C++ aren't either, and Arrays in ActionScript are objects but have different methods, and so on) but, assuming you mean C# arrays, it should be fine for small collections.

If you want to avoid the overhead of creating a new array and sorting data into that (which would be important if your array is like, megabytes large) you might want to use array.Sort but people seem to feel that array.Sort gets messy quickly.


With my comments about doing it in a performance conscious way I had assumed you implemented your own sorting algorithm - and if you aren't aware of the theory there it's easy to write a slow sort. If you're using library implementations it's usually a safe bet that they're using one of the fast algorithms.
Yeah I'm using Unity C#  Smiley
But the problem is that I'm sorting through an array that can be potentially huge.  Concerned
Logged

Graham-
Level 10
*****


ftw


View Profile
« Reply #3755 on: June 30, 2014, 09:45:20 PM »

I think I'm cured of oo-itis.

be careful. it hibernates.

hahah don't worry, I'm pretty sure it's dead. Unless I'm using a language where I'm forced.

My rough solution is this:
 1. Laziest implementation first.
 2. Upgrade by necessity of feature, or provable increase in elegance.

But I still fuck it up.
Logged
gamerzap
Level 0
***



View Profile
« Reply #3756 on: July 01, 2014, 03:45:20 AM »

Haha, times like these I'm glad to have been formally taught that stuff as part of my degree. Congrats for working it out on your own, but be careful that you're doing it a performance conscious way, there are fast ways and slow ways to sort data.

I've been making a raycaster for a game, and even with no walls at first it was getting 8 FPS.  I did a bit of optimizing and got it up to 45ish.  Still more to go, but I'm pretty happy I was able to make that much of a difference in it.  Smiley
congrats, remember you can always parallelise that sort of rendering for a very healthy speed up too.
Yeah, I know, but this is just a small project and I'm using java and I don't want to get into GPU stuff for it.  I might later on if it needs the speed boost, though.
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #3757 on: July 01, 2014, 03:21:18 PM »

Ignoring the gpu, Java has really easy threading that you could be using to double or quadruple the rendering speed.
Logged

gamerzap
Level 0
***



View Profile
« Reply #3758 on: July 01, 2014, 04:54:04 PM »

Ignoring the gpu, Java has really easy threading that you could be using to double or quadruple the rendering speed.
Oh, thanks, I didn't even think of that :D
I'll have to try and implement that later.
Logged
dancing_dead
Level 2
**


View Profile
« Reply #3759 on: July 03, 2014, 01:17:39 AM »

this just happened:
http://blogs.msdn.com/b/somasegar/archive/2014/07/02/microsoft-acquires-syntaxtree-creator-of-unityvs-plugin-for-visual-studio.aspx

my interest in Unity just increased by a factor of about 100.
Logged
Pages: 1 ... 186 187 [188] 189 190 ... 279
Print
Jump to:  

Theme orange-lt created by panic