Recent posts by Glompee on Kongregate

Flag Post

Topic: Game Programming / Please Help With C# Programming

You’re missing one parenthesis. Here’s it tidied up, I guess.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
	// remember that anything with two slashes before it does not affect the code itself – they’re screen notes so I can right what I want here.
	//Set the 3D model to draw
	Model myModel;
	//The aspect float ratio determines how to scale 3d to 2d projection. float aspectRatio; protected override void LoadContent()
	{
		//Create a new SpriteBatch, which can be used to draw textures.
		spriteBatch = new SpriteBatch(GraphicsDevice);
		myModel = Content.Load<model>(“Models\\p1_wedge”) aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio; //In that part you have told the code to load the model. 
		//Set the position of the model in world space, and set the rotation. Vector3 modelPosition = Vector3.Zero; float modelRotation = 0.0f; 
		//Set the position of the camera in world space, for our view matrix - whatever that means!!!!!!! Vector3 cameraPosition = new Vector3(0.0f, 50.0f, 5000.0f); protected override void Draw(GameTime gameTime)
		{
			graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
			//Copy any parent transforms.
			Matrix [] transforms = new Matrix[myModel.Bones.Count];
			myModel.CopyAbsoluteBoneTransformsTo(transforms);
			//Draw the model. A model can have multiple meshes, so loop. foreach (ModelMesh mesh indexer myModel.Meshes)
			{
				//This is where the mesh orientation is set, as well
				// as our camera projection.
				foreach (BasicEffect effect indexer mesh.Effects)
				{
					effect.EnableDefaultLighting();
					effect.World = transforms[mesh.ParentBone.Index] *
					Matrix.CreateRotationY(modelRotation)
					
					Matrix.CreateTranslation(modelPosition)
					effect.View = Matrix.CreateLookAt(cameraPosition,
					Vector3.Zero, Vector3.Up);
					effect.Projection = Matrix.CreatePerspectiveFieldOfView(
					MathHelper.ToRadians(45.0f), aspectRatio,
					1.0, 10000.0f);
				}
				mesh.Draw();
			}
			base.Draw(gameTime);
		}
		
		protected override void Update(GameTime gameTime)
		{
			//Allows the game to exit
			if (GamePad.GetState(PlayerIndex.One).Buttons.Back ==
			ButtonState.Pressed)
			this.Exit();
			modelRotation += (float)gameTime.ElapsedGameTime.Total.Milliseconds * MathHelper.ToRadians(0.1f); base.Update(gameTime);
		
		}
		
		//Press F5 to start debugging
		
		//To be honest I expected this to happen – it didn’t work. Now, looking at the errors list, I will pause the video (because this one is LONG!) and record every so often when I attempt to fix a mistake.
		public partial class Form1 : Form 
		{ 
			public Form1() 
			{ 
				InitializeComponent(); 
			}
		}
	}
}
 
Flag Post

Topic: Game Programming / Finding strange things when viewing someone else's code...

I feel the compulsion to use brackets every time I use any if statements, and I like my brackets to take up one whole line. For instance,

 protected function keyDownHandler( e:KeyboardEvent ):void{
	if( e.keyCode == Keyboard.ENTER  && input.text.length > 0 )controller.keywordSearch( input.text );
	if( e.keyCode == Keyboard.ENTER && input.text.charAt(0) == "" && input.text.length == 0){
		controller.keywordSearch( input.text );
	}
}

Would be

protected function keyDownHandler(e:KeyboardEvent):void
{
	if((e.keyCode == Keyboard.ENTER)  && (input.text.length > 0))
        {
                controller.keywordSearch(input.text);
        }
	if((e.keyCode == Keyboard.ENTER) && (input.text.charAt(0) == "") && (input.text.length == 0))
        {
		controller.keywordSearch(input.text);
	}
}

Just sayin. Now sure helps in reading it. Two periods in one…uh…word seems strange.

 
Flag Post

Topic: Off-topic / One of my teachers died yesterday.

I usually deal with it by posting random poop in OT.

 
Flag Post

Topic: Off-topic / Think of something you would never voluntary do in a million years

Why would I wait a million years?

 
Flag Post

Topic: Game Programming / Beginner/Advanced

Originally posted by Jagan420:

Is it just me, or could this forum use being split into beginner and advanced forums?

Why?

 
Flag Post

Topic: Serious Discussion / Sport-hunting for humans? (anti-pirate cruise lines)

And cops should stop dressing up as narcs and prostitutes! They’re intentionally baiting us as well!

 
Flag Post

Topic: Kongregate / Is kongregate going to be shut down

So then I should start saying bye to Apple as well? Oh noe mah iPhone :[

 
Flag Post

Topic: Game Programming / Is this tutorial legitimate?

If you’re using FlashDevelop for the Shootorials, just draw a circle using the graphics instead. Good luck with that tutorial, it’s pretty complicated for me.

 
Flag Post

Topic: Game Programming / Gaiz

FlashDevelop told me “col 3 Error: The private attribute may be used only on class property definitions”. Not clear to a beginner, or at least to me.

I tested removing a parenthesis before an if statement in JCreator

public class asdf
{
public static void main(String[] args) {
int a = 0;
if(a==2)

System.out.println(“Hi”); } else { System.out.println(“Bye”); } }

}

and it gave me errors that did not say I was missing a parenthesis either, pointing to different lines to where I may have missed up (5 errors) . Are these improper IDEs?

 
Flag Post

Topic: Game Programming / Gaiz

Originally posted by Senekis93:

And that’s why you don’t use animation software to code.

Making trivial mistakes such as = instead of == and forgetting to close parenthesis seems to be a universal problem with programmers, no matter what you use.

 
Flag Post

Topic: Game Programming / Gaiz

Don’t worry. I figured out the problem. After looking through 222 lines for 5 hours, I realized I was missing an open bracket below my if statement. Here’s what I got so far.

http://swfup.com/view/siv4

 
Flag Post

Topic: Game Programming / How 2 mak a butten

Now how do I paste the code…

 
Flag Post

Topic: Game Programming / Game Recycling

Originally posted by HensHouse:

Rocket Gates – Fly your rocket through some gates! One button arcade game similar to Helicopter Game. I originally planned on making this a music game where the rocket goes through the gates at the same time as the music hits a beat and if you miss the gate, the music kinda hiccups and the screen shakes. Anyway, pretty basic game with tons of room for possibility.

Source
Demo

This blew my mind.

 
Flag Post

Topic: Off-topic / Pizza and Cookies

Originally posted by Provis:

Chocolate and cheese just doesn’t sound quite like a match made in heaven. How does it taste?

Mmmmm. Dessert with vegetables! Thanks mom!

Originally posted by Jeimuzu185:

That looks like a horrible mix.
The cookies look nothing like the box art does either.

’tis always the case with food advertisement.

 
Flag Post

Topic: Off-topic / What is a better weapon?

Are these the biggest fists in the world?

 
Flag Post

Topic: Off-topic / Could the Spartans alone take on the Covenant AND the Locust?

The Covenant has sheer numbers AND technology that would destroy anything.

 
Flag Post

Topic: Off-topic / Could the Spartans alone take on the Covenant AND the Locust?

Locust doesn’t have advanced technology. It’s just in a different form than humans, i.e. most their transportation is living.

And fan fiction just makes the Spartans look cool, they just had a more advanced armor and training.

 
Flag Post

Topic: Off-topic / Could the Spartans alone take on the Covenant AND the Locust?

The Covenant has Tier 2 technology.

The human race has Tier 3 technology.

Locusts, I would assume, are Tier 4.

Spartans alone couldn’t take on the Covenant. The human race as a whole barely could.

 
Flag Post

Topic: Kongregate / Kongregate should stop rating fraud!

Rating a game 4 stars is worse than spending real money to unlock little things in-game like in Bloons?

 
Flag Post

Topic: Off-topic / BRB gais gonna go upload my first game trololol

Originally posted by GraphicDesignC:

Okay well one thing is for sure.

The dipshit in the tutorial got his functions wrong, it shouldn’t be


if (Key.isDown(Key.RIGHT))
{
_x = _y+velocity;
}

It needs to be:

 if (Key.isDown(Key.RIGHT))
 {
 _x += velocity;
 }

That way it stays relative to the ship, allowing it to move forward.

_x and _y is both AS2 and AS3? Thought AS3 got rid of most, if not all, of the underscores.

 
Flag Post

Topic: Technical Support / turn off chat feature?

Originally posted by collusion:

I know of a way to load a game into a window without the chat, but it also loads it without the kongregate ads and so forth (it just loads the swf, none of the rest), so its probably against the kongregate rules.

Would this sign him out? If it’s just loading the game, he loses all badges and stuff, right?

 
Flag Post

Topic: Technical Support / Don't know how to post pictures now.

Originally posted by EPR89:

I guess that Show Picture is the same as Copy Image Address, which would be the second solution I posted and Copy Shortcut is the same as Copy Image Location.

I also believe it should be Copy Shortcut.

I think you can also click Properties and it will give you the url somewhere.

 
Flag Post

Topic: Game Programming / FlashDevelop multiple instances?

Y HALLO THAR

I was trying to get two windows of FlashDevelop to run. I tried looking it up, and it tells me to use command prompt, but I hardly know how to use that thing. Actually, I kind of just want to open two projects, or have two projects open at once, so I can compare code and fill in the blanks missing on my current project.

 
Flag Post

Topic: Collaborations / DON'T READ THIS!!!!!

Originally posted by saybox:
Originally posted by c0rupt3d_l0l:

Also your saying use proper grammar and spelling but you have a few yourself in there.

To continue the chain of grammar related irony, I would like to say you’re grammers has mistakes to.

Don’t know if your you’re being ironic…

 
Flag Post

Topic: Collaborations / my game

Originally posted by pok_03:

im not going to dads anymore. but in a week im going to my grannys, it will be the holidays so i will have lots of time to finish posting what ive written! (guaranteed) so yeah… if anyones still interested…

For what it’s worth, I’m still interested.

Originally posted by MrTheSean:
Originally posted by pok_03:

im not going to dads anymore. but in a week im going to my grannys, it will be the holidays so i will have lots of time to finish posting what ive written! (guaranteed) so yeah… if anyones still interested…

You have to move around houses to work? Huh. Buy a laptop if you are “Making” a game… :)

Laptops can be quite expensive for someone who’s making programs/art/whatever as a hobby.