• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=Borsty;25948296]Was bored.. so I wrote a small Midi -> E2 converter thingy in Java.. [media]http://www.youtube.com/watch?v=A-ZvQgVWr3c[/media] It can take almost any midi and create a e2 chip source that can play the song almost instantly. Supports up to 16 channels.. but more than 6 or 7 are most likely to sound rubbish.. Will post source if anyone's interested once finished. ([url=http://pastebin.com/q2x1xsq0]Example of generated code here[/url])[/QUOTE] Sometimes, I, feel I've got to (bam) (bam), get away! Pretty cool. :P I've got note movement based on beats, insuring that each beat gets to the hit point visually when it's suppost to. So yeah, didn't get done everything I wanted but I'm still glad I got it done.
[QUOTE=animorten;25948919]That won't work. You can do this. [code] bool Window::create() { HWND hWnd = CreateWindow(/* blah */); SetWindowLongPtr(hWnd, GWLP_USERDATA, this); } [/code] Inside the WindowProc: [code] Window* instance = GetWindowLongPtr(hWnd, GWLP_USERDATA); [/code][/QUOTE] Thanks.
[QUOTE=polkm;25942796][img_thumb]http://anyhub.net/file/rtslolwut.png[/img_thumb] Not very impressive but just started on Saturday. What you are looking at is three selected tanks firing at a building.[/QUOTE] Maybe not impressive, but very interesting.
[QUOTE=Chris220;25941742]Any of you lot had days where you try to get some programming done and pretty much everything manages to go horribly wrong? Today is that day for me.[/QUOTE] Monday was a horrible day for me. Even a simple for loop, I stared at it and said: "Yeah... Now what".
[QUOTE=Chris220;25941742]Any of you lot had days where you try to get some programming done and pretty much everything manages to go horribly wrong? Today is that day for me.[/QUOTE] What about the days you open your project, tab back and forth between files, delete a line, add a comment and 3 hours later you realize you've done absolutely nothing.
[QUOTE=foszor;25954422]What about the days you open your project, tab back and forth between files, delete a line, add a comment and 3 hours later you realize you've done absolutely nothing.[/QUOTE] Happens to me all the time :(
[QUOTE=foszor;25954422]What about the days you open your project, tab back and forth between files, delete a line, add a comment and 3 hours later you realize you've done absolutely nothing.[/QUOTE] I start up my project. Look a bit at the source. Compile and test the code. Browse the internet. Then compile and test the code again, looking a bit more at the source, compiling it again (again, for no reason whatsoever), and then I close down the project when I go to bed. That's why I never get private projects done I guess.
[QUOTE=h2ooooooo;25955035]I start up my project. Look a bit at the source. Compile and test the code. Browse the internet. Then compile and test the code again, looking a bit more at the source, compiling it again (again, for no reason whatsoever), and then I close down the project when I go to bed. That's why I never get private projects done I guess.[/QUOTE] If you replace compile and test code with booting up a game and play some, then is what I have sometimes.
[QUOTE=polkm;25942796][img_thumb]http://anyhub.net/file/rtslolwut.png[/img_thumb] Not very impressive but just started on Saturday. What you are looking at is three selected tanks firing at a building.[/QUOTE] That looks actually pretty awesome. I had a game idea that was similiar to this once but it was about running a space agency where you took contracts from different people to achieve goals. The combat route was one route you could take so you could buy armies with money and sell sattalites etc. It was quite in-depth but I never attempted to make it.
Working on my model viewer / blender model exporter written in python (ofc) again. And finally when I understand how matrices work It's possible to go on. Armatures next: [img]http://img835.imageshack.us/img835/1528/armature1.png[/img]
[QUOTE=likesoursugar;25955901]Working on my model viewer / blender model exporter written in python (ofc) again. And finally when I understand how matrices work It's possible to go on. Armatures next: [img_thumb]http://img835.imageshack.us/img835/1528/armature1.png[/img_thumb][/QUOTE] Dem programmers models. :v:
[QUOTE=BlkDucky;25956212]Dem programmers models. :v:[/QUOTE] That's how armatures look in blender.
[QUOTE=h2ooooooo;25955035]I start up my project. Look a bit at the source. Compile and test the code. Browse the internet. Then compile and test the code again, looking a bit more at the source, compiling it again (again, for no reason whatsoever), and then I close down the project when I go to bed. That's why I never get private projects done I guess.[/QUOTE] This was actually what I did for about the past year or so. I've been able to mitigate it by micromanaging projects (which seems to be the worst thing you can do), which are split up into a bunch of smaller ones, that are a bit easier to manage. I take a look at the big picture, decide what I need, and would be easy to implement in a short amount of time, and then do that as a separate project. (I think the use of submodules in git helps my workflow, though. [sp]Not trying to start a flamewar, just saying it helps![/sp]) For instance, for my language's compiler, I needed to print color text (a small requirement, but I needed something to get me into the groove). So I broke off and wrote a separate project for that. Then I needed to handle some basic file system stuff, so I wrote one for that. Then I needed a preprocessor, which I then decided to model off of the [url=http://iolanguage.com]Io language[/url], so to make it nearly 1 : 1 with Io, I needed a garbage collector, but the garbage collector needs to be threadsafe, and I need to have coroutines implemented to use the Actor model for objects too, so I've spent the past weekend working on my threading library. And now all I need to do is implement Fibers (which are effectively coroutines) on POSIX, in such a way that it lines up with the Win32 Fiber API, but is also simple and easy to use. I'd also love to use a condition variable system as well, but that might be out of scope, despite the fact that it would result in a bit of a speed up for anything using a mutex. But it would also require a Queue of some kind. Maybe I'll implement it in the future, but I don't want this to turn into feature creep, because otherwise this will go the way of the dodo. On the subject of the garbage collector, I've been looking at the Windows Concurrency runtime which comes with VS2010, and is only available with it, though it is a static runtime, so it should (in theory) work on older windows systems. One of the problems with a mark and sweep collector, is the need to go through a list of all objects that are hooked up to the collector. The windows, and OS X/ FreeBSD versions of this collector are going to take advantage of newer technology, as I would like to stay concurrent (:v:) with the rest of the world. The concurrency runtime comes with a pretty cool extension to the C++ STL, specifically a parallel for each, and a "concurrent vector", which can be used like so, within the confines of my garbage collector's "mark" and "sweep" steps. (Originally, this collector was going to require someone to inherit from a "object" type, but I'm going to put all of that functionality within the templatized pointer, so people can use a custom constructor. [cpp] #include <ppl.h> #include <concurrent_vector.h> Concurrency::concurrent_vector<basic_pointer> objects; Concurrency::parallel_for_each(objects.begin(), objects.end(), [](const basic_pointer& ptr) { if (ptr.is_reachable()) { /* place ptr in black list, which is freed on "sweep" */ }); [/cpp] I'll be able to do something with libdispatch as well, but it won't be *this* elegant, and I might have to do some extra work. Also, I'm searching for anything that resembles libdispatch or Concurrency Runtime for Linux, and is usually installed on Linux systems. For those who are curious, this garbage collector is a tri-color mark and sweep, though I may drop down to either "used", or "not used". Most garbage collectors will do a mark, sweep, and then continue on, but I'm going to be looking into placing the execution of the preprocessor language in a loop (thanks to the magic of coroutines) so that the collector is constantly performing a mark on a specified number of objects, before ceding control back to the VM. While this is unorthodox, I think the result will be the lack of the VM being stopped by the garbage collector kicking in, but of course I'll run a few tests first, before I make my decision. As for the preprocessor language itself, I was a bit concerned with the possibility of having to place everything inside of a multiline string, but I'll be modifying the language to use {} and $. Here's an example if I were using this with C++ (realize that my language does not have braces, so I would normally not have to escape them in this case) [code] `x := method('template <typename T>')` /* much later in the code */ `y := method($x class object \{ public: T something; \};)` /* much much later */ `y` [/code] A formatted string literal, is effectively what this is, and I've done it like this for two reasons. 1) I am not using the {} or $ tokens for anything in the language currently, so their use will be obvious to anyone who looks at a piece of code and 2) It makes it much easier for editors such as Vim and Emacs to switch between the languages when told to, and makes everything a bit easier to regex on a whole. :) :ohdear: this post turned out larger than I wanted it to.
[QUOTE=RyanDv3;25956642]That's how armatures look in blender.[/QUOTE] So it's not the complete model? Makes sense. I should've guessed from when he said "armatures next", to be fair.
I made a really small update to my engine to fix a runtime bug where it would crash if a definition didn't have a value and it expected one. [url]http://code.google.com/p/bullwhip-tile/[/url]
Could anyone take a look at this for me : [url]http://www.facepunch.com/threads/910202-What-do-you-need-help-with-Version-1?p=25854757&viewfull=1#post25854757[/url] still stuck on it :(
So I'm trying to manage entitys by having basically this: entity entlist[1024]; In my game class definition. However, that line gives me a runtime error whenever I start the game. How should I manage large numbers of whatever in my game? I think I'm going to need a large number of entitys managed at once. 256 as a number works, but the game might need more.... (in my game you can build a base, and 256 things might not be enough if a player has enough time on their hands, you can't destroy most of your things, just abandon them) [editline]9th November 2010[/editline] Also, should I learn python 2.6 or 3.0? [editline]9th November 2010[/editline] Also, should I learn python 2.6 or 3.0? [editline]9th November 2010[/editline] [QUOTE=quincy18;25959231]Could anyone take a look at this for me : [url]http://www.facepunch.com/threads/910202-What-do-you-need-help-with-Version-1?p=25854757&viewfull=1#post25854757[/url] still stuck on it :([/QUOTE] Why can't you do it yourself? [editline]9th November 2010[/editline] [QUOTE=quincy18;25959231]Could anyone take a look at this for me : [url]http://www.facepunch.com/threads/910202-What-do-you-need-help-with-Version-1?p=25854757&viewfull=1#post25854757[/url] still stuck on it :([/QUOTE] Why can't you do it yourself?
Stack overflow. Offload to heap-memory. Python 3.0. The reason it simple: It's newer :v:
[QUOTE=ZeekyHBomb;25960085]Stack overflow. Offload to heap-memory. Python 3.0. The reason it simple: It's newer :v:[/QUOTE] Ok, but is an array the right way to do it? A std::list looks easier, but confusing.
[QUOTE=neos300;25960758]Ok, but is an array the right way to do it? A std::list looks easier, but confusing.[/QUOTE] std::list is the way to go
[QUOTE=neos300;25960758]Ok, but is an array the right way to do it? A std::list looks easier, but confusing.[/QUOTE] std::vector might be better.
[QUOTE=neos300;25960758]Ok, but is an array the right way to do it? A std::list looks easier, but confusing.[/QUOTE] Make a vector like this std::vector <Entity*> entitylist; Make your entities like this Entity* testentity = new Entity(); entitylist->push_back(testentity);
Alright so I got it to work with a vector(maybe ill do a list later but for now a vector works fine) Now I made a function to build a 3 by 3 array of the surrounding tiles, which works, in theory. However, I don't know how to access the array it returns. I read somewhere to pass it back as a pointer, which I did, but now I can't figure out how to return an array as a pointer, and then turn that pointer back into an array.
Made the physics suck a little less. [IMG]http://i902.photobucket.com/albums/ac222/ScreenNamesSuck/SandGameBetterPhysics.png[/IMG] [media]http://www.youtube.com/watch?v=02z3aCl3JzQ[/media]
Man, that gravity still is very real; looks it can become a sandbox game.
[QUOTE=The Inzuki;25964109]Man, that gravity still is very real; looks it can become a [b]sand[/b]box game.[/QUOTE] I see what you did there.
How are you handling all the sand particles? Arrays? [b]Edit:[/b] Way to go self not looking at the background :|
[QUOTE=Samuka97;25965031]How are you handling all the sand particles? Arrays?[/QUOTE] The sand is handled as a multidimensional array that is a member of a class called PixelGrid. The functions for adding sand and calculating physics are member functions of this class. The array's dimensions are determined by the dimensions of the render window; Pixels[241][357] is coordinates (241, 357). The array only holds ints, which determine the type of particle that exists in the coordinates of the array. There are only two types #defined so far, PIXELTYPE_NONE (#defined as 0) and PIXELTYPE_SAND (#defined as 1). I wrote this all from scratch in C++, I'm proud considering this is my first real project.
You should be using bytes to save memory.
[QUOTE=Vbits;25965318]You should be using bytes to save memory.[/QUOTE] I'll optimize everything once I add most of the features I want (different particle types and different physics systems for the new particles).
Sorry, you need to Log In to post a reply to this thread.