345 Posted Topics

Member Avatar for SgtMe

I have made a python program which will create an OpenGL and render a teapot (GLUT standard teapot) with a shader that I specify. The shader is specified as follows: [LIST] [*]I have a file called "index.ini" which contains the file paths to a vertex shader and pixel shader file …

Member Avatar for SgtMe
0
484
Member Avatar for neocortex

I thought PyGoogle was dead? [url]http://pygoogle.sourceforge.net/[/url] "Unfortunately, Google no longer supports the SOAP API for search, nor do they provide new license keys. In a nutshell, PyGoogle is pretty much dead at this point."

Member Avatar for joehms22
0
136
Member Avatar for SlzzyDzzy

I'm guessing you'd download the appropriate headers and libraries and dump them in your compiler/IDE folders. If you want something simpler, have a look at Allegro. What IDE/Compiler are you using anyway?

Member Avatar for klemmerj
0
203
Member Avatar for KA2806

For a start, on line 9 you call: [CODE]drawPatchwork(height, width, Colours)[/CODE] You don't have a function called "drawPatchwork" In line 45, you pass a value to variable "y" in the variables. However, you then instantly overwrite it in the next line to value "51". Line 52 can be [CODE]radius-=5[/CODE] Line …

Member Avatar for woooee
0
80
Member Avatar for newbieha

What is the problem that you are having? You say on line 57, "this doesn't work". What bit doesn't work? What is exactly the problem? What is it meant to do?

Member Avatar for TrustyTony
-1
114
Member Avatar for sDanyal

One useful trick for creating sky is "sky box". Basically, this is a cube surrounding your entire map (ie everything is inside it). On the inside of the cube, you map a sky texture. Unfortunately, this presents other issues to deal with, such as removing the seams at the edges …

Member Avatar for SgtMe
0
170
Member Avatar for sandeep789
Member Avatar for corrwee

Please use code tags next time (push the CODE button before you paste your code).

Member Avatar for SgtMe
0
248
Member Avatar for Philosophy

Couldn't you use a switch instead of having all of those if statements? I'm sure they will be an even better method than that. Do you actually need the lower case bit? Or could 'z' and 'Z' be the same? If so, then you just need one line to capitalize …

Member Avatar for Philosophy
0
436
Member Avatar for cshemby86

We won't write your code for you. It's your homework, not ours. Show us some of your code and we can help you if you have problems. But don't think that we will do your hard work. These tasks are designed for you to learn. You won't learn anything if …

Member Avatar for cshemby86
-3
205
Member Avatar for muze

Can we see the code please? It's near impossible to help with errors unless we can see the code.

Member Avatar for SgtMe
0
111
Member Avatar for notmasteryet
Member Avatar for muze
0
148
Member Avatar for acer07
Member Avatar for wazaa

Please repost with code tags (push the code button before you paste!). Then we can read your code much easier.

Member Avatar for wazaa
0
134
Member Avatar for nocluewhattodo

Here's a demo code: [CODE]#include <cstdlib> #include <iostream> using namespace std; int main() { //variables //length of array const int len=5; //array of numbers. Obvs. 24 is highest int arr[len]={3, -1, 24, 10, 16}; //index of current highest int HighestSoFar=0; //loop until we have tested each array value int i=0; …

Member Avatar for SgtMe
0
318
Member Avatar for jamesl22

A quick google turned this out (I just added ' system("pause"); ') : [CODE]#include <fstream> #include <iostream> using namespace std; int main () { char buffer[256]; ifstream myfile ("test.txt"); while (! myfile.eof() ) { myfile.getline (buffer,100); cout << buffer << endl; } system("pause"); return 0; } [/CODE] Seemed to work …

Member Avatar for Agni
0
179
Member Avatar for Buolbear4444

To be honest your best off with video tutorials. BlenderCookie is really good. The authors are all pros and they voice over the tutorial well (so you can model whilst just listening to the video) and they cover all the basics. They do everything from modeling, right up to rendering.

Member Avatar for SgtMe
0
145
Member Avatar for emcyroyale

If it is a compiled executable, no. You can obviously view the code of open source games, but I take it you mean commercial games. Technically you can decompile code, but it's highly illegal.

Member Avatar for Tellalca
0
96
Member Avatar for Zemfik

The bartender becomes increasingly worried about the current state of the duck and cautiously asks the duck to calm down.

Member Avatar for Kraai
0
235
Member Avatar for Wehttam
Member Avatar for AndreRet
0
26
Member Avatar for happygeek

Hi I'm Mark and I'm a... [LIST] [*]Music Geek [*]Music Geek [*]Music Geek [/LIST]

Member Avatar for Chatterbox721
0
758
Member Avatar for Hawkeye Python

In your code, you have a kind of double negative here: [CODE]while not n == 0:[/CODE] This is saying that "while 'n' does not equal 0", do stuff. A simpler way of writing this is "while n != 0:". The "not" is only really used for boolean. ie: [CODE]a = …

Member Avatar for Hawkeye Python
0
150
Member Avatar for skorm909

What are the errors? You could also reduce the amount of variables that you have by a fair way. Instead of using "int lvl1", "int lvl2" and so on, just use an array.

Member Avatar for alexchen
0
94
Member Avatar for diamondsrain

That's because you are using blender 2.55 The instructions you were given are for 2.49b and earlier. If I were you, I would use 2.49b 2.55 confuses the heck out of me :/

Member Avatar for SgtMe
0
251
Member Avatar for Othisstuffisfun

Welcome the DaniWeb :) I had this problem a few days ago. I always thought that you could define a variable like this: [CODE]int a;[/CODE] but it always picks up a weird value and not zero like I would have thought. Make sure that all your variable definitions are defined …

Member Avatar for StuXYZ
0
642
Member Avatar for knellgust

When you have the "return" statements, ie. [CODE]{return title;} //and {return price;}[/CODE] You shouldn't have braces. It should be: [CODE]return title; return price;[/CODE]

Member Avatar for SgtMe
0
172
Member Avatar for yellowkaiq

If the last letter is b or d or g etc., then add "word[wordlength]" on the end, nad then add 'er'. Just use a compound if statement to test for all the letters.

Member Avatar for yellowkaiq
0
187
Member Avatar for Aaron26

We won't do your homework for you. Without you showing a decent amount of code you have written (ie. effort), we will only link you to places that can get you on the right track, and we will NOT give you bits of code. Sorry, but it's the rules.

Member Avatar for SgtMe
-4
228
Member Avatar for Mr_PoP

Looks like a fake virus. What's even the point? Is it that fun scaring the sh*t out of someone you don't know? Do you think it's enjoyable for them? Would you like (if you though it was real)?

Member Avatar for peter_budo
-2
166
Member Avatar for Alexkid

[url]http://www.geekpedia.com/KB114_What-is-the-difference-between-sharpdefine-and-const.html[/url]

Member Avatar for Alexkid
1
120
Member Avatar for Martje
Member Avatar for jonsca
0
85
Member Avatar for chode1

Please press the code button before you paste your code. Please explain your problem better. What does your program do to the data before it writes it into other files?

Member Avatar for chode1
0
82
Member Avatar for yogibear13

These won't fix your issue, but they will clean up your code a bit. [B]In main.cpp:[/B] -Change lines 8-10 to: [CODE]float mypointx, mypointy, Answer;[/CODE] -After line 22 add: [CODE]system("pause");[/CODE] [B]In XYPoint.h:[/B] -Change lines 13-17 to: [CODE]float mypointx, mypointy, pointpx, pointpy, mydistance;[/CODE] [B]In XYPoint.cpp:[/B] -Remove lines 6-10 (Variables already zero. For …

Member Avatar for SgtMe
0
191
Member Avatar for M3M69
Member Avatar for tdba.316

Please could you post what the exercise is so that we have a better idea of what's going on. Thanks :)

Member Avatar for tdba.316
1
1K
Member Avatar for halopower67

Have a look at classes. Make a class for your frigate/each type of ship. Then it should have functions such as one for movement, firing etc. You'll need to be careful about what variables you need and passing them backwards and forwards between your main program and the classes. [url]http://www.cplusplus.com/doc/tutorial/classes/[/url] …

Member Avatar for SgtMe
-1
126
Member Avatar for mekhan8

So you'll obvs. have your array "Board[3][3]". And values will be "0" or "1". You want a loop that will reprint the game board. Use 'system("cls");' on Windows to clear the console. Then reprint the board. Each loop, the user should be asked to press a key ("W", "A", "S" …

Member Avatar for SgtMe
0
138
Member Avatar for convoluted

If I were you I would just stick with "time.sleep()". It's probably the easiest way and it's pretty damn accurate. With regards to your opening paragraph: You wouldn't use an infinite loop, because you can't break from an infinite loop because then it would be a finite loop not an …

Member Avatar for convoluted
0
197
Member Avatar for Finki

It's YOUR exam. Not ours. If you show some effort, we can help you, BUT, we won't write it for you.

Member Avatar for woooee
-2
199
Member Avatar for KLane

Please use code tags. (Press the code button before you paste). We need to know more: What are each of the calculations? (I know we can see this in the code, but it's just to check the logic). What do you input? What is the expected output? What is the …

Member Avatar for SgtMe
0
129
Member Avatar for logicslab
Member Avatar for WildBamaBoy

Sweet sprites! It looks fine on my computer. I'm guessing it would be to do with the time it takes to redraw the scene? Have a look into dirty-rectangles and dirty-sprites. These only update the parts of the screen or the sprites that need updating, without redrawing the whole scene. …

Member Avatar for SgtMe
0
2K
Member Avatar for Nathan_12

You would want some kind of input for detecting whether the user wants to go left or right. Consider using a loop to load the images into an array. For example, if you have the following file structure. [CODE] -main.py -Pictures: -pic0.png -pic1.png -pic2.png -pic3.png[/CODE] You could load the images …

Member Avatar for SgtMe
0
205
Member Avatar for Annettest
Member Avatar for SgtMe
0
1K
Member Avatar for altXerror

It is actually pointing to line 49. This is the default new-line at the end of your code. Look at the braces in your main. You have the opener for main, open and close for the while loop, BUT, you don't have the close brace for main. Add another brace …

Member Avatar for SgtMe
0
216
Member Avatar for glenc70
Member Avatar for SgtMe
0
106
Member Avatar for aquario20

We won't do your homework for you. If you get started and write some code, we can point you in the right direction.

Member Avatar for SgtMe
-5
97
Member Avatar for gunbuster363

[B]C++[/B] Allegro (easy): Keep using it until you are confident to move on. OpenGL (intermediate): Can be used for 2D. Don't get frustrated and stick with it. Direct2D (hard): Specially built 2D library, but DirectX is hard to code. [B]Python[/B] PyGame (easy): Same as allegro really. PyOpenGL (intermediate): Use it …

Member Avatar for gunbuster363
0
112
Member Avatar for VasquezPL

Are you getting compiler errors? Runtime errors? Is it that your program logic isn't working properly (ie your not getting the expected output)? Please be more specific and we can help you. Thanks :)

Member Avatar for VasquezPL
0
160
Member Avatar for knan

Well a simple fix would be to multiply everything by 10. Ie: [CODE]import os print float(1+1+1-3)/10 os.system("pause")[/CODE]

Member Avatar for knan
0
202

The End.