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

Login with username, password and session length

 
Advanced search

1075932 Posts in 44152 Topics- by 36119 Members - Latest Member: Royalhandstudios

December 29, 2014, 04:18:01 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)The happy programmer room
Pages: 1 ... 176 177 [178] 179 180 ... 198
Print
Author Topic: The happy programmer room  (Read 371741 times)
Muz
Level 10
*****



View Profile Email
« Reply #3540 on: September 05, 2013, 07:18:03 PM »

I'M WEB/GAME NOW!



What game is that? I've been looking for a web roguelike I can procrastinate with.
Logged
Quarry
Level 10
*****



View Profile WWW
« Reply #3541 on: September 05, 2013, 08:08:51 PM »

It's a mini project I'd like to spend more time on but can't
Logged

 
Geti
Level 10
*****



View Profile WWW
« Reply #3542 on: September 05, 2013, 09:03:40 PM »

Me: guess what this is:


Friend: local file inclusion vulnerability exploit?

Not too far from the truth haha, start of a completely "scripted" text editor looking at the first 250 characters of its source (non whitespace inclusive).

static vars in each script are basically "script local" storage as long as each object's script is compiled separately. I'm keeping it data oriented so each script works on a bunch of data - in part to justify them to being separate compiled "programs" haha, for example the animation script integrates all the animations, not just the animation for just one object. Much faster, and much more self contained code.

It's fun thinking in a very non-OO way about this kinda stuff. It's currently like building pipelines for the data to flow through - or crash Smiley Don't think this kinda stuff is suitable for production sadly, too easy to crash with C. We'll see though.
Logged

Graham-
Level 10
*****


ftw


View Profile
« Reply #3543 on: September 06, 2013, 06:19:43 AM »

I'm 2% of the way towards making emacs the powerful and useful editor it should be, for my own tasks.

considering I started out at about around 2% I think I'm making pretty good progress.
Logged
Kekskiller
Guest
« Reply #3544 on: September 06, 2013, 03:00:23 PM »

Finished a first version of a module to replace shell scripts. It's essentially a set generators and processors for text files only containing paths/filenames, each in a single line. So far I can read, write, sort, generate (recursively with lotsa path options) and filter stuff using wildcard patterns.

Only thing left is spawning tools, functions or threads per for listed line. I already got nice generic command line option parsers (complete with keyword checks, required and optional arguments etc) so it should pair nicely to make some tools possible on all compilers that provide some sort of POSIX implemention.
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #3545 on: September 06, 2013, 06:39:25 PM »

I had this idea for a nifty little generic, and I just got done implementing it.

Before:

After:

Yeah, I'm happy.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
Kekskiller
Guest
« Reply #3546 on: September 07, 2013, 01:06:19 AM »

Hey, that 404 is sort of an awesome for not-yet-implement but already desired parts of an hud.

May I shameless borrow it and become rich and wealthy?
Logged
Graham-
Level 10
*****


ftw


View Profile
« Reply #3547 on: September 07, 2013, 06:55:58 AM »

466? Holy shit.

I'm using udk and there are two complaints:
  . slow
  . generating content (models) not straight-forward

Logged
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW Email
« Reply #3548 on: September 08, 2013, 06:06:35 AM »

I have today a semi-reasonable reason to overload the () operator in one of my C++ classes, and I will not hesitate. This is a great day.
Logged

dum mak gam
Vatnsmyrkr, deep sea exploration: devlog
avaskoog @ twitter
avaskoog.se

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #3549 on: September 08, 2013, 08:23:24 AM »

I have today a semi-reasonable reason to overload the () operator in one of my C++ classes, and I will not hesitate. This is a great day.

You obviously don't write very many functors.  I overload () all the time.

The holy grail for operator overloading is , (comma).  Still haven't found a good use for that one.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW Email
« Reply #3550 on: September 08, 2013, 09:56:10 AM »

I have today a semi-reasonable reason to overload the () operator in one of my C++ classes, and I will not hesitate. This is a great day.

You obviously don't write very many functors.  I overload () all the time.
This is my first or second time or something implementing a component-based engine powered by scripting rather than an inheritance-based one completely made in pure, compiled programming, so things are turning out very differently than they normally do. This is such a nice way to work, anyhow.

I'm also using a lot of very unorthodox templates and nobody shall stop me from doing it.

The holy grail for operator overloading is , (comma).  Still haven't found a good use for that one.
I think I had some funny idea for that some time, but I no longer remember it.
« Last Edit: September 08, 2013, 10:07:54 AM by Skomakar'n » Logged

dum mak gam
Vatnsmyrkr, deep sea exploration: devlog
avaskoog @ twitter
avaskoog.se

_Tommo_
Level 8
***


frn frn frn


View Profile WWW
« Reply #3551 on: September 08, 2013, 12:42:31 PM »

I think I had some funny idea for that some time, but I no longer remember it.

This might be an use:
Code:
Vector v = 0,1,2;

Also, if you do that on code I work on I will punch you in the face Beer!
Logged

BleakProspects
Level 4
****



View Profile WWW Email
« Reply #3552 on: September 08, 2013, 01:04:28 PM »

You could also use it to generate a sequence in a behavior tree:

Code:
Seq = B1, B2, B3;
Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW Email
« Reply #3553 on: September 08, 2013, 02:38:30 PM »

I like both of those suggestions, actually. I made a vector class today. I'm so trying that. It's genius.

Well, wait, does the comma operator not just return the vector again or something? How is it supposed to know which coördinate is which? I don't think it will work... Sad
Logged

dum mak gam
Vatnsmyrkr, deep sea exploration: devlog
avaskoog @ twitter
avaskoog.se

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW Email
« Reply #3554 on: September 08, 2013, 05:36:02 PM »

fuuuuck yeeeeaaahrr SDL fuckin' 2.0  Hand Metal LeftNo No NOHand Metal Right





EDIT:
Another source of joy is the utter beauty of how well-structured my project is, for once:



Note that the M and A icons also reveal that it is connected to a GIT repository for version control and synchronisation with the other developer.

The two stray AS files are just for testing, of course, so the fact that they currently disrupt the beautiful structure is of no importance.
« Last Edit: September 08, 2013, 10:48:06 PM by Skomakar'n » Logged

dum mak gam
Vatnsmyrkr, deep sea exploration: devlog
avaskoog @ twitter
avaskoog.se

_Tommo_
Level 8
***


frn frn frn


View Profile WWW
« Reply #3555 on: September 09, 2013, 01:54:31 PM »

Well, wait, does the comma operator not just return the vector again or something? How is it supposed to know which coördinate is which? I don't think it will work... Sad

I guess you could make a constructor that takes 1 float and sets x to it and y and z to NaN; then comma sets either y or z depending on which one is NaN?
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #3556 on: September 09, 2013, 05:12:05 PM »

Well, wait, does the comma operator not just return the vector again or something? How is it supposed to know which coördinate is which? I don't think it will work... Sad

You return a bridge object that holds a reference to the vector and an indicator of which position to assign next, and you overload comma for that too.

Something like so:

Code:
CommaBridge operator , (Vector &lhs, int rhs)
{
    lhs[1] = rhs;  // Position 0 was already assigned by Vector::operator = (int).

    return CommaBridge(lhs, 2); // Position 2 is next.
}

CommaBridge &operator , (CommaBridge &lhs, int rhs)
{
    lhs.vector[lhs.position++] = rhs;  Assign the next position, then increment.

    return lhs;
}
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
Geti
Level 10
*****



View Profile WWW
« Reply #3557 on: September 09, 2013, 05:40:41 PM »

...Is it just me that doesn't have any problem with
Code:
Vec3f v(1,2,3);
then?
Logged

eigenbom
Level 10
*****



View Profile WWW
« Reply #3558 on: September 09, 2013, 05:52:06 PM »

...Is it just me that doesn't have any problem with
Code:
Vec3f v(1,2,3);
then?

You mean the normal way? Used in glsl, sfml, box2d, etc. I don't think you're alone..
Logged

Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #3559 on: September 09, 2013, 06:10:50 PM »

...Is it just me that doesn't have any problem with
Code:
Vec3f v(1,2,3);
then?

You mean the normal way? Used in glsl, sfml, box2d, etc. I don't think you're alone..

That's fine for a vector of fixed size.  This is assuming a vector of unknown size.

Of course in C++11, you can just use a std::initializer_list
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
Pages: 1 ... 176 177 [178] 179 180 ... 198
Print
Jump to:  

Theme orange-lt created by panic