nospoon
Level 1
|
|
« Reply #2920 on: October 17, 2012, 06:43:25 AM » |
|
CPU raycasting
Wow :D Somewhere in the interwebs I found a working 3D(or almost 3D) raycaster in flash. I was amazed. My raycaster is an unoptimized gpu one, and the performance is amazing. It runs on my integrated GPU on 30+fps Here's the low res blender monkey, with no texture filtering. (and kinda bugged) I have an idea about mapping a texture to voxels (and giving them materials etc) on gpu. So it would look kinda like minecraft, but 101% gpu.
|
|
|
Logged
|
|
|
|
Average Software
|
|
« Reply #2921 on: October 17, 2012, 04:38:18 PM » |
|
Got my gamepads working under Linux and it was shockingly easily.
Only 3 more platforms to figure out.
|
|
|
Logged
|
What would John Carmack do?
|
|
|
|
Geti
|
|
« Reply #2923 on: October 17, 2012, 07:49:27 PM » |
|
@nospoon: haha, yeah I've seen similar things in java, and a few interesting custom software GL-like renderers in flash that were mostly made by bored programers I think, but it's always interested me a little. I prefer making games, but coding tech can be fun too. That performance is pretty slick for the GPU raycaster, your res is much higher than mine I assume there's some degree of parallelism going on with your GPU one because theres no way I could get a res that high with a single thread, especially on the CPU.
|
|
|
Logged
|
|
|
|
Muz
|
|
« Reply #2924 on: October 17, 2012, 08:14:36 PM » |
|
Writing code is so fun that sometimes you have to resist the urge to rewrite a function that already exists. Amusingly, when you code with someone else, you'll see a whole bunch of functions that do the same thing.
|
|
|
Logged
|
|
|
|
Graham-
|
|
« Reply #2925 on: October 17, 2012, 08:26:54 PM » |
|
I just write functions over and over.
|
|
|
Logged
|
|
|
|
Average Software
|
|
« Reply #2926 on: October 18, 2012, 04:48:24 AM » |
|
That is some beautiful C code, by the way. However, for me, half the fun is figuring this stuff out for myself. I did look at your Linux implementation and it was basically the same as mine. As a note, I used the definitions in linux/joystick.h, which are more suited than the ones in linux/input.h. Oh, and platform #4 is Haiku.
|
|
|
Logged
|
What would John Carmack do?
|
|
|
ThemsAllTook
|
|
« Reply #2927 on: October 18, 2012, 08:14:33 AM » |
|
That is some beautiful C code, by the way.
Thank you! However, for me, half the fun is figuring this stuff out for myself.
Yep, totally understandable. That's how I did it on Windows and Mac OS X, but I didn't even know where to start on Linux, so I borrowed heavily from SDL_joystick to get started. I'll definitely check out linux/joystick.h, thanks for the tip!
|
|
|
Logged
|
|
|
|
Salsario
|
|
« Reply #2928 on: October 18, 2012, 10:49:25 AM » |
|
Talking about linux, finally decided to upgrade my old laptop from Debian squeeze to the wheezy. Going to make the switch from XNA and c# to Mono and Monogame. Mostly for saving energy (and thus money), since the laptop uses a whole lot less of it compared to my pc. So I am happily installing it right now and to make it programmersrelated, I am doing it via pxe-boot, so I had to make a config file
|
|
|
Logged
|
|
|
|
RalenHlaalo
|
|
« Reply #2929 on: October 22, 2012, 11:38:01 PM » |
|
GOD DAMN! Don't you just love when you're able to implement something really easily by utilising various of your engine's subsystems? It's like everything just slots together really nicely. I just made a UiButton class that looks like this: UiButton.hppUiButton.cppIt's a damned sight neater than in my previous game And here's the code for EntityUi.cpp (yeah, it's a mix-in class). I doubt it will impress anyone here, but I'm happy with it
|
|
« Last Edit: October 22, 2012, 11:53:10 PM by RobJinman »
|
Logged
|
|
|
|
Geti
|
|
« Reply #2930 on: October 23, 2012, 04:27:47 PM » |
|
Time for some optimisation of course (that 700 FPS is >1200 with debug rendering off, turns out alpha blending heaps of squares and circles is expensive, but it was 4000+ before tilemaps entered the scene, the bastards), but this little framework is coming along. I'm pretending its computer science study so I can justify doing it around KAG work from time to time Gonna do some stress tests later with larger groups of boxes, some circles and a bigger tilemap.
|
|
|
Logged
|
|
|
|
ThemsAllTook
|
|
« Reply #2931 on: October 23, 2012, 04:53:46 PM » |
|
Not sure whether this makes me more happy or grumpy, but I just learned that one of my normal OpenGL usage patterns is REALLY inefficient - enough that doing it a couple dozen times per draw dropped my frame rate from >60 to ~15. So, I'm happy to have performance hugely improved by fixing it, but grumpy that I was dumb enough to do it wrong in the first place.
For the curious, the problem was calling glMapBuffer multiple times on the same VBO. Using glBufferData instead (or using a different VBO each time I want to modify it during the same render) fixes the problem.
|
|
|
Logged
|
|
|
|
|
Muz
|
|
« Reply #2933 on: October 23, 2012, 11:16:55 PM » |
|
Allocating 2 hours to fixing certain bugs, expecting 2 days, but getting all of them out in less than 30 minutes. I love debuggers and proper error logs.
|
|
|
Logged
|
|
|
|
Grungi_Ankhfire
|
|
« Reply #2934 on: October 24, 2012, 12:05:51 AM » |
|
Set out to fix the only known problem with my work-in-progress voxel editor, and fixed it in 20 minutes... Now I can concentrate on the two features I want to add before having met my first goal! Feels good
|
|
|
Logged
|
|
|
|
JigxorAndy
Level 6
Working on Dungeon Dashers
|
|
« Reply #2935 on: October 24, 2012, 08:14:47 AM » |
|
I worked really hard today and got a lot done! I refactored my game's menu system and made it all flow much better. It all went well and I'm proud of how much I was able to achieve (and not procrastinate away). Screenshot summarizes how I feel: Here's the post I wrote in my devlog: http://forums.tigsource.com/index.php?topic=24783.msg807364#msg807364
|
|
|
Logged
|
|
|
|
InfiniteStateMachine
|
|
« Reply #2936 on: October 25, 2012, 08:47:31 PM » |
|
finally fixed a bug in my SAT collision algorithm that was causing objects to fall through other objects that were less wide. That problem has been dogging me for 5 days!
Long story short. I screwed myself with a pre-mature optimization.
|
|
|
Logged
|
|
|
|
Graham-
|
|
« Reply #2937 on: October 26, 2012, 02:21:36 AM » |
|
Ah, the pre-architecture self-screw....
|
|
|
Logged
|
|
|
|
vittorioromeo
|
|
« Reply #2938 on: October 26, 2012, 05:58:21 AM » |
|
Just decoupled the box2d physics update from the renderer update using a fixed time step, an accumulator and interpolation in the renderer.. feels nice and runs at ~1700fps.. Nice framerate! Are the tiles automatically-joined? I remember Box2D had some problems with bodies getting stuck between two tiles
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #2939 on: October 27, 2012, 04:06:52 PM » |
|
Just decoupled the box2d physics update from the renderer update using a fixed time step, an accumulator and interpolation in the renderer.. feels nice and runs at ~1700fps.. Nice framerate! Are the tiles automatically-joined? I remember Box2D had some problems with bodies getting stuck between two tiles Cheers, its fairly minimal, so thx to box2d for the high framerate. I'm using a capsule shape to glide smoothly across tiles. This causes a little problem where if you stand right on the edge of a platform you'll slide off, but its something I'm willing to bear.
|
|
|
Logged
|
|
|
|
|