Jump to content

  • Log In with Google      Sign In   
  • Create Account

jjd

Member Since 15 Aug 2005
Offline Last Active Today, 02:52 PM

#5164538 Installer for Linux?

Posted by jjd on 03 July 2014 - 05:19 AM

 


I would hunt you down and kill you if you did that. The contents of /usr are exclusively the province of my package manager, and if you go mucking around in there, you will break something.
Lets reach a compromise here, /opt ?

 

 

Or /usr/local

 

-Josh




#5163798 Names for a "Death Star"

Posted by jjd on 30 June 2014 - 04:56 AM

It may not quite fit with what you have in mind, but I have always liked the names that Ian Banks used for ships in the Culture series. Even if they don't quite fit, I am sure you can get some inspriation from them smile.png

 

-Josh




#5139479 Is Python any good for...?

Posted by jjd on 16 March 2014 - 11:16 AM

Hey there,

First of all, i'm sorry if it's wrong forum
since i couldn't find General Dicussion forum(maybe GameDev don't have)
and again i'm sorry.

I would like to know is Python good for
game scripting? let's say » i've a 3D game engine which is C++ programming and Python scripting.

Is it any good? I know lots of people says Lua is better with C++ but i would like to give python a try.

My questions is whats wrong with python?
I know Python is bad at calculating but i can use C++ when i need calculation.(Correct me if i'm wrong.)

Python vs Lua « which one faster?

Is Python good scripting language?

Why will someone choose Python scripting?

Good stuff about Python scripting?

Thank you.

SaiF PUNK

 

I don't have much experience with Lua but I have a lot of experience with python and I love it. Having said that, I would not consider using python as a scripting language that I would call from within C++. For that, I think Lua is a better fit or even javascript. I would, however, consider calling C++ from python and I think that would be a great fit.

 

I would not say that python is particularly slow for computation (for an interpreted language) and there are plenty of easy ways to accelerate it (although they all involve delegating the computation to C in one way or another).

 

-Josh




#5138185 "Soda Buttons" a free sound library

Posted by jjd on 11 March 2014 - 01:47 PM

That was awesome!

 

I want to *find* a way to make use of those sounds :-)

 

-Josh




#5137172 Good pratices to publish code on github?

Posted by jjd on 07 March 2014 - 12:43 PM

Hi there guys, I have two projects that I want to share on github and I was wondering what would be a good way to organize the project. Both projects are in C.

 

In the last days I have:

- Hidden the implementations that should be hidden.

- Improved the Makefile (for instance, it adds the -g flag when compiling).

- Created a .gitignore file.

 

I am still thinking if that is enough. What do you guys expect when you clone a github repository? Should I add some samples or the tests?

 

If you want other people to use you work, it is really useful to version and tag the code (http://semver.org) so your users have some way to understand what kind of changes they could be pulling down. Also make sure that you have a readme and that it tell me how to build and test your code, as well as what dependencies you have.

 

-Josh




#5135625 Good data structures and algorithms in C++ book?

Posted by jjd on 01 March 2014 - 06:32 AM

Checking on Amazon and other on-line book stores and from many authors, I have mainly stumbled upon cynical reviews from many reviewers, that perhaps are aiming to high academically.

Which data structures and algorithms in C++ books have you read that you recommend because of its accessibility and accuracy?
Is Mark Ellen Weiss' a recommendable one?

 
 

Is Nicolai m. Josuttis' the C++ Standard Library good enough? Or does it not delve into algorithms and data structures enough?


Is there anything in particular you are trying to learn about or is this more about exposure to data structures and algorithms or just having a reliable resource to turn to the future? The reason that I ask is that I don't know of many books on data structures and algorithms in C++, so I am not sure how important that is to you. There are a couple of books that I know are highly recommended in general,

The Algorithm Design Manual

Introduction to Algorithms

 

They are not in C++ necessarily, but I think you will find it is easier to understand the ideas presented without language details getting in the way. However, it depends on what you are after.

 

-Josh




#5133697 Zork like text based game python

Posted by jjd on 22 February 2014 - 07:05 PM

 



 



There are a few things going on that you should think about:

def displayinventory():
print("\nInventory:")
for i in inventory:
print(inventory)

You're printing "inventory" for each item "i".  You should have: "print i" not "print inventory"  (no need for () around the parameter)

 

That is only valid if you are not using python 3.0+ so it is generally consider a better practice to use the parentheses because it works across more version of python.

 

-Josh

 

 

You would be printing i as a tuple in versions of Python preceding 3.0 .

 

 

Not sure what you mean, but calling print(i) simply prints out the value of i in either python2 or python3 and has nothing to do with tuples.

 

-Josh




#5133488 Zork like text based game python

Posted by jjd on 22 February 2014 - 04:42 AM

There are a few things going on that you should think about:

def displayinventory():
print("\nInventory:")
for i in inventory:
print(inventory)

You're printing "inventory" for each item "i".  You should have: "print i" not "print inventory"  (no need for () around the parameter)

 

That is only valid if you are not using python 3.0+ so it is generally consider a better practice to use the parentheses because it works across more version of python.

 

-Josh




#5126088 Keep getting rejected by interviewers

Posted by jjd on 24 January 2014 - 07:23 AM

 


it’s our personal impression that you will not fit into our existing design team. Additionally we missed important personal properties. In our team everyone enigneer has to rely on each other team member. Personally I would not rely on the results of your statements or work.

 

Ouch. That's rather telling, because it's unusual for you to get such negative responses - they normally don't like to give negative feedback.

 

Why don't you try and do some practice interviews and get feedback?

 

Also, calling people stupid isn't a great approach. An interview is as much about making the interviewer happy as it is about actually showing how good you are. Many interviewers like to feel good about how great an interviewer they are, how smart their silly questions are, etc.

 

 

I mostly agree -- especially that negative feedback indicates that you made a really bad impression.

 

However, I think it is disingenuous to suggest that the interviewer is effectively trying to get an ego boost. I know that I probably ask stupid questions in an interview. Things that are impractical or unreasonable in the ~30 minutes I get with a candidate. The truth is, I don't really care that much about their final answer and I don't have time to fuck around. I just want to prompt a conversation that isn't simply a canned response. In an in-person interview, I already have a good idea that they are qualified and I just want to figure out two things: (1) do their answers in person jive with the phone screen and (2) do I personally want to work with them day after day. If I think you are trying to stroke my ego, I don't want to work with you. If you are abrasive, a jerk, or uncooperative in an interview (when you should be showing your best side), I don't want to work with you. If you don't get the "right" answer but are communicating your ideas and moving towards a reasonable solution, I can work with you.

 

pro-tip: never mention that you pirate software in an interview :wacko:

 

-Josh




#5123911 Project points to subspace

Posted by jjd on 15 January 2014 - 10:33 AM

Thanks! Am I right when I think that the final projection could be a matrix multiplication by the 2x3 vectors we obtained? 

 

Yes, once you have subtracted A from all of the points.

 

-Josh




#5123900 Project points to subspace

Posted by jjd on 15 January 2014 - 09:53 AM

Let's say I have some coplanar points in R^3. I want to describe these points by coordinates on the plane they share, in R^2. This way I can do some tests faster. How should I do this? 

 

Take any 3 distinct points A, B, and C. Take the cross product of (B - A) and (C - A) to get the normal, N, of the plane. Let (B - A) be one of your axes (normalize it). Take the cross product of N and (B - A) to get another orthogonal vector in the plane as the other axes (normalize it). Then project your points (relative to A) in your new axes.

 

-Josh




#5122852 Trying to compile using C++11

Posted by jjd on 11 January 2014 - 10:41 AM

I think you'll need to show us the header and the source for RenderWindow. However, I think your invocation of g++ maybe wrong. It looks like you are trying to compile main but you are asking it to build a binary. Perhaps you meant to use -c instead of -o?

 

-Josh




#5122574 OOP is so confusing[wrong question]

Posted by jjd on 10 January 2014 - 05:50 AM

Hi guys i want to know the process of object orientated programming(OOP) i tried my best to understand what is exactly the process but i have no idea what is it.I have a code like this:

class Song(object):

	def __init__(self, lyrics):
		self.lyrics = lyrics
	
	def sing_me_a_song(self):
		for line in self.lyrics:
			print line
			
happy_bday = Song(["Happy birthday to you",
		   "I don't want to get sued",
                   "So I'll stop right there"])	
	   
bulls_on_parade = Song(["They rally around the family",
			"With pockets full of shell"])
						
happy_bday.sing_me_a_song()

bulls_on_parade.sing_me_a_song()

And i don't understand what is "for" and "in" statement it is really confusing me. and i don't understand what :

self.lyrics = lyrics

and 

for line in self.lyric:
        print line

is do for .Sorry for asking to muchunsure.png

 

The problem here is nothing really to do with object oriented programming. Keywords like 'for' and 'in' are fundamental to python (and a lot of other programming languages -- object oriented or not) so I would suggest that you take I look a 'getting started' tutorial for python.

 

-Josh




#5121927 "Squaring" a vector

Posted by jjd on 07 January 2014 - 09:49 AM

 

 

I was reading an article on ray-sphere intersection on http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-7-intersecting-simple-shapes/ray-sphere-intersection/, and came across this :

 

|o + rt|^2 - R^2 = 0

 

When we develop this equation we get (equation 3):

o^2 + rt^2 + 2ort - R^2 = 0

 

how are they able to do this? and I guess o^2 means the dot product in this case?

 

Yes, that is a common short-hand for the dot product of a vector with itself.

 

-Josh

 

 

So we have something like (o + rt).(o + rt) 

what property of dot product allows us to foil it out ?

 

 

The dot product has the properties of being commutative, distributive, and associative, which mean you can expand it as

 

(x + y).(x + y) = x.x + x.y + y.x + y.y = x.x + 2x.y + y.y = x^2 + y^2 + 2x.y

 

-Josh




#5121914 "Squaring" a vector

Posted by jjd on 07 January 2014 - 08:46 AM

I was reading an article on ray-sphere intersection on http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-7-intersecting-simple-shapes/ray-sphere-intersection/, and came across this :

 

|o + rt|^2 - R^2 = 0

 

When we develop this equation we get (equation 3):

o^2 + rt^2 + 2ort - R^2 = 0

 

how are they able to do this? and I guess o^2 means the dot product in this case?

 

Yes, that is a common short-hand for the dot product of a vector with itself.

 

-Josh






PARTNERS