Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - James_wright_1990

Pages: [1] 2 3
1
General chat / Re: It's been 10 years!
« on: February 15, 2011 »
Happy birthday ;D

2
Merry (Late) Christmas and happy new year everyone ;D

3
hi

ive had a look around and althought the tao framework website is down ive managed to figure out that the version of freeglut that comes with it is old (it is version 2.4.0.2 which was released in june 2005) but from what i can tell it should work with windows 7 still. Are you using a 64 or a 32 bit system because i have found some instances of the error your having being caused on vista 64 bit and xp 64 bit im having a look into it at the moment.

james

4
hi
I think this is the way i am heading at the moment i currently have classes for geometric objects wich just have just data like size, location etc and two interfaces an IUpdate and an IDraw which tie to classes thast know how to draw and mainipulate the data depending on  what state the program is in.

james

5
C / C++ /C# / Re: [C++] attempt at opengl using C++.
« on: February 22, 2010 »
ah i see so at the moment my state renders things but what should be done is that the model holds all the data (ie positions etc) and the view takes that data and renders the screen and the controller(as it is the controller and view are joint) should handle user input is that right?

james   

6
C / C++ /C# / Re: [C++] attempt at opengl using C++.
« on: February 21, 2010 »
 ah the teapot was just there to check that the display method is was working proerly whilst i was testing i thought i removed it i have changed it since so that it displays the initial state of the program sorry about that

james

7
C / C++ /C# / Re: [C++] attempt at opengl using C++.
« on: February 21, 2010 »
hi
cheers for the advice i see what you meen about simplicity the project as it is does look a little wordy considering what it does. the idea to begin with was to re-write a system i already had working in C# in C++ (we're not allowed to use c# in most of our projects this year) so i could quickly get on with the project (as i can already do the opengl side of things) but i think it got a little complicated in the translation.

at the moment i'm torn between sticking with it because it works and i need to get on or going back to basics to simplify it idealy i would like to simplify it but i'm not sure if i'll have the time.

thanks for the input

james

8
General chat / Re: The Welcoming Comittee
« on: February 21, 2010 »
Hi Kirl

 :hi:

hope you enjoy it here!

james

9
C / C++ /C# / [C++] attempt at opengl using C++.
« on: February 21, 2010 »
hi i just got a new coursework assignment and i thought it would be a good idea to set up a basic framework to build opengl programs before actualy starting on the prodject as a whole.

anywho as this is my first attempt at a C++ program that performs any sort of meaningful task i was wondering if someone that knows a little more about C++ could give it a look over and cheack if the C++ is OK.

cheers,
james

10
C / C++ /C# / Re: [C++] stack Vs heap?
« on: February 19, 2010 »
Ah fair enough so the difference is whether the object is stored automatically or dynamicaly and not where it is stored so if i use:
Code: [Select]
class blah;the destructor will be called when the block of code i delcared my istance of the class ends but if i use:
Code: [Select]
class *blah = new blah();the destructor is called when i use the line:
Code: [Select]
delete blah;
is that right?

11
C / C++ /C# / Re: [C++] stack Vs heap?
« on: February 18, 2010 »
ah ok fair enough so it comes down to choice unless resorces are scarce in which case heep is better cheers for clearing that up.

james

12
C / C++ /C# / [C++] stack Vs heap?
« on: February 17, 2010 »
hi

i am currently writing a program in c++ and i am using classes. in c# classes are always on the heap and created like:
Code: [Select]
class blah = new blah()
but in c++ i know i can use:

Code: [Select]
class blah;
or

Code: [Select]
class *blah = new blah();
delete blah;

although our lecturers have given an overview of how each works we have not been given many examples situations where each is approptriet and i was wondering if anyone could clear this up for me.

james

13
C / C++ /C# / Re: [C++] freeglut, sdl or windows.h?
« on: February 17, 2010 »
KK thanks for the help i am looking into it at the moment

cheers james

14
C / C++ /C# / [C++] freeglut, sdl or windows.h?
« on: February 16, 2010 »
Hi,

I am about to start a new piece of coursework for my degree and i'm having some trouble on deciding how to open and manage my window. for my last prodject i used freeglut which was fine but i had to put up with its quirks which have put me off it recently. the new nehe tutorials are using sdl which looks ok but it will require me to have to learn more about how sdl works and my third option is to use windows.h and open and manage the window manualy this last option is used in a book i anm using but the problem is the aurther just gives large sections of source code with very little explanation and i dont like not knowing how my code works.

basically i was wondering if anybody had any sergestions as to which i should go with as i'm getting a little confused.

james

15
hi

thanks jim this one turns out to be simple programmer (and human) incompetance first i was running an older version without realising (its been a while since i looked at it and i keep a stupid amout of versions documenting every change and forgot to lable the newest one which does use stopwatches), secondly your right i was calling update far to often (causing a slowdown when there was alot to update) and thirdly v sync was on on the graphic card on my desktop. So three for three on silly mistakes will watch for those in the future cheers for the help fixed it now.

cheers
james

16
hi, first post in a while been away from my computer for a while.

I reacently ran my space invaders progam on my desktop (i finally got it fixed) and i noticed a large slowdown in game time the code is the same i still use stopwatches to set the laps between updates but for some reason its running at about half the speed. i've uploaded the most recent version as i've spent ages trying to figuer this out and i'm having no luck it works fine on my laptop but not my desktop if anyone could shed some light i would be most apprecetive.

James

17
General chat / Re: Merry Christmas (2009)
« on: December 27, 2009 »
this is late i know (i've not been neer a computer over christmas) but merry christmas everyone.

james

18
if you still need tutorials this http://www.robmiles.com/c-yellow-book/Rob%20Miles%20CSharp%20Yellow%20Book%202009.pdf is the book i used to learn c# its a little basic at the begging and geared towards windows forms but i still find it a good reasorce for general C# knowledg (it's written by my lecturer and meant for people with no prior prograsmming knowledg so thats why it starts out basic but stillwell worth a look) as far as C++ goes Idont realy know of that many tutorials i just hit the msdn site (or there's google which is the fountain of knowledg) and post quetstions here if i get really stuck.

James

edit(just realised that the link doent work as a link you have to right click on it and save it to your computer to use it sorry dont know why)

19
as the others said with C# there will always be portability issues (microsoft really dont like sharing) but as a language to learn its very freindly.

as far as OO goes visual studio is very good for this its as simple as clicking on your solution and adding a new class and the Ide will add a new class for you(if you do this in C++ it creates the class and the header file). for creating classes i find it usefull to write down what the program does in words and then read through it, the nouns represent classes and the verbs will represent methods eg a simple bank has accounts, members etc and these represent classes within the system.

Quote
Typically examples of object-oriented code take up more lines then their procedural counterparts, but this is because those examples are often only a couple of hundred or a thousand lines long. Once you get over 5,000 lines (which is pretty small project) I find object-oriented code really starts to scale a lot better then procedural code

I generally find this to be true as well. I have a freind on my course who almost always programs procedurally and on the smaller prodjects he's always got less lines of code but when it comes to the bigger stuff OO always gives me less code due to the fact that OO makes it alittle more work to do things once but then much easier to keep using them.

James

20
Hi I'm starting to code in C++ this year and i've found it a lot easier because i already have a prior knowlegd of C# and there is (syntacticly) a lot of similarities between C# and C++ with the added bonus that C# "looks after" you more than C++ and so its easier as a language to learn because it makes checks to make sure youve not done anything silly. this is good because when you then come to learn C++ you will not make those mistakes.

as far as speed goes my lecturer describes it like this C# is like a family car: its reliable and gets the job done, C++ is like an F1 car it gets the job done at break neck speed but if you make a mistake it will kill you. also i would like to point out that C# is slower than C++ but it is by no means extreemly slow.

Dont know how helpfull this all has been but i hope it helps.

James

Pages: [1] 2 3