Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411521 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 05:53:29 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 145 146 [147] 148 149 ... 279
Print
Author Topic: The happy programmer room  (Read 678715 times)
nospoon
Level 1
*


View Profile
« 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
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« 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?
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #2922 on: October 17, 2012, 07:11:09 PM »

Got my gamepads working under Linux and it was shockingly easily.

Only 3 more platforms to figure out.

Just in case you need some example code to reference: http://sacredsoftware.net/svn/misc/StemLibProjects/gamepad/trunk/source/gamepad/

Dunno what your fourth platform is, but I have the three big ones implemented in there, at least.
Logged

Geti
Level 10
*****



View Profile WWW
« 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 Wink 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
Level 10
*****


View Profile
« 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-
Level 10
*****


ftw


View Profile
« Reply #2925 on: October 17, 2012, 08:26:54 PM »

I just write functions over and over.
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW
« Reply #2926 on: October 18, 2012, 04:48:24 AM »

Got my gamepads working under Linux and it was shockingly easily.

Only 3 more platforms to figure out.

Just in case you need some example code to reference: http://sacredsoftware.net/svn/misc/StemLibProjects/gamepad/trunk/source/gamepad/

Dunno what your fourth platform is, but I have the three big ones implemented in there, at least.

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
Administrator
Level 10
******



View Profile WWW
« Reply #2927 on: October 18, 2012, 08:14:33 AM »

That is some beautiful C code, by the way.

Thank you! Grin

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
Level 0
***



View Profile
« 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  Big Laff
Logged
RalenHlaalo
Level 0
***



View Profile WWW
« 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.hpp
UiButton.cpp

It's a damned sight neater than in my previous game  Durr...?

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 Tongue
« Last Edit: October 22, 2012, 11:53:10 PM by RobJinman » Logged

Geti
Level 10
*****



View Profile WWW
« 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 Big Laff

Gonna do some stress tests later with larger groups of boxes, some circles and a bigger tilemap.

Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« 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

eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #2932 on: October 23, 2012, 05:57:34 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.. Evil

Logged

Muz
Level 10
*****


View Profile
« 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
Level 0
**



View Profile
« 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 Smiley
Logged
JigxorAndy
Level 6
*


Working on Dungeon Dashers


View Profile WWW
« 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

Twitter / Dungeon Dashers: Website / Steam Store
InfiniteStateMachine
Level 10
*****



View Profile
« 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-
Level 10
*****


ftw


View Profile
« Reply #2937 on: October 26, 2012, 02:21:36 AM »

Ah, the pre-architecture self-screw....
Logged
vittorioromeo
Level 2
**



View Profile WWW
« 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.. Evil

Nice framerate! Are the tiles automatically-joined? I remember Box2D had some problems with bodies getting stuck between two tiles
Logged

eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« 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.. Evil

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. Smiley
Logged

Pages: 1 ... 145 146 [147] 148 149 ... 279
Print
Jump to:  

Theme orange-lt created by panic