• What Are You Working On? - August 2014
    1,181 replies, posted
[QUOTE=reevezy67;45816383]What? Why? WPF is great. [editline]28th August 2014[/editline] I mean it's not cross platform but that's no reason not to use it for stuff like this.[/QUOTE] I'm a little biased because i hate when they mix markup languages with muh programming. Anyway, it was the white background that tingled my anti-WPF senses.
How are they mixing markup languages? WPF only has XAML for markup. Winforms has none. And don't say the designer file, that doesn't count :P
[QUOTE=MatheusMCardoso;45817601]I'm a little biased because i hate when they mix markup languages with muh programming. Anyway, it was the white background that tingled my anti-WPF senses.[/QUOTE] In WPF the markup is used exactly where it's best suited. It also doesn't mix with the code at all.
[QUOTE=Arxae;45817749]How are they mixing markup languages? WPF only has XAML for markup. Winforms has none. And don't say the designer file, that doesn't count :P[/QUOTE] He prefers the code generation. I think markup is much cleaner, but each to their own, spaces > tabs etc etc..
WPF can do code generation too :v: well, markup generation in this case
[vid]http://a.pomf.se/mqotwk.webm[/vid] Ported a fluid simulation from C to C#, really cool to play with. C implementation runs at ~200 FPS. C# implementation runs at ~120 FPS. Performance drop is pretty huge, should have maybe kept it in C.
[QUOTE=Cold;45818530][vid]http://a.pomf.se/mqotwk.webm[/vid] Ported a fluid simulation from C to C#, really cool to play with. C implementation runs at ~200 FPS. C# implementation runs at ~120 FPS. Performance drop is pretty huge, should have maybe kept it in C.[/QUOTE] Out of interest, Whats the drop in frame time? (and does the GC give you spikes?)
8.3ms for the C# version 5ms for the C++ version. There is no GC because there are no objects being destroyed in the simulation. Although if you have GC spikes, you can simply just force garbage collection and the end of every frame, to avoid them.
[QUOTE=Cold;45818963]8.3ms for the C# version 5ms for the C++ version. There is no GC because there are no objects being destroyed in the simulation. Although if you have GC spikes, you can simply just force garbage collection and the end of every frame, to avoid them.[/QUOTE] You could try [CODE][MethodImpl(MethodImplOptions.AggressiveInlining)][/CODE] on any commonly used functions to try and coerce it to inline the functions. I got some speedups using it on my vector class when writing a ray tracer. [url]http://blogs.msdn.com/b/dotnet/archive/2014/08/18/try-out-the-new-releases-net-framework-vnext-asp-net-vnext-net-native-and-ryujit.aspx[/url] RyuJIT may also give some speed ups though it is currently only a CTP.
Quick question - I'm getting a low framerate when I'm rendering tiles on screen. I don't have a terribly high amount being rendered (~less than 50). However, I'm moving the tiles rather than the camera to stimulate camera movement. Is that the cause of the framerate issues?
Rule #1 of optimization: Measure measure measure.
[vid]http://a.pomf.se/yqbxbj.mp4[/vid] some simple isometric handles to make it easier for me. Also if you don't mind, support a friend of mine making a game. They have less than a day left. [url]http://epocu.com/campaigns/shadow-puppeteer/[/url]
[QUOTE=Cold;45818530][vid]http://a.pomf.se/mqotwk.webm[/vid] Ported a fluid simulation from C to C#, really cool to play with. C implementation runs at ~200 FPS. C# implementation runs at ~120 FPS. Performance drop is pretty huge, should have maybe kept it in C.[/QUOTE] Can you link the original C code?
[QUOTE=Cold;45818963]8.3ms for the C# version 5ms for the C++ version. There is no GC because there are no objects being destroyed in the simulation. Although if you have GC spikes, you can simply just force garbage collection and the end of every frame, to avoid them.[/QUOTE] Or use [url=http://msdn.microsoft.com/en-us/library/bb384202(v=vs.110).aspx]latency modes[/url]. Edit: context.
[QUOTE=ben1066;45819527]You could try [CODE][MethodImpl(MethodImplOptions.AggressiveInlining)][/CODE] on any commonly used functions to try and coerce it to inline the functions. I got some speedups using it on my vector class when writing a ray tracer. [url]http://blogs.msdn.com/b/dotnet/archive/2014/08/18/try-out-the-new-releases-net-framework-vnext-asp-net-vnext-net-native-and-ryujit.aspx[/url] RyuJIT may also give some speed ups though it is currently only a CTP.[/QUOTE] I have a few inline's like that, but it doesn't seem to affect performance. I guess the compiler inlines the functions regardless of the hints i give. [QUOTE=CapsAdmin;45819861]Can you link the original C code?[/QUOTE] [url]http://www.intpowertechcorp.com/GDC03.pdf[/url] [url]http://www.dgp.toronto.edu/people/stam/reality/Research/zip/CDROM_GDC03.zip[/url] I put it on git here: [url]https://github.com/CFusion/Real-Time-Fluid-Dynamics-for-Games[/url]
So after lurking for a while I've decided to post. Unfortunately I dont have any photos or anything since there isnt really anything to show. Anyways, for about a month now I've been working on a bot for Steam using Open SteamWorks and a few other libraries. Its still in its infancy and lacks some cool things but its open source (available [URL="https://bitbucket.org/GamerGambit/gbot/src"]here[/URL]). I'm completely open to suggestions and things. It uses Lua and AngelScript to interact with the Open SteamWorks API. The idea behind it is to be a sandboxy but still safe for the host (not malicious or having the ability to screw around too much with the host's Steam account). There is a bit of documentation in the wiki of the repo which I'm still working on it. Feel free to contribute in any way if you feel.
So that demo I was working on for CS, the one with the Marios that spelled out NVCC STEM CLUB. I'm making the marios more intelligent. instead of going to predefined locations, they'll grab the closest block to them, and find the closest destination (location to put a block to ultimately spell the word "nvcc stem club). this way, I can use less marios, as multiple marios can move onto another block after they've finished theirs, and then when all blocks are done, they can either wander around aimlessly or leave the screen, or start scrambling it or whatever. So far I've got the mario able to grab the nearest block and move it to the destination and put it down, but Im trying to figure out how to "deactivate" that block/destination so he's forced to move onto another block isntead of seeing the block he just grabbed as the closest block. It's 11:20 so I decided to do that tomorrow since my code is starting to get messy with all the tinkering I'm doing. I'll draw out a plan, undo some of the bad shit I wrote, and then re-write part of it. and I'm only typing this because it's helping me think about the solution, not because I think you're particularly interested edit: something with pointers
So, I decided to give Unity a try yesterday. The first time I opened the editor, I found it a bit daunting with all the panels, lists, and editors, but after watching some videos on the basics, I was able to play around with the tutorial project a bit. So far, I love it. Everything is fast and easy to work with. In a day of fiddling around in the editor, I managed to make this stupid thing. [vid]http://flm.me.uk/v/SQ45t[/vid] [img]http://flm.me.uk/i/SQ45t[/img] With it, I learned how to use the scene editor, manage assets, create game objects, make animations, and write simple scripts. I think I'll try making a simple game next. Any suggestions?
[QUOTE=Foxtrot200;45821537]So, I decided to give Unity a try yesterday. The first time I opened the editor, I found it a bit daunting with all the panels, lists, and editors, but after watching some videos on the basics, I was able to play around with the tutorial project a bit. So far, I love it. Everything is fast and easy to work with. In a day of fiddling around in the editor, I managed to make this stupid thing. [vid]http://flm.me.uk/v/SQ45t[/vid] [img]http://flm.me.uk/i/SQ45t[/img] With it, I learned how to use the scene editor, manage assets, create game objects, make animations, and write simple scripts. I think I'll try making a simple game next. Any suggestions?[/QUOTE] Yeah, you need a bit more experimenting / learning before you can make decent game. Why the heck are dumbs for, I complimented him "a bit more" which means "just a little more".
[QUOTE=Foxtrot200;45821537]So, I decided to give Unity a try yesterday. The first time I opened the editor, I found it a bit daunting with all the panels, lists, and editors, but after watching some videos on the basics, I was able to play around with the tutorial project a bit. So far, I love it. Everything is fast and easy to work with. In a day of fiddling around in the editor, I managed to make this stupid thing. [vid]http://flm.me.uk/v/SQ45t[/vid] [img]http://flm.me.uk/i/SQ45t[/img] With it, I learned how to use the scene editor, manage assets, create game objects, make animations, and write simple scripts. I think I'll try making a simple game next. Any suggestions?[/QUOTE] I need to try Unity, it seems capable of doing so much.
So I've been working a lot with embedded scripting, and while most of the core code I write is in C, I like to be able to abstract certain problems away with scripted systems, which also allow me to have the core be stable, and the rest of the environment can be an unstable and broken mess without issue (:v:) Anyway, my real problem is that I've been using Lua for scripting, and while it works for what I want, I would prefer something that supports type annotation at least, and compilation for bonus points. I did think about using TinyCC for this, and just slamming that in so that I could expose an API and the application would then compile modules that it would link to itself and use. Seems a bit extreme sometimes, but it could work. Any better ideas? I'd love to hear them. And no AngelScript, it's C++ only.
[QUOTE=mastersrp;45823449]So I've been working a lot with embedded scripting, and while most of the core code I write is in C, I like to be able to abstract certain problems away with scripted systems, which also allow me to have the core be stable, and the rest of the environment can be an unstable and broken mess without issue (:v:) Anyway, my real problem is that I've been using Lua for scripting, and while it works for what I want, I would prefer something that supports type annotation at least, and compilation for bonus points. I did think about using TinyCC for this, and just slamming that in so that I could expose an API and the application would then compile modules that it would link to itself and use. Seems a bit extreme sometimes, but it could work. Any better ideas? I'd love to hear them. And no AngelScript, it's C++ only.[/QUOTE] Dart?
[QUOTE=Liquid Helium;45823512]Dart?[/QUOTE] How does one embed Dart in a C application?
does anyone have experience with the Android NDK/Assimp? i've managed to build a .so that interfaces with my Java code, but assimp requires a 2nd, pre-build .so for all of the importers (and i can't figure out how to link that with my own, custom, ndk-built .so). it feels like this should be stupidly easy but i just can't figure it out :(
[QUOTE=Cold;45818530][vid]http://a.pomf.se/mqotwk.webm[/vid] Ported a fluid simulation from C to C#, really cool to play with. C implementation runs at ~200 FPS. C# implementation runs at ~120 FPS. Performance drop is pretty huge, should have maybe kept it in C.[/QUOTE] Can you point in a direction to just build something extremely simple in C# where you click and it creates an image where you point?
[QUOTE=mastersrp;45823449]So I've been working a lot with embedded scripting, and while most of the core code I write is in C, I like to be able to abstract certain problems away with scripted systems, which also allow me to have the core be stable, and the rest of the environment can be an unstable and broken mess without issue (:v:) Anyway, my real problem is that I've been using Lua for scripting, and while it works for what I want, I would prefer something that supports type annotation at least, and compilation for bonus points. I did think about using TinyCC for this, and just slamming that in so that I could expose an API and the application would then compile modules that it would link to itself and use. Seems a bit extreme sometimes, but it could work. Any better ideas? I'd love to hear them. And no AngelScript, it's C++ only.[/QUOTE] How about mono? C# as a scripting language is pretty cool.
On a plane right now headed to PAX Prime. Anyone else going? We should totes mcgotes meet up, awkwardly shuffle our feet without making eye contact, and briskly part ways.
[QUOTE=Z_guy;45824037]How about mono? C# as a scripting language is pretty cool.[/QUOTE] Recommending C# to a C programmer might not be that fruitful though.
Snip, wrong thread.
[QUOTE=Z_guy;45824037]How about mono? C# as a scripting language is pretty cool.[/QUOTE] Not what I'm looking for, but I'd consider it if you could tell me how I would go about embedding it in a C application.
Sorry, you need to Log In to post a reply to this thread.