• Viernes 28 de Junio de 2024, 07:05

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - Ruben3d

Páginas: 1 ... 11 12 [13] 14 15 ... 30
301
OpenGL / Re: Transladar En Coordenadas Absolutas
« en: Martes 3 de Agosto de 2004, 16:34 »
Hola.

Se me ocurre que podrías hacer algo así.
Código: Text
  1. for (int n=0; n<num_fichas; n++)
  2. {
  3.   glPushMatrix();
  4.  
  5.   // Posición absoluta
  6.   glRotate(...);
  7.   glTranslate(...);
  8.   pintar ficha[n];
  9.   for (int i=0; i<6; i++)  // En el trivial hay 6 quesitos
  10.   {
  11.     if (no tiene el quesito i)
  12.       continue;
  13.  
  14.     glPushMatrix();
  15.  
  16.     // Teniendo en cuenta que el origen es el centro de la ficha
  17.     glRotate(...);
  18.     glTranslate(...);
  19.     pintar quesito[i];
  20.     glPopMatrx();
  21.   }
  22.   glPopMatrix();
  23. }
  24.  

Supongo que la rotación de cada quesito la harás depender de i, para que cada color esté siempre en la misma posición.

Espero que te sirva de ayuda.

Un saludo.

Ruben3d

302
C/C++ / Re: Compilador De C++
« en: Martes 3 de Agosto de 2004, 15:09 »
Hola.

Te desaconsejo usar la versión 6. Salió antes que la especificación final del STL de C++ (si mal no recuerdo, en el 97) y no se ajusta al estándar. Además, tiene varios problemas con templates. Por último, el reciente SDK del summer update de este año de DirectX ya no es soportado oficialmente para VS 6. Te recomiendo encarecidamente el 7.1 (ó puedes probar las betas gratuitas del VS 2005).

Un saludo.

Ruben3d

303
C/C++ / Re: Alguien Sabe Como Transformar ..
« en: Martes 3 de Agosto de 2004, 14:59 »
Usa la función itoa. Aqui tienes un ejemplo:
itoa

Un saludo.

Ruben3d

304
OpenGL / Re: Transladar En Coordenadas Absolutas
« en: Martes 3 de Agosto de 2004, 14:52 »
Hola.

Con la modelview matrix seleccionada, usa glLoadIdentity para devolverla a su estado original, sin ninguna transformación aplicada. También puedes usar glPushMatrix y glPopMatrix para guardar y recuperar la matriz en la pila de matrices (muy útil cuando estás haciendo movimientos jerárquicos, en donde unos objetos se mueven con respecto a otros, como en un sistema solar con satélites en los planetas).

Un saludo.

Ruben3d

305
OpenGL / Re: En Mi Ordenador Falla Assert(......)!
« en: Martes 3 de Agosto de 2004, 14:46 »
¿Qué error da? ¿Salta el ASSERT cuando no debería, o no reconoce la macro?

306
Programación de Videojuegos / Re: Extraer Musica
« en: Martes 3 de Agosto de 2004, 14:42 »
Citar
Felicitaciones.
Muy buen trabajo con tu juego.
¡Gracias!

Citar
¿En que está programado?
En C/C++. Si haces scroll hacia abajo entre los posts verás un enlace al código fuente.

Citar
Pd: No escucho el sonido !
Normal, no hay :D. Antes usaba PlaySound, pero no me permitía múltiples canales. Ahora estoy programando un sistema de audio de múltiples canales para un juego en PocketPC usando las funciones de bajo nivel del API de Win32. Cuando lo acabe tal vez lo integre en este juego.

Un saludo.

Ruben3d

307
Programación de Videojuegos / Re: Extraer Musica
« en: Martes 27 de Julio de 2004, 16:22 »
Hola.

En la gran mayoría de los juegos, los sonidos están empaquetados en agrupaciones de ficheros. Ejemplo de esto son el PAK, PK2, PK3, etc. de los Quake, el GRP de Duke Nukem 3D o el WAD de Doom. También usan este modelo los juegos de Blizzard (Warcraft, Diablo, Starcraft) y muchos otros. Y existen herramientas para extraer los ficheros empaquetados para todos estos juegos (y sus derivados).

El juego que tengo aqui posteado
Juego Asteroides
usa un fichero PAK de Quake para almacenar los gráficos. Puedes descargar su código fuente y ver cómo se hace, o puedes descargar el QPed para editar el PAK.

Un saludo.

Ruben3d

PD: ¿Encriptar los ficheros de audio de un juego? ¿Es de la CIA o algo así?

308
C/C++ / Re: Areas En Un Bmp
« en: Martes 27 de Julio de 2004, 16:04 »
¿A qué te refieres con marcar áreas? ¿Guardar esa área en otro BMP? ¿Pintarla de algún color?

309
C/C++ / Re: Gotoxy(a,b) En Red Hat ...
« en: Martes 27 de Julio de 2004, 13:01 »
Efectivamente, has de usar la ncurses, pues la conio es específica de Borland. Aqui tienes un buen tutorial para aprender a manejarla:
NCURSES Programming How-to

Un saludo.

Ruben3d

310
C/C++ / Re: Ayuda !
« en: Sábado 24 de Julio de 2004, 16:45 »
Usa Sleep, del Platform SDK de Microsoft:

Sleep

The Sleep function suspends the execution of the current thread for the specified interval.

To enter an alertable wait state, use the SleepEx function.
Código: Text
  1. VOID Sleep(
  2.   DWORD dwMilliseconds   // sleep time
  3. );
  4.  
Parameters
dwMilliseconds
[in] Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay.

Return Values
This function does not return a value.

Remarks
A thread can relinquish the remainder of its time slice by calling this function with a sleep time of zero milliseconds.

You have to be careful when using Sleep and code that directly or indirectly creates windows. If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. If you have a thread that uses Sleep with infinite delay, the system will deadlock. Two examples of code that indirectly creates windows are DDE and COM CoInitialize. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than Sleep.

Example Code
For an example, see Using Thread Local Storage.

Requirements
  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Kernel32.lib.

Un saludo.

Ruben3d

311
C/C++ / Re: Consulta
« en: Sábado 24 de Julio de 2004, 16:37 »
¿La pregunta es que quieres saber qué funciones proporciona system.h?

312
C/C++ / Re: Como Guardar Datos En Un Txt En Turbo C
« en: Sábado 24 de Julio de 2004, 16:35 »
El XML está muy bien cuando el tamaño no importa, pero si se está en una situación de espacio limitado se convierte en un problema, porque su representación en ASCII ocupa bastante más que un fichero binario (no quiero pensar en cómo sería un fichero 3DS grande en formato XML).

Un saludo.

Ruben3d

313
C/C++ / Re: Ayuda !
« en: Sábado 24 de Julio de 2004, 13:19 »
Hola.

Las funciones que has mencionado son específicas de Borland y no forman parte del estándar, por lo que es de esperar que en los compiladores que no sean de esta compañía no estén. De todas formas, con Dev-C++ viene una implementación reducida de la conio.h. Mira en el directorio include.

Un saludo.

Ruben3d

314
La taberna del BIT / F3ll0wsh1p Of Teh R1ng
« en: Sábado 24 de Julio de 2004, 01:29 »
Hola.

Hace algún tiempo me encontré este texto en un foro en inglés (no recuerdo dónde). Se trata de la primera película del Señor de los Anillos narrada como si fuera una partida multijugador. Me reí bastante, pero eso ya depende del sentido del humor y los gustos de cada uno :lol: . Bueno, aqui lo dejo.

Citar
[At Bilbo's 111th Birthday]
Merry: "Omg, I pwn"
Pippin: "Sif, I pwn"
**Rocket goes off
Gandalf: "Pwned!"

Bilbo: "This = shiz, bai foos"
Bilbo has left the server
Frodo: "***!?"

[later, in Bag End]
Gandalf: "Give teh ringz0r to Frodo"
Bilbo: "Sif! It r precious!"
Gandalf: "STFU NOOB!!!"
Bilbo: "ok"
Gandalf has logged on as admin
Bilbo has been kicked from The Shire

**Later
Gandalf: "Show me teh ring, foo!"
**Gandalf rides out, does some research, comes back
Gandalf: "OMGZ, it R teh ring!"
Frodo: "***?"
Gandalf has logged on as admin
Frodo has been kicked from The Shire
Sam has been kicked from The Shire

[At Isengard]
Gandalf: "sup dawg, i r g4nd4lf da gr3y!"
Saruman: "Foo! U R teh noob!"
Gandalf: "***?!"
Saruman: "Sauron pwns joo!"
Gandalf: "Sif, I R leet"
**Sarumon beats the **** out of Gandalf
Saruman: "Pwned!"

[on the road to Bree]
Merry: "look foos, shrooms!"
Pippin: "Woot! Shrooms!"
Frodo: "Ph34r!"
Sam: "Shrooms!"
Frodo: "PH34R!1!1"
**black rider stops, sniffs, goes past
Frodo: "OMG, packetloss!"

[Bree, in the Inn of the Prancing Pony]
**Frodo is drinking and dancing on a table, then slips
Frodo has left the server
Frodo has connected to the server
Frodo: "OMGz, dc'd"
Aragorn: "OMG, noobz"

[at Weathertop]
Merry: "Mmm, shrooms!"
**MERRY IS BROADCASTING HIS IP ADDRESS!!!
Frodo: "Foos! Ph34r teh haxorz"

**the black riders attack
Merry: "OMG!!!"
Sam: "O.M.G!!!11"
Pippin: "***"
Frodo has left the server
**head nazgul stabs Frodo's ghost
Frodo has connected to the server
Frodo: "***... hax!"
**Aragorn lraps into the fray with a flaming brand
Aragorn: "PH34r!!!!!!"
Merry: "LOLOL flamed! "

[on the road to Rivendell]
Aragorn: "ZOMG!Arwen!"
**Arwen rides up
Aragorn: "A/S/L? Wanna net secks?"
Arwen: "Sif! *** is up with Frodo?"
Sam: "teh leet Hax0r "
Arwen: "Firewall?"

**Arwen rides off with Frodo, the nazgul give chase. Arwen crosses the ford at Rivendell.
Arwen: "PH34R!! My dad pwns urs!"
**nazgul start to cross
Arwen: "LOLOLOLO noobs!!1!"
**the ford rises up and washes the nazgul away
Warning: Connection Problems Detected
nazgul has disconnected
nazgul has disconnected
nazgul has disconnected
nazgul has disconnected
nazgul has disconnected
nazgul has disconnected
nazgul has disconnected
Arwen: "Pwnt"

[at the Council of Elrond]
Gimli: "dwarves pwn!"
Legolas: "Sif, Elves pwn!"
Boromir: "OLOLOL noobs, men pwn!"
Elrond: "STFU tards!!1!"
**Frodo puts the ring on the plinth
Gimili: "Sif ring pwns all!"
**Gimli swings his axe at it, which shatters
Elrond: "**sigh, noob"

[Frodo meets up with Bilbo]
Bilbo: "OLOL, me = 10th level thief!"
Frodo: "OMG, u r teh pwn!"
Bilbo: "Do u still have teh ringz0r?"
**Frodo shows Bilbo the One Ring
Bilbo: "OMG u tard, I want to TK you!"
Frodo: "sif!"
Bilbo: "ph34r my mithril"

[The Fellowship leaves Rivendell]
**Gandalf leads the fellowship through the mountains
Legolas: "ZOMG, leet gfx!"
Gimli: "I R dropping frames! FFS"
**There's an avalanche which threatens to knock them off the shelf
Gimli: "Gandalf, teh draw distance is too far!1!!1"
Gandalf: "**Sigh. Moria?"
Gimli votes to change map to Moria
Votes 4 of 4 required
Legolas: "lolol Gimli, time to upgrade!"

[The fellowship approaches the gates of Moria]
Gandalf: "FFS, its too hard! Anyone got a walkthrough?"
**The gates of Mordor open, but the Guardian attacks!
Frodo: "OMG! ph34r!"
Boromir: "GL HF"
Aragorn [broadsword] guardian
Legolas [arrow] guardian
Gandalf: "gg"

[The fellowship enters the mines of Moria]
Gimli: "OMG!!!! PWNED!"

**After travelling some time in the dark the Fellowship come to a chamber with a large well
Gandalf: "teh bookz0r has some clues!"
**Merry knocks a skeleton in armour down the well
Gandalf: "OMG! noob!"
Merry: "d'oh"
**The fellowship hears the ork drums
Boromir: "***?"
Aragorn: "***?"
Frodo: "..."
Gandalf: "Oh ffs >.<"
**the fellowhip shores up the doors as the orks come
Boromir: "TEAMS FFS!"
Aragorn [broadsword] ork
Gimli [axe] ork
Legolas [arrow] ork
Aragorn [broadsword] ork
Aragorn [broadsword] ork
Boromir [broadsword] ork
Gimli [axe] ork
Gimli [axe] ork
ork: "OMG! h4x!"
Gimli: "pwned"!
Legolas [arrow] ork
Legolas [arrow] ork
Legolas: "lol!!"
Boromir [broadsword] ork
Gimli [axe] ork
Gimli: "Foos!"
Legolas [arrow] ork
ork: "ffs, wallhax!"
**The cavetroll enters the chambers destroying the doors
Gandalf: "Oh ffs!"
Boromir: "Omg, its teh boss!"
Aragorn: "Sif noob, we're not at teh end yet!"
**Cavetroll slams Boromir and Aragorn out of the way, and then skewers Frodo
Sam: "OMG!"
Gandalf: "OMG!"
Aragorn: "omg, pwn!"
**Legolas jumps on the cavetroll and shoots arrows down into its head
Legolas [arrow] cavetroll
Ork: "OMG! PWNED!"
Gimli: "LOLOOLOL! noobs"
**The fellowship then runs through Moria, chased the whole way by a horde of orks
Boromir: "FFS! Teams, foos!"
**A flaming shadow starts to follow them, and the orks withdraw
Aragorn: "Now THIS is teh boss!"
Gandalf: "OMG!"
**The fellowship take to long flights of stairs that are starting to crumble and fall. Orks shoot at them with arrows.
Legolas: "LOL, noobs. Chex0r this out!1!"
Legolas [arrow] ork
Legolas [arrow] ork
ork: "AIMBOT!"
ork: "turn it off!"
Legolas: "lolol!"
**The fellowship crosses a bridge, Gandalf stops to confront the balrog
Gandalf: "joo shall not pass!"
Balrog: "***?"
Gandalf: "JOO SHALL NOT PASS!"
Balrog: "Sif, noob"
**Gandalf strikes the bridge with his staff, cracking it and causing it to break under the Balrog's weight
Balrog: "ZOMG! PWNED!"
Frodo: "OMG! Gandalf!"
**The Balrog falls and in a last act of defiance strikes out with its whip, entangling Gandalf
Gandalf: "D'oh"
Frodo: "OMG, joo foo!"
Gandalf: "fly u foos, fly!"
**Gandalf lets go and follows the Balrog into the crevass
Gandalf has left the server
Balrog has disconnected

[After escaping Moria the fellowship finds itself in Loth Lorien]
**The fellowship rests, and in the night Frodo speaks with Galadriel
Galadriel: "For a noob, u r teh leet!"
Frodo: "Sif. I don't want teh ringz0r. Do u want teh ringz0r?"
Galadriel: "******! SIF I want teh ringz0r. I have enough h4x of my own!1"

[The fellowship leaves Loth Lorien and sets out via river]
Saurman: "ph34r my army of uruk hai! Go outz0r, find teh hobbitz and pwnz0r them!"
uruk hai: "leet!"

[stopping at the banks of the river, the Fellowship sets up camp]
**Frodo goes off looking for firewood, Boromir follows and confronts him
Boromir: "Gimmie teh ringz0r so ** hax can fight teh boss!"
Frodo: "Sif, foo. Punkbuster will pwn joo!"
Boromir: "Naw, we play on non-pb servers"
Frodo: "STFU noob"
Frodo has left the server
Boromir: "***! FRODO! Bring teh ringz0r back, faghat!"

**A group of Uruk Hai encounter Boromir
Boromir: "OH FFS, TEAMS!!"
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Uruk Hai [arrow] Boromir
Boromir: "****ing campers"
**Aragorn comes across the battle
Aragorn: "Boromir joo noob! ***!"
Uruk Hai: "Hah, pwn!"
Aragorn [broadsword] Uruk Hai
Aragorn: "I bring joo teh pwn!"
**Aragorn goes to Boromir
Boromir: "Damn lag!"
Warning: Connection problems detected
Boromir has disconnected
Aragorn: "FFS!"

[Frodo returns to the bank of the river where he gets into a boat. Sam 'sees' him]
Sam: "Frodo! ***! Invisibility h4x!"
Frodo has connected to the server
Frodo: "Sam, STFU and FOAD!"
Sam: "Sif!"
Frodo: "Oh, ffs n00b!"

3Nd!!!!11
:P

Un saludo.

Ruben3d

PD: Si alguien me dice a qué se refieren con 'pwn' le estaría muy agradecido. :hola:

editado: El original está aqui http://www.hohto.to/forums/index.php?board...;threadid=17720

315
Programación de Videojuegos / Re: Cada Vez Mas Confundido
« en: Sábado 24 de Julio de 2004, 01:20 »
Lo que ha dicho Geo, pero desde la web de OpenGL
Citar
If you are a software or applications developer, you do not need to license OpenGL. Generally, hardware vendors that are creating binaries to ship with their hardware, or software developers that write an OpenGL driver, are the only developers that need to have a license. If an application developer wants to use the OpenGL API, the developer needs to obtain copies of a linkable OpenGL library for a particular hardware device or machine. Those OpenGL libraries may be bundled with the development and/or run-time options or may be purchased from a third-party software vendor without licensing the source code or use of the OpenGL trademark.

Un saludo.

Ruben3d

316
Programación de Videojuegos / Re: Cmasmario
« en: Sábado 24 de Julio de 2004, 01:16 »
Hola.

Está bastante chulo (aunque la trayectoria del salto es un tanto curiosa). Lo mejor es esto :P :
Citar
deja los txt como estan no te hagas el genio de la programacion diciendo que lo hiciste vos porque no ganas nada y aparte SE VA A CERRAR HOTMAIL SI LO HACES.
:lol:

Un saludo.

Ruben3d

317
C/C++ / Re: Punteros En C
« en: Sábado 24 de Julio de 2004, 00:06 »
Ranma no está usando C++, está usando C.

318
Programación de Videojuegos / Re: Descargar Discreet Inferno Y Flame
« en: Viernes 23 de Julio de 2004, 01:33 »
Inferno
En el menú de arriba a la izquierda selecciona Arrange a Demo.

Flame
Lo mismo que el anterior, selecciona Arrange a Demo.

Un saludo.

Ruben3d

319
OpenGL / Re: Problema Al Mezclar Texturas Y Figuras Con Colores
« en: Miércoles 21 de Julio de 2004, 15:07 »
Hola.

Asegurate de que pintas los elementos sin textura con la texturización apagada, usando glDisable. Y enciendela antes de pintar los elementos con textura con glEnable.

Un saludo.

Ruben3d

320
ASP .NET / Re: El Servidor No Interpreta Asp.net
« en: Miércoles 21 de Julio de 2004, 00:47 »
Bueno, encontré la solución. Según parece, al haber instalado el IIS después del ASP .NET no tenía registrado este último (y no se arreglaba actualizando :(). Por suerte, he encontrado este post en los foros de ASP.NET:

Citar
HOWTO: Make ASP.Net Render Server Controls
Posted: 16 May 2004 11:13 PM
Symptoms:
Server control tags are shown in browser rather than the controls. This means that ASP.Net is not properly registered with IIS.

Solution:
These steps must be followed on the server computer:

Start>Run>cmd
cd %windir%\microsoft.net\framework\v1.0.3705 [press enter]
aspnet_regiis -i [press enter]

If the v1.0.3705 directory does not exist, do this:

Start>Run>cmd
cd %windir%\microsoft.net\framework\v1.1.4322 [press enter]
aspnet_regiis -i [press enter]

If the v1.1.4322 directory does not exist as well, follow this link to download asp.net to your computer:
http://www.microsoft.com/downloads/details...&displaylang=en
 

--------------------------------------------------------------------------------
--Brian Desmond
Windows Server MVP
desmondb@payton.cps.k12.il.us
http://www.wpcp.org/

Un saludo.

Ruben3d

321
ASP .NET / El Servidor No Interpreta Asp.net
« en: Martes 20 de Julio de 2004, 22:20 »
Hola.

Estoy empezando con ASP.NET usando Web Matrix y tengo el problema de que cuando uso como servidor el IIS 5.1 no ejecuta el archivo aspx y lo envia tal cual al cliente (que lo interpreta como si fuese un HTML normal). Si uso el servidor local que trae integrado todo funciona bien (pero la gente no puede acceder desde fuera).

He probado también con el VS.NET en vez del Web Matrix y ocurre lo mismo con el IIS.

He leido que puede ser debido a que he instalado el IIS después del .NET Framework, aunque he ejecutado la reparación de éste último y todo sigue igual.

¿A alguien se le ocurre por qué el IIS se niega a funcionar bien con .NET?

Muchas gracias.

Ruben3d

PD: Para más datos, estoy ejecutando todo en Windows XP Professional. El VS.NET es el 2002, el .NET Framework es el 1.0 y el Web Matrix es el 0.6.812.0, a parte del IIS que es el 5.1.

322
C/C++ / Re: Alguien Sabe Algo De Integrales???
« en: Martes 20 de Julio de 2004, 17:53 »
Hola.

Lo que tienes que hacer entonces es aprender a resolver integrales. Aqui tienes un link dedicado a matemáticas, donde figuran las integrales, entre otras cosas:
Las matemáticas de Mario

Un saludo.

Ruben3d

323
Visual C++ / Re: Como Acceder A Una Función Pública De Otra Clase
« en: Lunes 19 de Julio de 2004, 23:26 »
Citar
mas bien yo creo que son funciones amigas
Y otro que le da por lo mismo. Estamos hablando de métodos públicos y de no instanciar una clase. En eso nada pinta la palabra reservada friend.

Un saludo.

Ruben3d

324
Publicaciones y e-books / Re: El Arte de Programar
« en: Lunes 19 de Julio de 2004, 20:37 »
Citar
Desarrollador 5 Estrellas
No lo conocía. Muchas gracias!

Citar
y te paso un avance para que lo revises y me des tu valiosa opinión.
Genial. No tengo ni idea de PHP, así que si aprendo con tu libro quiere decir que es bueno :D

Un saludo.

Ruben3d

325
C/C++ / Re: Punteros Y Memoria
« en: Lunes 19 de Julio de 2004, 20:28 »
Código: Text
  1. unsigned short int segmento, offset;
  2. void *puntero = (segmento &#60;&#60; 4) + offset;
  3.  

De esta manera consigues la dirección absoluta, aunque en Windows XP debería producirte un error de protección de memoria.

Un saludo.

Ruben3d

Páginas: 1 ... 11 12 [13] 14 15 ... 30