Jump to content

  • Log In with Google      Sign In   
  • Create Account


shawk08033

Member Since 16 Jul 2012
Offline Last Active May 28 2014 05:39 PM
-----

Posts I've Made

In Topic: Read text as a map in c++

20 January 2014 - 06:04 PM

MapSprite[x] = UsedSprite[n] will always be setting MapSprite[x] to point to UsedSprite[0] or UsedSprite[1]. UsedSprite[0]'s last update was 192,320. UsedSprite[1]'s last update was 256, 384.

You can see step-by-step what is happening by changing "spritelog << n << "Loading into " << x << " at " << i*64 << "," << y*64 << std::endl;" to

"for (int t = 0; t < x; t++) spritelog << n << "Currently in " << t << " is " << MapSprite[t]->X << "," << MapSprite[t]->Y << std::endl;"

 

Minor quibble: You probably shouldn't call Load() from a ctor, but should use an Init() or such. Very bad practice to do disk I/O in a constructor.

So the output it gives me when I do that is:

Sprites are loaded
1Currently in 0 is 0,0
0Currently in 0 is 128,0
0Currently in 1 is 64,0
0Currently in 0 is 192,0
0Currently in 1 is 64,0
0Currently in 2 is 192,0
1Currently in 0 is 192,0
1Currently in 1 is 256,0
1Currently in 2 is 192,0
1Currently in 3 is 192,0
1Currently in 0 is 192,0
1Currently in 1 is 0,64
1Currently in 2 is 192,0
1Currently in 3 is 192,0
1Currently in 4 is 0,64
0Currently in 0 is 64,64
0Currently in 1 is 0,64
0Currently in 2 is 64,64
0Currently in 3 is 64,64
0Currently in 4 is 0,64
0Currently in 5 is 0,64
0Currently in 0 is 128,64
0Currently in 1 is 0,64
0Currently in 2 is 128,64
0Currently in 3 is 128,64
0Currently in 4 is 0,64
0Currently in 5 is 0,64
0Currently in 6 is 128,64
0Currently in 0 is 192,64
0Currently in 1 is 0,64
0Currently in 2 is 192,64
0Currently in 3 is 192,64
0Currently in 4 is 0,64
0Currently in 5 is 0,64
0Currently in 6 is 192,64
0Currently in 7 is 192,64
1Currently in 0 is 192,64
1Currently in 1 is 256,64
1Currently in 2 is 192,64
1Currently in 3 is 192,64
1Currently in 4 is 256,64
1Currently in 5 is 256,64
1Currently in 6 is 192,64
1Currently in 7 is 192,64
1Currently in 8 is 192,64
1Currently in 0 is 192,64
1Currently in 1 is 0,128
1Currently in 2 is 192,64
1Currently in 3 is 192,64
1Currently in 4 is 0,128
1Currently in 5 is 0,128
1Currently in 6 is 192,64
1Currently in 7 is 192,64
1Currently in 8 is 192,64
1Currently in 9 is 0,128
1Currently in 0 is 192,64
1Currently in 1 is 64,128
1Currently in 2 is 192,64
1Currently in 3 is 192,64
1Currently in 4 is 64,128
1Currently in 5 is 64,128
1Currently in 6 is 192,64
1Currently in 7 is 192,64
1Currently in 8 is 192,64
1Currently in 9 is 64,128
1Currently in 10 is 64,128
1Currently in 0 is 192,64
1Currently in 1 is 128,128
1Currently in 2 is 192,64
1Currently in 3 is 192,64
1Currently in 4 is 128,128
1Currently in 5 is 128,128
1Currently in 6 is 192,64
1Currently in 7 is 192,64
1Currently in 8 is 192,64
1Currently in 9 is 128,128
1Currently in 10 is 128,128
1Currently in 11 is 128,128
1Currently in 0 is 192,64
1Currently in 1 is 192,128
1Currently in 2 is 192,64
1Currently in 3 is 192,64
1Currently in 4 is 192,128
1Currently in 5 is 192,128
1Currently in 6 is 192,64
1Currently in 7 is 192,64
1Currently in 8 is 192,64
1Currently in 9 is 192,128
1Currently in 10 is 192,128
1Currently in 11 is 192,128
1Currently in 12 is 192,128
1Currently in 0 is 192,64
1Currently in 1 is 256,128
1Currently in 2 is 192,64
1Currently in 3 is 192,64
1Currently in 4 is 256,128
1Currently in 5 is 256,128
1Currently in 6 is 192,64
1Currently in 7 is 192,64
1Currently in 8 is 192,64
1Currently in 9 is 256,128
1Currently in 10 is 256,128
1Currently in 11 is 256,128
1Currently in 12 is 256,128
1Currently in 13 is 256,128
0Currently in 0 is 0,192
0Currently in 1 is 256,128
0Currently in 2 is 0,192
0Currently in 3 is 0,192
0Currently in 4 is 256,128
0Currently in 5 is 256,128
0Currently in 6 is 0,192
0Currently in 7 is 0,192
0Currently in 8 is 0,192
0Currently in 9 is 256,128
0Currently in 10 is 256,128
0Currently in 11 is 256,128
0Currently in 12 is 256,128
0Currently in 13 is 256,128
0Currently in 14 is 256,128
0Currently in 0 is 64,192
0Currently in 1 is 256,128
0Currently in 2 is 64,192
0Currently in 3 is 64,192
0Currently in 4 is 256,128
0Currently in 5 is 256,128
0Currently in 6 is 64,192
0Currently in 7 is 64,192
0Currently in 8 is 64,192
0Currently in 9 is 256,128
0Currently in 10 is 256,128
0Currently in 11 is 256,128
0Currently in 12 is 256,128
0Currently in 13 is 256,128
0Currently in 14 is 256,128
0Currently in 15 is 64,192
0Currently in 0 is 128,192
0Currently in 1 is 256,128
0Currently in 2 is 128,192
0Currently in 3 is 128,192
0Currently in 4 is 256,128
0Currently in 5 is 256,128
0Currently in 6 is 128,192
0Currently in 7 is 128,192
0Currently in 8 is 128,192
0Currently in 9 is 256,128
0Currently in 10 is 256,128
0Currently in 11 is 256,128
0Currently in 12 is 256,128
0Currently in 13 is 256,128
0Currently in 14 is 256,128
0Currently in 15 is 128,192
0Currently in 16 is 128,192
0Currently in 0 is 192,192
0Currently in 1 is 256,128
0Currently in 2 is 192,192
0Currently in 3 is 192,192
0Currently in 4 is 256,128
0Currently in 5 is 256,128
0Currently in 6 is 192,192
0Currently in 7 is 192,192
0Currently in 8 is 192,192
0Currently in 9 is 256,128
0Currently in 10 is 256,128
0Currently in 11 is 256,128
0Currently in 12 is 256,128
0Currently in 13 is 256,128
0Currently in 14 is 256,128
0Currently in 15 is 192,192
0Currently in 16 is 192,192
0Currently in 17 is 192,192
0Currently in 0 is 256,192
0Currently in 1 is 256,128
0Currently in 2 is 256,192
0Currently in 3 is 256,192
0Currently in 4 is 256,128
0Currently in 5 is 256,128
0Currently in 6 is 256,192
0Currently in 7 is 256,192
0Currently in 8 is 256,192
0Currently in 9 is 256,128
0Currently in 10 is 256,128
0Currently in 11 is 256,128
0Currently in 12 is 256,128
0Currently in 13 is 256,128
0Currently in 14 is 256,128
0Currently in 15 is 256,192
0Currently in 16 is 256,192
0Currently in 17 is 256,192
0Currently in 18 is 256,192
what does this mean?

In Topic: Making an optimized 3d mmo in open gl c++

05 April 2013 - 05:47 PM

I have been told about how hard mmo are but right I am just trying to make a demo because I have a friend who owns a marketing firm whos interested in the game. Right now i am just creating simple code structure so I can show off the concept.  


In Topic: Making an optimized 3d mmo in open gl c++

04 April 2013 - 06:45 PM

I don't consider myself a beginner, I have over 3 years of c++, c# and game programming behind me but I have not programmed a game with optimized graphics.


In Topic: Making an optimized 3d mmo in open gl c++

04 April 2013 - 06:01 PM

Is Direct x portable to mac??


In Topic: Representing player classes in c++

21 September 2012 - 02:37 PM

I have a player class like in c++ class i need a player class like witch or warrior
[source lang="cpp"]#ifndef PLAYER_H#define PLAYER_H#include "gameobject.h"#include "gameobject_component.h"#include <QString>class Player : public GameObject{ public: Player(QString name, int maxlevel, PlayerClass classtype); Player(QString name, int level, int xp, int maxlevel, PlayerClass classtype); void Update(); void Checklevel(); void Attack(); virtual ~Player(); bool isactive; int Level; int Maxlevel; int Xp; float Money; QString Name; float Mana; float Maxmana; float Health; float Maxhealth; float Speed; float Strenght; float Intelect; float Hitrate; GameObject backpack[30]; GameObject_Component Componets[100]; protected: private:};#endif // PLAYER_H[/source]

PARTNERS