Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411273 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 02:30:37 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The grumpy old programmer room
Pages: 1 ... 226 227 [228] 229 230 ... 295
Print
Author Topic: The grumpy old programmer room  (Read 733201 times)
Sik
Level 10
*****


View Profile WWW
« Reply #4540 on: July 31, 2014, 06:10:20 PM »

That error is because CMake's missing libraries that were meant to be added at link time, but weren't, and so fail upon runtime linking.
It's happened to people before here, which might have your solution.

And the problem turned out to be... libcurl o.O (removing the locally built libcurl ended up fixing it, yup - for what does CMake use libcurl anyway?!)
Logged
MorleyDev
Level 0
***

"It is not enough for it to just work"


View Profile WWW
« Reply #4541 on: August 01, 2014, 07:11:34 AM »

And the problem turned out to be... libcurl o.O (removing the locally built libcurl ended up fixing it, yup - for what does CMake use libcurl anyway?!)

I think it's for the Dash/CDash integration. Completely useless to 99% of projects and some of the crap I can appreciate that premake doesn't have. I just wish premake did a bit more forced-standardisation of folder structure and build process and stuff, some helper functionality to wrap away platform-specific concepts to make it so much more usable in a generic fashion.

Maybe I'll make my own. With blackjack. And hookers. And robots that shoot lasers out of their eyes and go pew pew pew boom aaaah no my kids he lasered my kids aaaah the horror quick send in the dinosaur legions and armoured karate ninjas and *walks away rambling*
« Last Edit: August 01, 2014, 07:17:23 AM by MorleyDev » Logged

RalenHlaalo
Level 0
***



View Profile WWW
« Reply #4542 on: August 04, 2014, 09:54:55 AM »

I was looking at some code I wrote only a few months ago (January '14), and can barely recall how it works. It's a depressing feeling.
Logged

Sik
Level 10
*****


View Profile WWW
« Reply #4543 on: August 04, 2014, 10:09:26 AM »

Lesson: make better use of comments.

The code does look rather straightforward though... Shouldn't be that hard to relearn what it's trying to do, especially if you understand the format (or did you forget that as well?).
Logged
RalenHlaalo
Level 0
***



View Profile WWW
« Reply #4544 on: August 04, 2014, 10:33:00 AM »

Lesson: make better use of comments.

The code does look rather straightforward though... Shouldn't be that hard to relearn what it's trying to do, especially if you understand the format (or did you forget that as well?).

Well, that's just one file; the whole project now confuses me a little despite that it's reasonably well organised (IMO). It's just depressing how much momentum is lost when you take a break to work on other things. Moreover, I've been working mostly with Java and JavaScript these last few months and feel like a part of my brain has atrophied from C++ withdrawal.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4545 on: August 04, 2014, 03:45:02 PM »

In C#, if a struct cannot equal null, what is supposed to happen when you cast an object of 'object' type to a struct?

class MyClass {}
struct MyStruct {}

object obj = new MyClass();

MyStruct s = (MyStruct)obj; <------- ?

is that a valid cast? Do structs derive from object?




edit : tested, invalid cast exception
Logged

standardcombo
Level 8
***


><)))°>


View Profile
« Reply #4546 on: August 05, 2014, 09:44:14 AM »

Thank you. I try to avoid using try-catch, but it seems to be the best solution here as using the is to avoid the exception would be a perf cost.

Long story short, compiler was telling me to override Equals() and GetHashCode() which is unknown territory for me and MS documentation had some strange cast things.
Logged

Sato
Level 0
**


Quote Me


View Profile WWW
« Reply #4547 on: August 12, 2014, 05:33:10 AM »

I'm still fairly new to this. I tried to make pong: http://pastebin.com/mAhbqte4 and yay for me, a ball bounces. But I can't work out how to angle the balls bounce without redoing the way ball movement works Angry

anyone a fan of straight-line pong?
Logged

jgrams
Level 3
***



View Profile
« Reply #4548 on: August 12, 2014, 05:46:20 AM »

Yeah, velocity is a vector quantity too (needs both X and Y). No way around that, I'm afraid.
Logged
Sato
Level 0
**


Quote Me


View Profile WWW
« Reply #4549 on: August 12, 2014, 05:52:11 AM »

Yeah, velocity is a vector quantity too (needs both X and Y). No way around that, I'm afraid.

urgh, I've never been good with vectors... time to relearn that I suppose...
Logged

Quarry
Level 10
*****


View Profile
« Reply #4550 on: August 12, 2014, 06:02:24 AM »

or angle and magnitude
Logged
jgrams
Level 3
***



View Profile
« Reply #4551 on: August 12, 2014, 09:12:33 AM »

Oh, nice. I just assumed angle/magnitude would be more complicated, but you're right. If you have everything in angles, you can bounce by flipping the ball motion angle around the paddle angle. So assuming the paddle angle is flat along the paddle face (and not perpendicular to it), that's...

Code:
ball_angle = 2*paddle_angle - ball_angle;

Very cool. Of course, then you need a bit of trig for your motion, but you could cache that as velX and velY and only change it when you bounce.
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4552 on: August 12, 2014, 10:13:31 AM »

The way the original Pong machine did it is even simpler. Yeah, there's X and Y speed, as mentioned before. However, there isn't any complex calculation going on for the angle: it just sets the Y speed based on whatever part of the paddle it hit (and just flips the X speed), it completely ignores what was the previous Y speed.

The ball accelerates over time too, but that's determined exclusively by how many times it has bounced off the paddles (the game just increases the X speed after every few bounces).
Logged
Sato
Level 0
**


Quote Me


View Profile WWW
« Reply #4553 on: August 12, 2014, 10:22:35 AM »

The way the original Pong machine did it is even simpler. Yeah, there's X and Y speed, as mentioned before. However, there isn't any complex calculation going on for the angle: it just sets the Y speed based on whatever part of the paddle it hit (and just flips the X speed), it completely ignores what was the previous Y speed.

The ball accelerates over time too, but that's determined exclusively by how many times it has bounced off the paddles (the game just increases the X speed after every few bounces).

Ah so the X speed is really simple. I was trying to keep it faithful, so if doing it this way is also simpler then that's great.
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #4554 on: August 21, 2014, 01:15:44 PM »

The ARB recently released the OpenGL 4.5 spec and only Nvidia users are able to play with it yet.  I want those juicy bindless graphics and better multithreading!
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4555 on: August 21, 2014, 01:35:38 PM »

I'm kind of with the camp that says they just need to start over and stop it with all these fragmented specs. As much as I love opengl it's really because I don't have many options.
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #4556 on: August 21, 2014, 01:51:54 PM »

I'm kind of with the camp that says they just need to start over and stop it with all these fragmented specs. As much as I love opengl it's really because I don't have many options.
I totally agree.  There's too much cruft left over from the FFT days.  It needs a complete redesign like the D3D9->D3D10 transition.  I also like the distinction between rendering and memory management that D3D11 provides with the Device/Context separation to make it easier to multithread.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Jarkko Vallius
Level 0
**



View Profile WWW
« Reply #4557 on: August 21, 2014, 02:09:32 PM »

MonoDevelop is horrible. I guess I should try Visual Studio. Would it be any better?
Logged

framk
Level 2
**


I don't know anything


View Profile
« Reply #4558 on: August 21, 2014, 02:23:55 PM »

Short answer: "Yes"
Long answer: "Yes."
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4559 on: August 21, 2014, 02:31:52 PM »

I'm kind of with the camp that says they just need to start over and stop it with all these fragmented specs. As much as I love opengl it's really because I don't have many options.
I totally agree.  There's too much cruft left over from the FFT days.  It needs a complete redesign like the D3D9->D3D10 transition.  I also like the distinction between rendering and memory management that D3D11 provides with the Device/Context separation to make it easier to multithread.

I'm hoping to get some time to play with D3D at some point soon. I've always been fully entrenched in opengl but a lot of fellow engineers have told me the D3D api is so much nicer. Too bad it has bad platform support.

MonoDevelop is horrible. I guess I should try Visual Studio. Would it be any better?

Oh god yes. Monodevelop is the second worst IDE I've used.
Logged

Pages: 1 ... 226 227 [228] 229 230 ... 295
Print
Jump to:  

Theme orange-lt created by panic