[QUOTE=Xerios3;27939997]I'm definitely the one who doesn't care what kind of type of programmer other people are, now please stop.[/QUOTE]
I posted [B]one[/B] link which I thought was interesting and is very relevant to programming. I hardly see how asking me to "stop" makes sense, it's not like I'm a full time troll who posts shit all over the place. Unless you mean at everyone responding. I like WAYWO with a bit of programming chat myself.
That's right soda, rate me dumb, and send me a dumb pm
[QUOTE=Soda][URL="http://stevenbenner.com/2010/07/the-5-types-of-programmers/"][quote]http://stevenbenner.com/2010/07/the-...f-programmers/[/URL]
Where do you guys fit in? I'm almost definitely the duct tape one :buddy:[/quote]
glad to see this is what you're working on
OH, FUCK, WAIT.[/QUOTE]
I guess I should start posting content, like soda.
OH, FUCK, WAIT.
[QUOTE=Jallen;27940428]I posted [B]one[/B] link which I thought was interesting and is very relevant to programming. I hardly see how asking me to "stop" makes sense, it's not like I'm a full time troll who posts shit all over the place.[/QUOTE]
I think he means that people should stop posting what type of programmer they are?
[QUOTE=Jallen;27940428]I posted [B]one[/B] link which I thought was interesting and is very relevant to programming. I hardly see how asking me to "stop" makes sense, it's not like I'm a full time troll who posts shit all over the place. Unless you mean at everyone responding. I like WAYWO with a bit of programming chat myself.[/QUOTE]
I was actually talking to all those who replied except you.
Here, have a <3 as an apology for this misunderstanding :3:
Here's what I've made today. Unless someone has an idea for something or some way in which I can make it better, this is the final version of it.
Source is included. Don't expect any great programming.
[url=http://dl.dropbox.com/u/2670708/even%20more%20folders/progarmming/School%20project.zip]Download it here[/url]
Press Space to go in another mode.
Good night WAYWO.
Whom is rebecca?
Oh... [i]Oh No[/i]. This is terrible. [i]terrrrrrrible[/i]
[cpp]
#include <iostream>
class X {
public:
X() : x(0), y(4) { }
private:
int x;
int y;
};
int main(void) {
X x;
std::cout << (int)*(((char*)&x) + 4) << std::endl;
return 0;
}
[/cpp]
[url]http://codepad.org/9RAE1Lln[/url]
I just never thought to try... :eng99:
[QUOTE=Chandler;27942573]Oh... [i]Oh No[/i]. This is terrible. [i]terrrrrrrible[/i]
[cpp]
#include <iostream>
class X {
public:
X() : x(0), y(4) { }
private:
int x;
int y;
};
int main(void) {
X x;
std::cout << (int)*(((char*)&x) + 4) << std::endl;
return 0;
}
[/cpp]
[url]http://codepad.org/9RAE1Lln[/url]
I just never thought to try... :eng99:[/QUOTE]
[url]http://www.cplusplus.com/reference/clibrary/cstddef/offsetof/[/url]
[QUOTE=Jallen;27940428]I posted [B]one[/B] link which I thought was interesting and is very relevant to programming. I hardly see how asking me to "stop" makes sense, it's not like I'm a full time troll who posts shit all over the place. Unless you mean at everyone responding. I like WAYWO with a bit of programming chat myself.
That's right soda, rate me dumb, and send me a dumb pm
I guess I should start posting content, like soda.
OH, FUCK, WAIT.[/QUOTE]
My guess is Soda can't make a PM without profanity.
[QUOTE=Soda][quote=some gay azz bitch]True, I am not trying to go "oh whaaa doing something bad"[/quote]
yes you fucking are FUCK YOU[/QUOTE]
one recieved a month or two back.
[editline]9th February 2011[/editline]
Heh was so tempted to say. If I ever did go gay I would get more girls then he ever would.
I am working on a Top Down shooter engine, probably will elaborate on it once i get an engine, not so sure yet.
[IMG]http://i869.photobucket.com/albums/ab255/Yournameisinvalid21/Example.png[/IMG]
And here is a quick video of it in action!
[media]http://www.youtube.com/watch?v=JEqlpyQlZ_I&fmt=18[/media]
Really this video does it no justice.
[QUOTE=Chandler;27942573]Oh... [i]Oh No[/i]. This is terrible. [i]terrrrrrrible[/i]
[cpp]
#include <iostream>
class X {
public:
X() : x(0), y(4) { }
private:
int x;
int y;
};
int main(void) {
X x;
std::cout << (int)*(((char*)&x) + 4) << std::endl;
return 0;
}
[/cpp]
[url]http://codepad.org/9RAE1Lln[/url]
I just never thought to try... :eng99:[/QUOTE]
That's only reliable for POD types. Otherwise there is a ton of things which can make it get it wrong - the vtable pointer, padding, order of private/public fields etc.
why
[cpp]X() : x(0), y(4) { }[/cpp]
and not
[cpp]X() {x = 0; y = 0; }[/cpp]
[QUOTE=jA_cOp;27942800]That's only reliable for POD types. Otherwise there is a ton of things which can make it get it wrong - the vtable pointer, padding, order of private/public fields etc.[/QUOTE]
it's a private member! Hence my :eng99:
[QUOTE=likesoursugar;27942802]why
[cpp]X() : x(0), y(4) { }[/cpp]
and not
[cpp]X() {x = 0; y = 0; }[/cpp][/QUOTE]
because { x = 0; y = 0; } is unnecessary in this instance?
[QUOTE=likesoursugar;27942802]why
[cpp]X() : x(0), y(4) { }[/cpp]
and not
[cpp]X() {x = 0; y = 0; }[/cpp][/QUOTE]
(assuming you meant "y = 4;" there)
The initializer list (former) is good practice as it means x and y will never be default initialized only to be immediately overridden by the constructor body. Some also argue (and I agree) that it makes it more readable by formalizing the object construction to some degree.
edit:
Oh, and of course, it's the only way to avoid calling the default constructor for struct/class members.
Soda is just jelly.
[QUOTE=jA_cOp;27943018](assuming you meant "y = 4;" there)
The initializer list (former) is good practice as it means x and y will never be default initialized only to be immediately overridden by the constructor body. Some also argue (and I agree) that it makes it more readable by formalizing the object construction to some degree.
edit:
Oh, and of course, it's the only way to avoid calling the default constructor for struct/class members.[/QUOTE]
I see, thanks.
And yeah I ment y = 4
[QUOTE=likesoursugar;27943201]I see, thanks.
And yeah I ment y = 4[/QUOTE]
To expand a bit, here's a more extended example demonstrating why it's an important C++ construct:
[cpp]
class A // no default constructor (constructor with no arguments)
{
int i;
A(int i) i(i) {}
};
class B
{
A a;
B() { a = A(0); } // not allowed - 'a' is already initialized with the default constructor - except there isn't one - so it errors.
// If A had had a default constructor, this would be allowed, but would initialize 'a' twice.
};
class C
{
A a;
C(int i) : a(i) {} // OK, forwards 'i' to the constructor of A. Additionally, 'a' is only ever initialized once.
};
[/cpp]
[QUOTE=Soda]yeah you're not a girl lmao gj trying to assert it where it's irrelevant though
being a weeaboo fuck is v different from being actually female!![/QUOTE]
Really unsure of himself isn't he?
Where is this soda guy posting?
[QUOTE=BipolarPanda;27944330]Where is this soda guy posting?[/QUOTE]
Sending PM's now, because each time he posts junk, gets dumb's himself, and shot down.
[editline]9th February 2011[/editline]
To be honest do not really care if some random person believes me or not, just thought to show what he is now flinging in PM's trying to hide.
[QUOTE=Dryvnt;27936805]It can't hurt. I might even learn something :buddy:[/QUOTE]
Sorry for the late reply.
This is the entity animation code that the Player object inherits
[code]void Entity::SetFrame(int aFrame)
{
if (aFrame > cols)
{
if (walking)
{
frame = 2;
}
else
{
frame = 1;
}
}
else
{
if (climbing && aFrame > 2)
{
frame = 1;
}
else
{
frame = aFrame;
}
}
int x1, x2, y1, y2;
if (frame == 1)
{
x1 = 0;
x2 = 50;
}
else
{
x1 = (50 * frame) - 50;
x2 = 50 * frame;
}
if (anim == 1)
{
y1 = 0;
y2 = 50;
}
else
{
y1 = (50 * anim) - 50;
y2 = 50 * anim;
}
SetSubRect(sf::IntRect(x1, y1, x2, y2));
}
void Entity::SetAnimation(int aAnim)
{
if (aAnim > rows)
{
anim = 1;
}
else
{
anim = aAnim;
}
int x1, x2, y1, y2;
if (frame == 1)
{
x1 = 0;
x2 = 50;
}
else
{
x1 = (50 * frame) - 50;
x2 = 50 * frame;
}
if (anim == 1)
{
y1 = 0;
y2 = 50;
}
else
{
y1 = (50 * anim) - 50;
y2 = 50 * anim;
}
SetSubRect(sf::IntRect(x1, y1, x2, y2));
}
[/code]
This is the input code that tells the player to walk
[code]void onKeyD()
{
if (!player->GetClimbing() /*&& !Collides(player, DIRECTION_RIGHT)*/)
{
//Walk Right
player->SetWalking(true);
player->FlipX(false);
player->WalkRight();
}
}[/code]
This is the WalkRight method called frame by frame to make the player walk
[code]
void Player::WalkRight()
{
//Animation handling
SetAnimation(1);
if (CurTime() >= GetNextFrame())
{
SetNextFrame(CurTime() + 0.25f);
SetFrame(GetFrame() + 1);
}
Move(WALK_SPEED, 0.f);
}[/code]
Anim and Frame are private members of my entity class. If I can be really honest I'm a tad busy as of this writing and can't explain it right now, but its pretty straightforward.
ThomasFN, I just tried your server, and got a wonderful exception:
[code]
System.BadImageFormatException was unhandled
Message="Could not load file or assembly 'LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Source="MCServerLib"
FileName="LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null"
FusionLog="=== Pre-bind state information ===\r\nLOG: User = Robert-PC\\Robert\r\nLOG: DisplayName = LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Users/Robert/Downloads/MCServer_8Feb11/MCServer_Working/MCServerApp/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : MCServerLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).\r\nLOG: Attempting download of new URL file:///C:/Users/Robert/Downloads/MCServer_8Feb11/MCServer_Working/MCServerApp/bin/Debug/LuaInterface.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"
StackTrace:
at MCServer.MCLuaInterface..ctor(MCContext ctxt)
at MCServer.MCServerCore..ctor() in C:\Users\Robert\Downloads\MCServer_8Feb11\MCServer_Working\MCServerLib\MCServerCore.cs:line 83
at MCServerApp.Program.Main(String[] args) in C:\Users\Robert\Downloads\MCServer_8Feb11\MCServer_Working\MCServerApp\Program.cs:line 12
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
[/code]
[QUOTE=ZenX2;27945001]ThomasFN, I just tried your server, and got a wonderful exception:
[code]
System.BadImageFormatException was unhandled
Message="Could not load file or assembly 'LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Source="MCServerLib"
FileName="LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null"
FusionLog="=== Pre-bind state information ===\r\nLOG: User = Robert-PC\\Robert\r\nLOG: DisplayName = LuaInterface, Version=2.0.0.16708, Culture=neutral, PublicKeyToken=null\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Users/Robert/Downloads/MCServer_8Feb11/MCServer_Working/MCServerApp/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : MCServerLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).\r\nLOG: Attempting download of new URL file:///C:/Users/Robert/Downloads/MCServer_8Feb11/MCServer_Working/MCServerApp/bin/Debug/LuaInterface.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"
StackTrace:
at MCServer.MCLuaInterface..ctor(MCContext ctxt)
at MCServer.MCServerCore..ctor() in C:\Users\Robert\Downloads\MCServer_8Feb11\MCServer_Working\MCServerLib\MCServerCore.cs:line 83
at MCServerApp.Program.Main(String[] args) in C:\Users\Robert\Downloads\MCServer_8Feb11\MCServer_Working\MCServerApp\Program.cs:line 12
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
[/code][/QUOTE]
Wow, that look quite a handfull of an exception.
Made an expression parser using the shunting-yard algorithm and my own RPN parser in C#. Not sure what I'm going to do with it, I might remake my pygame graphing utility in C#, or just make a console calculator with it.
[img]http://dl.dropbox.com/u/8965316/expr_parser_1.png[/img]
Figured the problem to my A*. Apparently, when popping the best value out of the open set, while rebuilding the heap, I was switching the two children around instead of the parent and child.
[QUOTE=Soda]I just try not to spam up a half-decent thread but some idiots can't grasp the concept of a topic![/QUOTE]
Latest from the Box [del]Ghost[/del] Rater.
[editline]9th February 2011[/editline]
[QUOTE=Soda]i think you should post every pm i send you[/QUOTE]
Last one until sends some more proving his idiocy. Which from this rate, likely an hour or two. Will skip some of the more boring ones.
So nekosune, are you a guy or a girl, little confused here.
[QUOTE=mmavipc;27947747]So nekosune, are you a guy or a girl, little confused here.[/QUOTE]
Not that it matters to this thread, but female. And currently stuck on getting TXML to work with andengine for my android project.
[QUOTE=Jallen;27938511][url]http://stevenbenner.com/2010/07/the-5-types-of-programmers/[/url]
Where do you guys fit in? I'm almost definitely the duct tape one :buddy:[/QUOTE]
I'm more Duct Tape crossed with Half Assed.
Back to work on my Android game. I decided to change how the game assets were managed (textures, sounds, fonts, etc) and then rewrote the majority of my game to accommodate. It took 2 days to get back to where I was, but now I'm happy how everything is handled (plus I removed all loading events except for a single instance at the start of the game). Then I finished my level saving and loading.
[IMG]http://i53.tinypic.com/zjgdxt.jpg[/IMG]
[IMG]http://i54.tinypic.com/5yt945.jpg[/IMG]
[img]http://i52.tinypic.com/2ni5x6g.jpg[/img]
Did a test run and it finds the path on that big maze and reconstructs it, although I think that my implementation of binary heaps has a higher O(n) asymptote than an unsorted list (considering it took about 40 min.)... I definitely need to fix something somewhere, I just don't know where.
Sorry, you need to Log In to post a reply to this thread.