Jump to content

  • Log In with Google      Sign In   
  • Create Account


AltarofScience

Member Since 15 Oct 2011
Offline Last Active Sep 02 2014 09:46 PM

#4974001 Customizable GUI's Using HTML/CSS

Posted by AltarofScience on 28 August 2012 - 12:53 AM

As you may or may not know I have forked the Glest Advanced Engine to work on a somewhat unorthodox RTS-like game. The game is, due to being a Glest fork, open source and designed to be easily modded. I don't necessarily expect my game to be widely modded, but the engine will be used for 7 games of fairly different types, although all RTS-like. For these reasons I want to have a GUI that is easily modified in all aspects.

This engine uses C++.

I was wondering if their are any good libraries, which are open source, that allow for HTML4-5/CSS3 files to be used to modify the GUI. Over at 0 A.D. they talked about stuff like Webkit and Awesomium and Berkelium, but I was wondering if people who are more expert in game programming and design could think of any more or better options. Awesomium is no longer open source I believe.

I basically want to have easily moddable styles for panels/menus/buttons and also Civpedia style manual type stuff.


#4959137 Embarking on the big one.

Posted by AltarofScience on 14 July 2012 - 03:34 PM

He said design is easy, he didn't say good design is easy. In a sense programming is not the hard part. Assuming you don't want AAA speed optimizations.

However programming is the tedious part. You have a big complex game with lots of interconnecting parts and that is why you spend months weeding out tiny little logic errors that make your game totally unplayable.

The reason design is easy is that its FUN. Game design, especially when you discuss it with other like minded people, is just fun. Not balancing, which is arguably not game design, but deciding on features and mechanics. Just like the idea for a novel is fun, but do you think actually writing a novel is fun? No. No one will ever, ever, ever write your novel unless you pay them a lot of money, even if your idea appears to be really good. Unless you are James Patterson. Can't remember the last time he wrote his own novels.

Do a thought experiment:
If you could just type your idea into a text document and have a computer make it, would you?
If you could just drop a list of objects and a theme and mood and get a fabulous art library, would you?
If you could click a button that is called make up an idea, and then you had to program and model to make that idea a reality, would you?

That's why game design is the easy part. You do game design because its fun, you do programming and modeling because you have to to make a game.
Sure I really enjoy certain aspects of programming. I like writing some C++ and seeing something happen on a screen. But a lot of the time its just tedious typing, even if I know what I want to write in C++, the actual typing of it is not fun.

A billion people have game ideas. How many of them make a game? Someone who has a CS degree has probably made some pretty serious software.


#4956597 Dedicating my whole life to creating my dream game. Going to college

Posted by AltarofScience on 07 July 2012 - 02:31 AM

Consider the possibility that the link is actually spam, and not really a lifestyle the OP has espoused. Consider also the wackiness level of dedicating one's whole life to one game idea.
What I'm saying is, let's maintain a healthy skeptical frame of mind as regards this topic, and wait to see when the OP comes back and what else he has to say.


That is pretty offensive. In a sense I am dedicating at least the next decade, if not my whole life to one game idea. I used to post here and mmorpg.com quite a lot about an MMO design.

Currently I am creating a series of 7 RTS games that are genre hybrids include significant aspects of other genres in order to get close to the way said mechanics would work in my mmorpg idea. Each game explores a different part of my MMO idea. I am currently on the first one which explores the more general idea of the game and its design philosophy. Others explore crafting, magic, construction and so forth.

As to how that relates to your post, I know myself to be a person who is intensely focused on essentially a single game design/idea. So I think its pretty insensitive to call this person's post wacky. Its possible that he will end up not creating that game, but its also perfectly possible that he would spend many years on it and finish it.

Spiro goes even further in calling another person's life choice idiotic. Being so rude is not necessary.

This person's post was clearly a good choice because he learned important things like that he should probably pursue a more general CS degree and live a bit healthier. And this was all done without asserting that he was wacky, and its clearly meant to be read as stupid in this context, or the more blatant idiotic from spiro.


#4934759 Non Standard RTS Model

Posted by AltarofScience on 25 April 2012 - 08:27 AM

In the interests of reducing unnecessary complexity as well as file size I have decided it would be a better idea to implement custom levels based on number of kills instead of morphs. So each basic unit has 3 morphs but gains more skill in that area through having kills as opposed to the player having to morph them each time. I am currently deciding on the number of levels to implement. Definitely no more than 20.


#4934433 Starting a team as a Game Designer?

Posted by AltarofScience on 24 April 2012 - 07:47 AM

You cannot prove your worth as a designer without having produced a product. Just like programmers or artists. Yet as a designer how can you prove your worth if you need to prove it before anyone hires you, but you can't prove it because no one will hire you?

The answer is to do something else in games, like programming or art, and then make suggestions to your project lead and other members, and then they say hey, you have a great idea, assuming you actually do, and then the next suggestion you make gets more weight. And you have to keep pushing that cycle till you can get a quality portfolio of stuff you helped design, and then you can get a lead design job.

Alternatively you can make games in simple formats to showcase design talent. Modding, flash games, 2d games, board games and so forth.

So if your question is how you can prove design skills without any programming or art skills, the answer is that you really can't. And there is no such thing as a freelance game designer either.

Although you could hire people with your own money. Then they are employees and will do what you say so long as you pay their salary.


#4934179 Starting a team as a Game Designer?

Posted by AltarofScience on 23 April 2012 - 11:55 AM

My current project is a very complex mod for GlestAE, yet the only requirement is some knowledge of XML. Or rather its more efficient to copy paste the xml and change what is inside the tags rather than writing your own tags. To make a scenario you need some Lua scripting, but that isn't a big deal. I use GAE because I ca already program and thus can handle Lua easily and because xml is basically html so that is also easy.

If you do not want to work with either XML or Lua and you have the money to burn, you can make plenty of design stuff inside of StarCraft2 although SC2 doesn't allow you to distribute the game free like GAE does.

Be warned though, the chance of you forming a team based on a SC2 demo is quite small. In the first place you would have to create your own RTS engine because you can't actually sell an SC2 mod and that takes quite a long time.

Really though the chance of being a pure designer is miniscule. I can't think of even 10 good examples off the top of my head. And as many have stated, most game programmers are in it to make games, probably their own games that they got into programming to make. Artists are somewhat similar. But artists can make art without making a game and can also come easily from non game fields.


#4930405 Spell Systems with Depth

Posted by AltarofScience on 11 April 2012 - 05:17 PM

I am not sure how much energy you should draw from nature. I do know some magic systems, ala the Name of the Wind where you have to draw power from a source like that. I dunno. Depends on the limits of that system I guess?

In my game I am creating a complex spell system. The grammar is a little different. You have this:

Base word, standard mana cost, damage type, damage
Type word, projectile, touch, target
Effect word, single target, aoe, multiple target
Mana word, modifies mana cost

Various other modifiers. You can mix damage types and various other things to make new damage types.

So in that it is a player created spell system with a grammar its relatively similar.

I was also thinking of ways to summon minions, maybe bind, or mind control some minions also. I REALLY love minion master style gameplay.

I think that interesting magic systems are totally underrepresented in RPGs, especially MMORPGs.


#4930297 Outside the box - different professions that would work within an MMO

Posted by AltarofScience on 11 April 2012 - 10:41 AM


I was thinking about getting some more sciencey stuff in games. Like using simplified organic chemistry to implement poisons and acids.

This!

Now expand a profession out of it in such a way that you think a player might enjoy that profession for inordinately long periods of time inside an MMO where they might also raid, pvp etc. i.e. create a functional profession that is enticing to the player, useful in the larger aspect of an MMO (genre is irrelevant). Be creative. You might reference back to Jefffereytitans posts and my responses with regards one way that might be handled.

The teacher one as you go through the posts has probably evolved into a secondary i.e. common to all players, type of profession which to be honest was a result of your initial post.


Okay thats a little more clear. You are more concerned about new mechanics rather than professions. An if I add this mechanic what possible things can it be used for.

The orgo chem thing is a subset of alchemy. Basically creatures have various body chemistry with stuff in their blood and cells and some chemicals can react. So you try to find a way to do that. Typical stuff like cyanide blocking cell respiration. So you could maybe test or sample blood and then try to find a chemical which can mess with their chemistry. Also some animals may have magic energy in their system and it may nullify poison so maybe you get some Otataral style dust to counteract that and let your poison work. Conversely something might be killed merely by applying the anti magic dust if its critical to life systems.

You may also make antidotes and such this way. Further you could create potions that improve health and growth and nutrition, say you were a breeder and wanted to raise new plants or animals.


I actually did design a really complex magic system with interactions with crafting and enchanting that was quite unique compared to what I've seen discussed or implemented. but I think I have taken up enough posts here. I want to see what other people have come up with.


#4930245 Outside the box - different professions that would work within an MMO

Posted by AltarofScience on 11 April 2012 - 07:56 AM


Strange thing though, when you finish that last level, there is nothing left but those professions. Maybe it is something that people didn't think of -- why reroll a character, if you can retain your killer face-eating orc and make him pursue a degree in artistic smithing. There would be a lot of new content, and his (the player's) level would only help to ward off the monsters -- he would finally have time to entangle himself in a proper story-line. No rush or competition, just a journey of discovery.


And thus you unravel the purpose of this entire thread -- creating meaningful time-sinks outside the straightforward "level up and then do end-game at which point sit around bored or leave until new content"

Your virtual cookie now contains a fortune Posted Image


The issue with being stuck doing nothing is that in themeparks you are limited by how fast the dev team can make a new expansion and then raise the level cap and add new items to craft. In a sandbox with no level cap, item decay and so forth its much easier. If there is no dev defined story you don't have to wait for new chapters. Imagine a George RR Martin style 6 year wait for the next installment of story. Blargh!


#4930244 Outside the box - different professions that would work within an MMO

Posted by AltarofScience on 11 April 2012 - 07:54 AM

Well I haven't posted here about my game much but in this case I have some on topic stuff to discuss.

I am a big fan of VOWs which are a subset of mmorpgs. Virtual Online Worlds. You could stick MM on the front and/or RPG on the back but its a lot of letters so assume its implied.

In any case I have been working on a purely PvE game where ideally players would spend 40% or less of their game time in combat. Ie 60% on organizing, crafting, building and so forth.

As part of this I created some complex travel, building and crafting systems, with minigames, although for a cut in effect you can skip them. This applies to climbing, sailing, flying ships, directing vehicles, land air or sea mounts, special travel systems and magic as well as crafting.

Basically players can learn any skills they want but skills can be trained infinitely, although with diminishing returns.
Professions don't really exist, you can effectively play out your own profession with any goal by picking skills that are good for it.

For instance an airship player could learn the airship minigame, learn windreading, weather predicting, maybe some mechanics for repairs, although you could have another player on your crew be a pure mechanic? You could be a player who is a crafter but only crafts specialized airships parts.

You could be a pioneer. Maybe you have high climbing skills, good rope and wood crafting, so you could climb canyons and make bridges, and the game pretty much allows you to pursue just that career. You will probably want to do other things too though.

Basically if you allow the player freedom to do as they please it makes it more interesting. Infinite skill systems might seem overpower but consider that if you were a top tier warrior an half decent player could buy an airship and kill you and you couldn't hit them. Similarly you could craft the best airships in the world but a half decent air ship player could also have combat skills and all you could do was run.

I noticed you talked about teaching. The system I have has some sorts of teaching although its not explicit. For instance if you are climbing a mountain you pick your best climber to be the lead climber and that gives you a temporary boost to climbing skills, a % of the difference between his skill and yours, allowing you to tackle more difficult slopes. Further your climbing skills gets a bonus to its growth in this circumstance. Similarly if you craft in an area with lots of other crafters and/or crafters who are better than you you get boosts to skill gain and maybe to project results.

I was thinking about having some sort of teaching system that is more explicit though. Maybe just an addon to the social bonuses. Like if you simply watch a master craft, or he crafts an example and you craft your own attempt at the same design, you get an increase to skill growth compared to if you had crafted alone. Similarly he gets a small boost because he has to think and focus and explain what he is doing and how. Obviously you don't literally explain it because games can't process that, but you could roleplay that if you wanted. So each of you is being benefited by this as opposed to both crafting alone. You could also be paying for him to teach or be an apprentice and handle prep and gathering and then observe him working on a commission from another player.

As I said most of the actual effects of this would be an area scan for other crafters and for people building the same items and then a % bonus to experience. But you could roleplay it as more realistic.


#4929381 What do you think about Turn based combat?

Posted by AltarofScience on 08 April 2012 - 01:51 PM



And about all the different things you can do in a turn... I can easily do all that within 6 seconds.

Sorry, but I simply don't believe you --


What reason would I have to come here and lie about that?
I know I can do it because I can.
I've been playing games for more than 15 years.

Just because you can't do it doesn't mean other people can't do it.
So if you don't believe me then I guess the discussion between us ends at that.

Your argument about having 100 skills to choose between for a each situation is pretty crazy too.
I mean sure there can easily be 100 skills in the game.. but not all for the same type of situation.. that means you would have to have over a thousand skills in the game.

When I played WoW for example I probably had around 50 abilities hotkeyed/keybinded. I used up every single hotbar slot available.
Doesn't mean I had to decide between them all for each situation.. All skills are used for different situations.


I dare you to complete a 600 province dominions 3 game turn in 6 seconds. Go on. Do it. Although that is a tbs/rts debate as opposed to what you see in rpgs. Also try doing that using spell casting which is extra time with up to 100 spell casters per province.

Diplomacy is another example but only has like 70 territories.

I suppose you might argue that in a single character rpg turn based isn't that important.


#4919848 I propose that Mages by nature should be unbalanced and therefore hax.

Posted by AltarofScience on 06 March 2012 - 12:25 PM

To be honest your argument is silly. Because if something can kill something else EVERYONE wants it and researches it and similar.

If magic existed it would as part of any warriors arsenal as a machine gun or a grenade. That said there is still a massive difference between a ballistic missile fired from a submarine, and the same level of skill and difference you're trying to get at.

Essentially this means that no matter how powerful your mages are: you're fighting people just as powerful as yourself, people who don't fear you as a god(sufficiently powerful kind), and you're just as at risk as the enemy.

_______

the reason "story" magic is soo different is because it takes place in our world.


The reason not everyone can be a wizard is either one of birth, ie they arent born with the power or they aren't smart enough to handle it. It doesnt make sense for everyone to be a mage like it is in games.


#4919524 I propose that Mages by nature should be unbalanced and therefore hax.

Posted by AltarofScience on 05 March 2012 - 12:20 PM

In my MMO there is unlimited progression in all skills, but mages have the highest power curve easily. Powerful mages can do crazy things. The game has built in limits on the spread of magic and magic can only be found, no selecting a mage class. However one thing is that for mages to be really powerful they need help from various crafters and other mages and even fighters, and everyone can try to get low level magic from mages. However the game is an eternally scaling PvE only game, which is how I deal with godlike power. It would be terrible for PvP.


#4913156 Expected Declaration

Posted by AltarofScience on 14 February 2012 - 04:46 PM

Haters gonna hate. I got a working version.
Thanks to the people who were actually helpful.
#include "stdafx.h"
#include <iostream>
#include <glut.h>
#include <PxPhysicsAPI.h>
#include <PxExtensionsAPI.h>
#include <PxDefaultErrorCallback.h>
#include <PxDefaultAllocator.h>
#include <PxDefaultSimulationFilterShader.h>
#include <PxDefaultCpuDispatcher.h>
#include <PxShapeExt.h>
#include <PxMat33Legacy.h>
#include <PxSimpleFactory.h>

using namespace physx;

#pragma comment(lib, "PhysX3_x86.lib")
#pragma comment(lib, "PxTask.lib")
#pragma comment(lib, "Foundation.lib")
#pragma comment(lib, "PhysX3Extensions.lib")
#pragma comment(lib, "GeomUtils.lib")

const int WINDOW_WIDTH=1024, WINDOW_HEIGHT=768;

static PxPhysics* mPhysicsSDK = NULL;
static PxDefaultErrorCallback gDefaultErrorCallback;
static PxDefaultAllocator gDefaultAllocatorCallback;
static PxSimulationFilterShader gDefaultFilterShader=PxDefaultSimulationFilterShader;

PxScene* mScene = NULL;
PxReal mStepSize = 1.0f/60.0f;
PxRigidActor *box;

int oldX=0, oldY=0;
float rX=15, rY=0;
float fps=0;
int startTime=0;
int totalFrames=0;
int state =1 ;
float dist=-5;

void SetOrthoForFont()
{	
	glMatrixMode(GL_PROJECTION);
	glPushMatrix();
	glLoadIdentity();
	gluOrtho2D(0, WINDOW_WIDTH, 0, WINDOW_HEIGHT);
	glScalef(1, -1, 1);
	glTranslatef(0, -WINDOW_HEIGHT, 0);
	glMatrixMode(GL_MODELVIEW);	
	glLoadIdentity();
}

void ResetPerspectiveProjection()
{
	glMatrixMode(GL_PROJECTION);
	glPopMatrix();
	glMatrixMode(GL_MODELVIEW);
}

void RenderSpacedBitmapString(
							  int x,
							  int y,
							  int spacing,
							  void *font,
							  char *string)
{
	char *c;
	int x1=x;
	for (c=string; *c != '\0'; c++) {
		glRasterPos2i(x1,y);
		glutBitmapCharacter(font, *c);
		x1 = x1 + glutBitmapWidth(font,*c) + spacing;
	}
}


void DrawAxes()
{	
	glPushMatrix();
		glColor3f(0,0,1);
		glPushMatrix();
			glTranslatef(0,0, 0.8f);
			glutSolidCone(0.0325,0.2, 4,1);
			//Draw label			
			glTranslatef(0,0.0625,0.225f);
			RenderSpacedBitmapString(0,0,0,GLUT_BITMAP_HELVETICA_10, "Z");
		glPopMatrix();					
		glutSolidCone(0.0225,1, 4,1);

		glColor3f(1,0,0);
		glRotatef(90,0,1,0);	
		glPushMatrix();
			glTranslatef(0,0,0.8f);
			glutSolidCone(0.0325,0.2, 4,1);
			//Draw label
			glTranslatef(0,0.0625,0.225f);
			RenderSpacedBitmapString(0,0,0,GLUT_BITMAP_HELVETICA_10, "X");
		glPopMatrix();					
		glutSolidCone(0.0225,1, 4,1);

		glColor3f(0,1,0);
		glRotatef(90,-1,0,0);	
		glPushMatrix();
			glTranslatef(0,0, 0.8f);
			glutSolidCone(0.0325,0.2, 4,1);
			//Draw label
			glTranslatef(0,0.0625,0.225f);
			RenderSpacedBitmapString(0,0,0,GLUT_BITMAP_HELVETICA_10, "Y");
		glPopMatrix();					
		glutSolidCone(0.0225,1, 4,1);	
	glPopMatrix();
}
void DrawGrid(int GRID_SIZE)
{
	glBegin(GL_LINES);
	glColor3f(0.75f, 0.75f, 0.75f);
	for(int i=-GRID_SIZE;i<=GRID_SIZE;i++)
	{
		glVertex3f((float)i,0,(float)-GRID_SIZE);
		glVertex3f((float)i,0,(float)GRID_SIZE);

		glVertex3f((float)-GRID_SIZE,0,(float)i);
		glVertex3f((float)GRID_SIZE,0,(float)i);
	}
	glEnd();
}



void StepPhysX()
{
	mScene->simulate(mStepSize);			  
	while(!mScene->fetchResults() )	
	{	
	}
}

void InitializePhysX() {
	mPhysicsSDK = PxCreatePhysics(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback, PxTolerancesScale() );
	PxInitExtensions(*mPhysicsSDK);
	PxSceneDesc sceneDesc(mPhysicsSDK->getTolerancesScale());
	sceneDesc.gravity=PxVec3(0.0f, -9.8f, 0.0f);
	 if(!sceneDesc.cpuDispatcher) {
		PxDefaultCpuDispatcher* mCpuDispatcher = PxDefaultCpuDispatcherCreate(1);
		if(!mCpuDispatcher)
		sceneDesc.cpuDispatcher = mCpuDispatcher;
	}
	 if(!sceneDesc.filterShader)
		sceneDesc.filterShader  = gDefaultFilterShader;

	
	mScene = mPhysicsSDK->createScene(sceneDesc);
	
	PxMaterial* mMaterial = mPhysicsSDK->createMaterial(0.5,0.5,0.5);
	
	PxReal d = 0.0f;	
	PxTransform pose = PxTransform(PxVec3(0.0f, 0, 0.0f),PxQuat(PxHalfPi, PxVec3(0.0f, 0.0f, 1.0f)));

	PxRigidStatic* plane = mPhysicsSDK->createRigidStatic(pose);
	
	PxReal density = 1.0f;
	PxTransform transform(PxVec3(0.0f, 10.0f, 0.0f), PxQuat::createIdentity());
	PxVec3 dimensions(0.5,0.5,0.5);
	PxBoxGeometry geometry(dimensions);
	
	PxRigidDynamic *actor = PxCreateDynamic(*mPhysicsSDK, transform, geometry, *mMaterial, density);
	actor->setAngularDamping(0.75);
	actor->setLinearVelocity(PxVec3(0,0,0));
	if (!actor)
	mScene->addActor(*actor);
	box = actor;
}

void getColumnMajor(PxMat33 m, PxVec3 t, float* mat) {
   mat[0] = m.column0[0];
   mat[1] = m.column0[1];
   mat[2] = m.column0[2];
   mat[3] = 0;

   mat[4] = m.column1[0];
   mat[5] = m.column1[1];
   mat[6] = m.column1[2];
   mat[7] = 0;

   mat[8] = m.column2[0];
   mat[9] = m.column2[1];
   mat[10] = m.column2[2];
   mat[11] = 0;

   mat[12] = t[0];
   mat[13] = t[1];
   mat[14] = t[2];
   mat[15] = 1;
}

void DrawBox(PxShape* pShape) {
	PxTransform pT = PxShapeExt::getGlobalPose(*pShape);
	PxBoxGeometry bg;
	pShape->getBoxGeometry(bg);
	PxMat33 m = PxMat33(pT.q );
	float mat[16];
	getColumnMajor(m,pT.p, mat);
	glPushMatrix();
		glMultMatrixf(mat);
		glutSolidCube(bg.halfExtents.x*2);
	glPopMatrix();
}

void DrawShape(PxShape* shape)
{
	PxGeometryType::Enum type = shape->getGeometryType();
	switch(type)
	{		  
		case PxGeometryType::eBOX:
			DrawBox(shape);
		break;
	}
}

void DrawActor(PxRigidActor* actor)
{  
	PxU32 nShapes = actor->getNbShapes();
	PxShape** shapes=new PxShape*[nShapes];
	
	actor->getShapes(shapes, nShapes);	
	while (nShapes--)
	{
		DrawShape(shapes[nShapes]);
	}
	delete [] shapes;
}

void RenderActors()
{	
	DrawActor(box);
}

void ShutdownPhysX() {
	mScene->removeActor(*box);	
	mScene->release();
	box->release();
	mPhysicsSDK->release();
}

void InitGL() {
	glEnable(GL_CULL_FACE);
	glEnable(GL_LIGHTING);
	glEnable(GL_LIGHT0);

	GLfloat ambient[4]={0.25f,0.25f,0.25f,0.25f};
	GLfloat diffuse[4]={1,1,1,1};
	GLfloat mat_diffuse[4]={0.85f,0,0,0};

	glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
	glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
	glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_diffuse);

	glDisable(GL_LIGHTING);
}

void OnReshape(int nw, int nh) {
	glViewport(0,0,nw, nh);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(60, (GLfloat)nw / (GLfloat)nh, 0.1f, 100.0f);
	glMatrixMode(GL_MODELVIEW);
}

char buffer[MAX_PATH];
void OnRender() {
	totalFrames++;
	int current = glutGet(GLUT_ELAPSED_TIME);
	if((current-startTime)>1000)
	{		
		float elapsedTime = float(current-startTime);
		fps = ((totalFrames * 1000.0f)/ elapsedTime) ;
		startTime = current;
		totalFrames=0;
	}

	sprintf_s(buffer, "FPS: %3.2f",fps);
	
	if (mScene)
	{
		StepPhysX();
	}


	glClear(GL_COLOR_BUFFER_BIT);
	glLoadIdentity();
	glTranslatef(0,0,dist);
	glRotatef(rX,1,0,0);
	glRotatef(rY,0,1,0);

	DrawAxes();	
	DrawGrid(10);
	
	glEnable(GL_LIGHTING);
		RenderActors();
	glDisable(GL_LIGHTING);

	SetOrthoForFont();		
		glColor3f(1,1,1);
		RenderSpacedBitmapString(20,20,0,GLUT_BITMAP_HELVETICA_12,buffer);

	ResetPerspectiveProjection();

	glutSwapBuffers();
}

void OnShutdown() {
ShutdownPhysX();
}


void Mouse(int button, int s, int x, int y)
{
	if (s == GLUT_DOWN)
	{
		oldX = x;
		oldY = y;
	}	
	
	if(button == GLUT_MIDDLE_BUTTON)
		state = 0;
	else
		state = 1;
}

void Motion(int x, int y)
{
	if (state == 0)
		dist *= (1 + (y - oldY)/60.0f);
	else
	{
		rY += (x - oldX)/5.0f;
		rX += (y - oldY)/5.0f;
	}
	oldX = x;
	oldY = y;
	
	glutPostRedisplay();
}

void OnIdle() {
	glutPostRedisplay();
}

void main(int argc, char** argv) {
	atexit(OnShutdown);
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
	glutInitWindowSize(WINDOW_WIDTH, WINDOW_HEIGHT);
	glutCreateWindow("AoSBox");

	glutDisplayFunc(OnRender);
	glutIdleFunc(OnIdle);
	glutReshapeFunc(OnReshape);

	glutMouseFunc(Mouse);
	glutMotionFunc(Motion);
	InitGL();
	InitializePhysX();

	glutMainLoop();		
}



#4913089 Expected Declaration

Posted by AltarofScience on 14 February 2012 - 01:35 PM

I think I got it. As soon as VS spends ten minutes loading I will know.




PARTNERS