• What are you working on? V10
    2,002 replies, posted
Box2D forums are down, hope it's not another asshole. [editline]04:17PM[/editline] [QUOTE=ryandaniels;21900604]Don't you need glut or something? I just said "screw it" and started testing with sdl doing the visuals.[/QUOTE] Also, yeah, but that's why I asked if someone could just throw me an .exe I am working at converting to SFML, but that's gonna take a bit.
[QUOTE=grlira;21906698]I've been working on a Newtonian mechanics simulator lately using exactly SFML with C++. What I did is have an Obj class that has a series of vector2f that represent velocity and force being applied.Then Obj also has a Sprite object which is what actually shows up. On each iteration, Obj::think() calculates the velocity based upon the forces being applied by the user (and series of other stuff. If it's impacting anything it'll calculate restitution, it takes into account drag and, of course, gravity, etc etc). Then it moves the sprite based on that velocity (hint the sfml move method takes a vector2f, and the velocity is represented by a vector 2f :D). I'm still working on it, at the moment there's no object<->object collision and it all runs on the same thread, but as far as physics goes, that approach worked for me.[/QUOTE] Thank you, I appreciate it :smile:
Trying out Unity3D, it's quite nice. [url]http://sites.google.com/site/zbtestbed/[/url]
[QUOTE=AGMadsAG;21908032]Thank you, I appreciate it :smile:[/QUOTE] No problem. I'll give you the class code if you want it once I get it all tuned up. If you need anything else, shoot.
Can't stay with one project for long... Started on this a few days ago... Seems to be going well. I finally got collisions working with the walls. (I'm using Farseer) [img_thumb]http://img526.imageshack.us/img526/7323/viruseradication2010051.jpg[/img_thumb] [img_thumb]http://img340.imageshack.us/img340/7323/viruseradication2010051.jpg[/img_thumb] [img_thumb]http://img535.imageshack.us/img535/3166/ss20100512181138.jpg[/img_thumb] How does it look?
[QUOTE=grlira;21908064]No problem. I'll give you the class code if you want it once I get it all tuned up. If you need anything else, shoot.[/QUOTE] I would really like to see it, I am having problems finding examples/documentation of the usage.
[QUOTE=zachar543;21908153](Made the rest links to not clog the thread with large images)[/QUOTE] Use img_thumb tags.
[QUOTE=Agent766;21908457] Use img_thumb tags. [/QUOTE] Thanks.
i've revived my interest in a [url=http://en.wikipedia.org/wiki/Mach-O]mach-o[/url] compatibility layer for windows/linux, although i need to discuss the feasibility of it. before ya'll say i'm a total retard after reading this post, keep in mind i am well aware of my limited knowledge in these following subjects. originally, i made a test on windows using a really basic hello world binary. i was too lazy to do anything dynamic, so i just made it so it loaded the executable, rewrote the call to puts() to proxy one i had in a dll manually, and called a function pointing to the entry point. it didn't work as planned because the "hello world" string was not pointed to in a relative manner (i forgot details on how it was passed), resulting in my puts() proxy failing. mach-o segments are allocated at low vm addresses (around 0x1000), so trying to load it into these addresses was out of the question. then i thought "hey maybe i can use linux and translate the mach-o binaries to elf and have the segments loaded into their proper vm addresses!" i was wrong. loading things at 0x1000 resulted in a segfault for a reason i am unfamiliar with. so i ask you, facepunch, to give me suggestions on how i might be able to go about doing this properly. the only really possible solution i can think of right now is runtime jit.
Man, the optimizations I've done are just fucking HUUUGE [IMG]http://i43.tinypic.com/xgmr6r.png[/IMG] TWO THOUSAND UNITS [IMG]http://i43.tinypic.com/9qjy2v.jpg[/IMG] [B]THREE THOUSAND UNITSSSSS[/B] [IMG]http://i44.tinypic.com/2eekfav.jpg[/IMG] [B]NIIIINE THOUUSAND UNIIITTSSS !!!! [/B]
@pondefloor: The problem is, that 0x11223344 might actually point to something different in program A than 0x11223344 actually points to in program B. The OS will take the pointer and it's free to modify it, and as things seem to be, programs usually have their share of memory and any out-of-bounds will cause access violations. I never actually read this, it's just what I think is truth, so feel free to correct me. For Windows you can use Detours by Microsoft. The page times out for me for some reason, but I found [url=http://aimbots.net/tutorials/14575-detours-linux-windows.html]this nifty link[/url]; definitively worth a look. @xerios: maybe you should add how much time was spend on collisions, how much on the AI and how much time was spend rendering the scene to this little info-box on the lower left. I guess it'd be more interesting than the overall FPS.
Just started learning about inheritance, found it has some powerful uses, however I don't think I'm doing things the "right way" So, I'd like to see what you guys think, is this bad, and if so, how could I accomplish the same thing better? To give some background, what this does is it provides a standard way for the user input to reach the game's objects. Touch() brings events and states so that the Interaction object can respond to them, sending commands to the object they are attached to. The interesting thing is that I can write unique modules that do different things and just "drop" them into the Input object. For instance, I could break ZoomPan up into Zoom() and Pan(), and then pass either or both, given the circumstance (Maybe I want one viewport to scroll, while the other needs both scrolling and zooming). Note that the camera object is an exception; normally I wouldn't need to get any info from an interaction object, but the camera specifically needs to tell the program to update the window; something it can't have direct have access to. [cpp] class Interactive { public: virtual bool IsDead(); virtual void Touch(sf::Event event_, const sf::Input *states)= 0; }; struct Camera; class CameraI: public Interactive { protected: Camera *camera; bool redraw; public: void SetCamera(Camera *camera_); bool Redraw(); CameraI(); }; class CameraI_ZoomPan: public CameraI { sf::Vector2i mouse_mem; public: void Touch(sf::Event event_, const sf::Input *states); }; [/cpp] Sorry if it makes your eyes bleed or something, I don't exactly have a textbook understanding of this... [editline]04:23PM[/editline] [QUOTE=Xerios3;21909092]Man, the optimizations I've done are just fucking HUUUGE [/QUOTE] Holy shit
[QUOTE=ZeekyHBomb;21909147] @xerios: maybe you should add how much time was spend on collisions, how much on the AI and how much time was spend rendering the scene to this little info-box on the lower left. I guess it'd be more interesting than the overall FPS.[/QUOTE] Collision and steering all optimized like hell, using a locality query database to help and all, spent the whole day testing out the best way to multithread all that. And now everything runs pretty smoothly :haw: So basically it's very playable =)
[QUOTE=Xerios3;21909376]Collision and steering all optimized like hell, using a locality query database to help and all, spent the whole day testing out the best way to multithread all that. And now everything runs pretty smoothly :haw: So basically it's very playable =)[/QUOTE] So are you still casting a ray downwards for every unit? [editline]12:58AM[/editline] Uhm, this question was probably asked a hundred times but: I know c# pretty good now, but as I wanna look into ogre I will have to learn c++... So, what would I start to program in c++? Windows applications, console applications? What do you recommend?
[QUOTE=s0ul0r;21911091]So are you still casting a ray downwards for every unit? [editline]12:58AM[/editline] Uhm, this question was probably asked a hundred times but: I know c# pretty good now, but as I wanna look into ogre I will have to learn c++... So, what would I start to program in c++? Windows applications, console applications? What do you recommend?[/QUOTE] If you're familiar with C# unsafe code: the syntax differences, manual memory handling and deterministic destructors are the main new points when dealing with classic object-oriented programming. If you've reached that point, you could probably jump right into OGRE and learn from that, although OGRE presents you with yet another, less common difference; extensive use of multiple inheritance. If not, you might want to play with console applications to get the feel of writing idiomatic C++, which would also give you some experience with its (lack of a) module system. I really recommend that you learn about the differences between pointers and references before you start writing C++ if you want the same kind of static safety C# offers.
Jup, the main problem I'm having is to understand when and how to effectively use pointers, I think I'll try some console apps beforehand, even though those have the least potential, and I don't even know what to do...
[QUOTE=s0ul0r;21912268]Jup, the main problem I'm having is to understand when and how to effectively use pointers, I think I'll try some console apps beforehand, even though those have the least potential, and I don't even know what to do...[/QUOTE] Oh, don't say that, not everything needs a graphical interface. Games are pretty to clunky to make as console applications because of a lack of good graphics layer API's, but it has just as much potential for utilities and other non-game applications (although with a less intuitive interface). I keep hearing people learning C++ by using SFML, at least you'd be in good company here on Facepunch if you choose that approach. SFML would at the very least teach you quite a few good habits, which would not be the case with a pure C API (unless you're actually looking to get into C). If you're good at C# and happen to know exactly when to structs (value types) and when to use classes (reference types), that's a good base for learning when to use stack-allocated memory and when to use the heap in C++. As for pointers and references; the general rule is to use references whenever you can, and pointers when you strictly can't use references. The actual difference (and what they are) you could probably easily look up in a tutorial or even better, a book, but if you're struggling to get them straight I could write up a tutorial.
Spent most of the last two nights getting Lugaru to compile using GNU Autotools. Screw the non Unix systems. [URL]http://github.com/pvtcupcakes/Lugaru/commit/4e0b2c3390264f01d7e15da66fb22432c830bd35[/URL] It was pretty fun, and I learned a couple tricks that I put into my other project that uses Autotools. Namely creating a .pc file (for pkgconfig), so other people using Autotools to link to my library can use pkgconfig, which is pretty easy.
Messing around with line intersection in löve. I was able to calculate around 3000 intersections a second, but that seemed a little slow. I realized that I was doing it an ass-backwards way, so I shifted it around a bit and now I can do 20000 (:
further elaboration of my mach-o experiment. [code]__text:00001F5E _main proc near __text:00001F5E push ebp __text:00001F5F mov ebp, esp __text:00001F61 sub esp, 18h __text:00001F64 mov dword ptr [esp], offset aHelloWorld __text:00001F6B call _puts __text:00001F70 xor eax, eax __text:00001F72 leave __text:00001F73 retn __text:00001F73 _main endp [/code] here is the machine code for main(). the _puts subroutine is actually just a jmp to a pointer of the real function that is filled in by dyld at load/runtime. my test program would load this executable, fill in the pointer to the proxy in a separate dll, then call main() through a function pointer. the problem? see that mov at 0x1f64? it's actually copying the absolute position of the string of where it should be virtual memory, which is 0x1fa0. this is a problem because the string is actually at some other location depending on where the program loaded the file. so puts() gets a pointer to some protected/nonexistent memory and fails horribly. but after doing a bit more research, this problem may have been caused by compilation settings. i compiled another binary just now (the code about is hella old), and it does things a bit differently. [code]_main: 00001f4a nop ... 00001f50 pushl %ebp 00001f51 movl %esp,%ebp 00001f53 pushl %ebx 00001f54 subl $0x14,%esp 00001f57 calll 0x00001f5c 00001f5c popl %ebx 00001f5d leal 0x00000044(%ebx),%eax 00001f63 movl %eax,(%esp) 00001f66 calll 0x00001f7a ; _puts 00001f6b xorl %eax,%eax 00001f6d addl $0x14,%esp 00001f70 popl %ebx 00001f71 leave 00001f72 ret [/code] at 0x1f5d, it appears to calculate the effective address of the string. so i decided to test it. [img]http://i43.tinypic.com/9k0y7o.png[/img] whoopee! baby steps to getting an osx compatibility layer on windows.
I've started learning Java and specifically how to use it to develop for Android. I just finished the first thing using OpenGL ES. [img]http://www.imgdumper.nl/uploads2/4beb625160358/4beb62515865c-opengltest.png[/img] I know it's nothing interesting, but I think it's cool to see OpenGL run on such a small device.
[QUOTE=Overv;21913212]I've started learning Java and specifically how to use it to develop for Android. I just finished the first thing using OpenGL ES. [img]http://www.imgdumper.nl/uploads2/4beb625160358/4beb62515865c-opengltest.png[/img] I know it's nothing interesting, but I think it's cool to see OpenGL run on such a small device.[/QUOTE] Don't forget about the NDK. You can write your OpenGL/performance stuff in C/C++ :)
Just stumbled upon this gem: [url]https://groups.google.com/group/comp.lang.c/msg/e105e5d339edec01?pli=1[/url]
[QUOTE=windwakr;21915419] Wait, it's division, isn't it?[/QUOTE] Yes.
[QUOTE=nullsquared;21896489]That's kind of funny because I wanted to make an updated video showcasing the features and it went to 17 minutes :v: I really need to shorten it a bit because I want to demonstrate some stuff in real-time. For example, you can animate the theta-maximum window of a polar equation and then draw an animated spiral.[/QUOTE] You're going to do the open-source equivalent of putting these guys out of business: [url]http://www.padowan.dk/graph/[/url]
[QUOTE=Chandler;21914381]Don't forget about the NDK. You can write your OpenGL/performance stuff in C/C++ :)[/QUOTE] More to the point the NDK lets you use OpenGL:ES 2.0.
[QUOTE=pondefloor;21913150]cool business[/QUOTE] I know no one here really cares about what you're doing there, but good work! Keep it up, it's looking really cool
[QUOTE=gilly_54;21916029]You're going to do the open-source equivalent of putting these guys out of business: [url]http://www.padowan.dk/graph/[/url][/QUOTE] Uhm, sorry, but I never mentioned this is open-source :v:
Better get a good obfuscater then
[QUOTE=turb_;21918186]Better get a good obfuscater then[/QUOTE] He's using C# afaik. Why on earth would he need an obfuscater?
Sorry, you need to Log In to post a reply to this thread.