Anyone have a simple code snippet of bicubic interpolation. Mainly just interested in how it combines the colors.
[QUOTE=jA_cOp;25395031][img_thumb]http://filesmelt.com/dl/prettyprint.png[/img_thumb][/QUOTE]
What's with the use of the Yen sign as the path separator?
[QUOTE=X'Trapolis;25395283]What's with the use of the Yen sign as the path separator?[/QUOTE]
It comes with the system locale. The path separator is the same, but Windows displays it differently for historical reasons.
[url=http://byteworm.com/2010/10/13/crc32/]Intel 'Nehalem' processors support hardware CRC32 acceleration[/url].
According to the somewhat sketchy benchmarks in the above blog post, it's 6x faster than a C implementation.
[QUOTE=shill le 2nd;25389747]Yeah, that's how you do it. You can also add interpolation.[/QUOTE]
Ok cool, thanks.
I'm reading about interpolation now and I'm wondering whether it's really necessary? Do things like Source and Unreal use interpolation? I'm guessing yes.
But if I have a tick rate of 30fps I can't see that it would look unsmooth :/ The only possible problem would be a death spiral where the logic can't meet the tick rate but that's unlikely for the stuff I'm going to be doing.
But then I don't see how interpolation would actually work. Using standard linear interpolation where the object moves forward in the direction it moved last frame would work fine on things moving in a straight line, but if it's changing direction then it will look really wierd like...
[img]http://dl.dropbox.com/u/5062494/forumpost/timestep_interpolation_question.png[/img]
That does look useful, however I can't see a use for it in fixed timestep interpolation, because I don't know the next object position, only the previous.
Argh unless I was to run the render loop behind the update loop... What a brainfuck.
Hmm it seems the solution I'm gona go for is run the update loop ahead of the rendering, so that I can then linearly interpolate between the last frame and the current one. So when I calculate the next frame, the position of the objects will have just reached the current one, rather than updating them to the next one immediately, or doing some kind of ridiculous fail of an interpolation based on previous movement.
So the only downside I can see in this is that there will be an input lag of whatever the timestep is.
[QUOTE=r4nk_;25380226]
Can you explain this a bit more?
[/QUOTE]
The /proc mount in Linux is an idea taken from Plan 9 from Bell labs (the official successor to Unix, though it never really caught on, as Unix had a very large adoption.)
Taken from the wikipedia article on Plan 9 (important/cool features in bold)
[quote]
The /proc directory, in which all running processes are listed, illustrates how these features work together to produce a greater whole. This special Plan 9 "file system" has also been adopted by Linux and other later operating systems. [b]Processes appear as named objects (sub-directories with info and control files) under /proc, along with other kernel resources, giving the user a dynamic I/O channel to send commands to them and read data from them. The user does not have to use a limited set and form of system calls to interact with the kernel from compiled programs; rather, he or she can use tools such as ls and cat to search, query and manipulate processes.[/b]
Users can also mount /proc directories (and any other special file systems) from any other machines into their namespace as well, interacting with them as if they are local. The result is a distributed computing environment assembled from separate machines — terminals that sit on users' desks, file servers that store permanent data, and other servers that provide faster CPUs, user authentication, and network gateways, all using the existing hierarchical directory/name system familiar to most computer users. A user can "build" a system by collecting up directories on fileservers, applications running on servers, printers on the network and then bind them all together into their personal namespace running on a terminal.
[/quote]
It's a pretty kickass feature, one that I wish the FreeBSD devs would consider implementing, but they've got Grand Central Dispatch in their kernel now, so I can (partially) forgive them :P
Been researching neural networks. I am hooked :O
Just out of curiosity, has anyone used UDK to any significant extent?
Anyone has some insights on how to get farseer running in a 4.0 application ? Cause I have no luck trying it :(
[QUOTE=CANAD14N;25400337]Just out of curiosity, has anyone used UDK to any significant extent?[/QUOTE]
:wtc:
Thought to myself, "what weird image is that in your post".
Turns out, i had somehow gotten a piece of my pizza on the monitor. :v:
/offtopic
[QUOTE=Dj-J3;25400739]:wtc:
Thought to myself, "what weird image is that in your post".
Turns out, i had somehow gotten a piece of my pizza on the monitor. :v:
/offtopic[/QUOTE]
No, that image is actually there. See?
[QUOTE=Dj-J3;25400739]:wtc:
Thought to myself, "what weird image is that in your post".
Turns out, i had somehow gotten a piece of my pizza on the monitor. :v:
/offtopic[/QUOTE]
Reminds me of when I scanned my computer and almost had a panic attack when I saw a big walking around my screen thinking it was some sort of malware. Turns out it was actually inside my monitor.
I am considering that a complete rewrite of my Lua based game to allow for auto registration of lua functions in a c# namespace and also writing it with networking in mind to allow the easy evolution of the base system.
[IMG]http://i53.tinypic.com/5ckkkj.png[/IMG]
[b]Meanwhile, on the client...[/b]
[IMG]http://i56.tinypic.com/2hz0m4g.png[/IMG]
[QUOTE=Jallen;25401036]Reminds me of when I scanned my computer and almost had a panic attack when I saw a big walking around my screen thinking it was some sort of malware. Turns out it was actually inside my monitor.[/QUOTE]
I would rather have the malware in my pc, I wouldn't know where to start if it located in my screen :v:
[QUOTE=Dj-J3;25400739]:wtc:
Thought to myself, "what weird image is that in your post".
Turns out, i had somehow gotten a piece of my pizza on the monitor. :v:
/offtopic[/QUOTE]
And just as I'm reading your post... I'm sippin some Diet Sprite and eating some microwave pizza.
Made some progress on my 2D-HL2-Platformer-Thing today, nothing you can see through screenshots though
Just stuff like (smooth) camera scrolling and some more level editor features
[QUOTE=CarlBooth;25401482]
Win pix
[b]Meanwhile, on the client...[/b]
[/QUOTE]It'd be neat if you got far enough on this that schools got interested in it and wanted to buy it. :v:
[QUOTE=Python1320;25401721]I would rather have the malware in my pc, I wouldn't know where to start if it located in my screen :v:[/QUOTE]
They go away after a while, awesome little critters.
[url]http://en.wikipedia.org/wiki/Thrips[/url]
If I remember correctly, they are common in Scandinavia, the US and the UK. I always get them in my monitor when it's stormy outside, I think it makes them more active. I know they are also known as storm bugs.
I, rather stupidly, pressed on the screen and squashed one.
It took me an hour to dismantle the LCD panel and clean it off the glass.
Hey facepunch, I have been lurking here for some time and finally decided to make an account in the hopes it will get me to program more often. For my first post I shall show off something I have been working on today/yesterday in xna, I started on a top down shooter but decided seeing as it was becoming a trend in this thread to work on putting a console in the game, with some basic commands.
[media]http://www.youtube.com/watch?v=e5IgaHHldNk[/media]
you may have to bump up the resolution on youtube to see the text.
Does anybody have any advice on my problem? Basically, I have a reference counter that I PRESUMED has been working properly for the past decade, but behold, it doesn't.
[code] bool drop(void)
{
references--;
if(references == 0)
{
delete this;
return true;
}
return false;
}[/code]
It works fine, but it's in a class and 'delete this;' doesn't delete the object. I can call drop() again and since references is an unsigned char, it resets to 255 and all is well.
Can anybody tell me why it doesn't delete itself?
I've recently begun working on my build system again. One of the goals this time around is .NET compatibility (so that a python installation won't be required).
To do this, I'm making sure it works with IronPython (you'll only need the IronPython assemblies, and the compiled one form my build system).
As you can see, the color printing works just fine :v:
[img_thumb]http://i.imgur.com/4Lhfz.png[/img_thumb]
The architecture of the project is also going to be changing a bit as well (so no backwards compatibility). But this is going to be a LOT better than the previous versions. Mostly because I'm no longer going to have the "project" class as the main interface, but rather a container for the proper interfaces. For instance, in previous versions, to add files you would do something like
[code]
my_project.files('directory')
my_project.rmdir('directory/otherdir')
[/code]
Where as now, you'll do something like
[code]
my_project.files.add('directory', recurse=False)
my_project.files.remove('directory/yomomma.c') # Alternatively, you can call my_project.files.rm, as it is an alias
[/code]
It's a little bit more verbose, but in the underlying code, and for new users, I think everything will make much more sense.
Also, a feature that my build system hasn't had up until now was build targets (i.e. debug, release, clean, etc.). But now, when creating your project, you'll do something like
[code]
my_project = Project('name', 'target1', 'target2', 'target3')
my_project.target1.cflags('Wall')
[/code]
And from the commandline, you'd initiate it with
[code]
bit target1 [additional options]
[/code]
You can also just give the project a name, and skip the targets, and bit will automatically add a debug and release target (which you'll access in the same way).
But I should get back to working on it instead of talking about it :P
Can anyone recommend a decent book for starting Android development?
[QUOTE=SamPerson123;25386802]I've started thinking about how I could make a simple platformer. I'm not entirely sure how I should go about doing collisions when the player is moving a distance greater than one tile per frame. If I just checked if the player was intersecting a tile, they could possibly slip through the walls or floors if they're going fast enough. I was thinking I could draw a line going from their current position to where they will be during the next frame and see if that intersects any blocks, but that doesn't take the player's height or width into account, and I really have no idea how to do this. I would also need to know which side of the tile the player hit because I want them to bounce a little.
Of course I could always just limit the speed, but that's no fun.[/QUOTE]
I think I've figured it out. I could start from the starting point, and find which edge the line leaves from, which shows the next square the player will be in. Then I just need to repeat this until I get to the ending point or a solid block.
[QUOTE=Jookia;25404723]Does anybody have any advice on my problem? Basically, I have a reference counter that I PRESUMED has been working properly for the past decade, but behold, it doesn't.
[code] bool drop(void)
{
references--;
if(references == 0)
{
delete this;
return true;
}
return false;
}[/code]
It works fine, but it's in a class and 'delete this;' doesn't delete the object. I can call drop() again and since references is an unsigned char, it resets to 255 and all is well.
Can anybody tell me why it doesn't delete itself?[/QUOTE]
The general consensus is that it's a bad idea to do this ("delete this"). Check whether all of these conditions are true:
[quote]You must be absolutely 100% positive sure that this object was allocated via new (not by new[], nor by placement new, nor a local object on the stack, nor a global, nor a member of another object; but by plain ordinary new).
You must be absolutely 100% positive sure that your member function will be the last member function invoked on this object.
You must be absolutely 100% positive sure that the rest of your member function (after the delete this line) doesn't touch any piece of this object (including calling any other member functions or touching any data members).
You must be absolutely 100% positive sure that no one even touches the this pointer itself after the delete this line. In other words, you must not examine it, compare it with another pointer, compare it with NULL, print it, cast it, do anything with it.
Naturally the usual caveats apply in cases where your this pointer is a pointer to a base class when you don't have a virtual destructor.[/quote]
[url]http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.15[/url]
[QUOTE=Chandler;25405307][img_thumb]http://i.imgur.com/4Lhfz.png[/img_thumb][/QUOTE]
So it's not just my CMD that's plagued with the "GIT" logo :argh:
Sorry, you need to Log In to post a reply to this thread.