Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - v6v

Pages: 1 2 [3] 4 5 ... 34
31
Help, Errors, FAQ / Re: Rotating around origin for framesets.
« on: 2013-04-26, 05:09:36 PM »
Hey, I got it working! It works only for square graphics, but that's all I need it for.

Code: [Select]
 PointF Center = new PointF(((((corners[0].X))) + (((corners[3].X))/2)), ((((corners[0].Y))) + ((corners[1].Y))/2));
       float radius = (float)(Math.Sqrt(Math.Pow(((((corners[3].X)) + ((corners[0].X)))/2) , 2) +  Math.Pow(((((corners[1].Y)) + ((corners[0].Y)))/2), 2)));


  



      PointF[] cornerstrig = new PointF[4];
      
if (phi != 0)
{
      cornerstrig[0].X = (float)(Center.X - (radius*Math.Cos(((3*Math.PI)/4)+phi)));
      cornerstrig[0].Y = (float)(Center.Y - (radius*Math.Sin(((3*Math.PI)/4)+phi)));

      cornerstrig[1].X = (float)(Center.X - (radius*Math.Cos(((5*Math.PI)/4)+phi)));
      cornerstrig[1].Y = (float)(Center.Y - (radius*Math.Sin(((5*Math.PI)/4)+phi)));

      cornerstrig[2].X = (float)(Center.X - (radius*Math.Cos(((7*Math.PI)/4)+phi)));
      cornerstrig[2].Y = (float)(Center.Y - (radius*Math.Sin(((7*Math.PI)/4)+phi)));

      cornerstrig[3].X = (float)(Center.X - (radius*Math.Cos(((1*Math.PI)/4)+phi)));
      cornerstrig[3].Y = (float)(Center.Y - (radius*Math.Sin(((1*Math.PI)/4)+phi)));
}
else
{
   cornerstrig[0] = corners[0];
cornerstrig[1] = corners[1];
cornerstrig[2] = corners[2];
cornerstrig[3] = corners[3];
}

      


            if (!Flipped)
      {      
      GL.TexCoord2((float)sourceRect.Left / texture.Width, (float)sourceRect.Top / texture.Height);
      GL.Vertex3((cornerstrig[3].X + offsetX)/scaledown, (cornerstrig[3].Y + offsetY)/scaledown, pos);
      GL.TexCoord2((float)sourceRect.Left / texture.Width, (float)(sourceRect.Top + sourceRect.Height) / texture.Height);
      GL.Vertex3((cornerstrig[2].X + offsetX)/scaledown , (cornerstrig[2].Y + offsetY)/scaledown , pos );
      GL.TexCoord2((float)(sourceRect.Left + sourceRect.Width) / texture.Width, (float)(sourceRect.Top + sourceRect.Height) / texture.Height);
      GL.Vertex3((cornerstrig[1].X + offsetX)/scaledown, (cornerstrig[1].Y + offsetY)/scaledown , pos );
      GL.TexCoord2((float)(sourceRect.Left + sourceRect.Width) / texture.Width, (float)sourceRect.Top / texture.Height);
      GL.Vertex3((cornerstrig[0].X + offsetX)/scaledown , (cornerstrig[0].Y + offsetY)/scaledown , pos );
      }

            if (Flipped)
      {
      GL.TexCoord2((float)sourceRect.Left / texture.Width, (float)sourceRect.Top / texture.Height);
      GL.Vertex3((cornerstrig[0].X + offsetX)/scaledown , (cornerstrig[0].Y + offsetY)/scaledown , pos );
      GL.TexCoord2((float)sourceRect.Left / texture.Width, (float)(sourceRect.Top + sourceRect.Height) / texture.Height);
      GL.Vertex3((cornerstrig[1].X + offsetX)/scaledown, (cornerstrig[1].Y + offsetY)/scaledown , pos );
      GL.TexCoord2((float)(sourceRect.Left + sourceRect.Width) / texture.Width, (float)(sourceRect.Top + sourceRect.Height) / texture.Height);
      GL.Vertex3((cornerstrig[2].X + offsetX)/scaledown , (cornerstrig[2].Y + offsetY)/scaledown , pos );
      GL.TexCoord2((float)(sourceRect.Left + sourceRect.Width) / texture.Width, (float)sourceRect.Top / texture.Height);
      GL.Vertex3((cornerstrig[3].X + offsetX)/scaledown, (cornerstrig[3].Y + offsetY)/scaledown, pos);
  
      }



This code either mirrors a graphic horizontally or rotates it, it resides in DrawFrame, thanks, bluemonkmn for help!

32
Projects / Re: Project Galaxy Devlog
« on: 2013-04-26, 01:06:44 PM »
That was the problem , having a loading screen that could animate itself while loading would probably require  another thread, your splash screen is aesthetic enough to where loading and visual display can be used at the same time.

I was looking at that thread about a week ago, actually :)

33
Help, Errors, FAQ / Re: Rotating around origin for framesets.
« on: 2013-04-26, 12:45:22 PM »
Let me continue my question.

I have this code in DrawFrame

It's right before GL.Vertices,I use cornerstrig in my GL.Vertices call in DrawFrame

I'm trying to handle rotation inside of DrawFrame.

Code: [Select]
  PointF Center = new PointF(((((corners[3].X))) + (((corners[0].X))/2)), ((((corners[1].Y))) + ((corners[0].Y))/2));
       float radius = (float)(Math.Sqrt(Math.Pow(((((corners[3].X)) + ((corners[0].X)))/2) , 2) +  Math.Pow(((((corners[1].Y)) + ((corners[0].Y)))/2), 2)));


  

      PointF[] cornerstrig = new PointF[4];

      cornerstrig[0].X = (float)(Center.X - (radius*Math.Cos((3*Math.PI)/4)));
      cornerstrig[0].Y = (float)(Center.Y - (radius*Math.Sin((3*Math.PI)/4)));

      cornerstrig[1].X = (float)(Center.X - (radius*Math.Cos((5*Math.PI)/4)));
      cornerstrig[1].Y = (float)(Center.Y - (radius*Math.Sin((5*Math.PI)/4)));

      cornerstrig[2].X = (float)(Center.X - (radius*Math.Cos((7*Math.PI)/4)));
      cornerstrig[2].Y = (float)(Center.Y - (radius*Math.Sin((7*Math.PI)/4)));

      cornerstrig[3].X = (float)(Center.X - (radius*Math.Cos((1*Math.PI)/4)));
      cornerstrig[3].Y = (float)(Center.Y - (radius*Math.Sin((1*Math.PI)/4)));


It seems right but it's as if the frame expands and shrinks in size randomly, I'm not sure what I'm doing wrong..

I'm trying to get the Center, radius, and calculate the points as Rcos(theta) Rsin(Theta from center, using the 4 angles 3pi/4 5pi/4 7pi/4 1pi/4

Maybe I should handle Rotation before corners[] is passed to DrawFrame?

34
Off-Topic / Re: My first Android App
« on: 2013-04-25, 09:04:19 PM »
Since it's free, (Can you post the APK?) The hotspots in this area are tight and don't work well with the Google Play store.

35
Projects / Re: Project Galaxy Devlog
« on: 2013-04-25, 06:09:55 PM »
Looking good!

Do you have an idea of when a playable demo will be ready?

Thank you very much for your support Vincent- it's still a small way away from a playable demo- (I want to have as much made before I release a demo)

I figure that suggestions would be better as soon as I have something running.

Right now, I'm looking back at the LoK source for something particular ( :) )

The splash screen in LOK, how was that done? I do my loading in game but it freezes the thread, I need to be able to load things before I try to access them, like maps, which take at least 8 seconds to load

36
Projects / Re: Project Galaxy Devlog
« on: 2013-04-24, 11:53:58 AM »
Still going slowly, listen to this:

http://www.youtube.com/watch?v=dnbCQj-Rrlc


Okay, I also want to rotate quads drawn in OpenGL by calculating the four points as

Center = X + width/2, Y + height/2
R = SQRT(width/2(Squared) + height/2(Squared))
Point 1 is Rcos(pi/4 + phi), Rsin(45 + phi) //From Center
Point 2 is Rcos(3pi/4 + phi) Rsin(135 + phi) //From Center
Point 3...
...

And so on, where phi would be the angle of rotation in radians

Instead of the default values. I'll slap in a new parameter in DrawFrame to accept phi.

That way I could finally implement this idea I've had for months for rotations handled without framesets

I could also have animated sprites that rotate as well!



I hope it works, I'm going to try and implement it whenever.




Finally, worked on some Network items, added a say command, which is just "S your message" which would send a message  saying "your message"

Added a users command, which shows the current user list in the room from the List<UserSprite> of all users on the map.

Usernames can be shown above the players head and can be toggled on and off.

And some graceful disconnect commands too.

37
Projects / Re: Project Galaxy Devlog
« on: 2013-04-20, 06:31:55 PM »
No screenshots today, posting mainly that I'm taking apart all of the rules my sprite uses and instead I'm going to have everything inside of spritecustom (Mainly because I have about 40 parameters which is about 40 int32's per User which leads to ridiculous mess when running my game, most parameters won't even exceed the value of 1, so bools will  work.

I'm sticking to bools and shorts.

38
Projects / Project Galaxy Devlog
« on: 2013-04-18, 10:42:11 PM »
Hey!

If you want to know what my game is about, I have an older thread where I post official updates (Such as downloads)
This will be frequently updated and only shows minor changes.

Suggestions and changes are welcome, I'm not sure how close I am towards a release, anything that seems close is actually far considering the time needed to complete it.

Change 1 I've made a rotating voxel overworld map for the game. It still feels incomplete.




Change 2
Okay, now I remember that in my other thread the concept of a GoArrow was unpopular. But I'm using multidirectional Go Arrows. It can become easy to get confused or lost in such a large game world. I'm using the GoArrow to give the player the instructions of the possible directions they can choose- nothing linear. It's flashing colors and making a loud and urgent noise. What do you all think?

Change 3
I've also finally added the code that allows our hero to change his outfit completely. He's sporting a gabardine sweater, one  of the first clothing items



Thanks for viewing!

39
Game Development Artistry / Re: Walking Sequences
« on: 2013-04-10, 07:17:18 AM »
I'm glad to help you!  I can't wait to see your game. :)

There is no rocket science behind the wavy water effect, it's an animation with a lot of frames.  I ripped a lot of content from a SNES game called Demon's Crest to use it in LoK:R.  You can see what I ripped on the spriters resource web site (see link below).  You will certainly recognize some of the stuff in LoK:R.  (Ripping all of this was a project in itself, it took a couple of months to complete.)
http://spriters-resource.com/snes/demonscrest/index.html

You can see the water animation disassembled frame by frame in the "Forest Lake Background"
This web site is very useful to get base material for 2D games, I used it extensively for LoK:R.  But since most of the stuff is ripped from games, you have to be careful how you use it because of copyright issues.

You're a spriter? That's awesome, I had no idea. (I saw your name on the sheet and stopped: (Wait is that the same Vincent??))

That's the exact effect that I'm referring to, do you mind if I use it for a bit? Until I can try and take a shot at it myself (It might be hard, it looks like 50 frames)

I never really understood if it was hardware that made the water do that cool effect in the older games

40
Game Development Artistry / Re: Walking Sequences
« on: 2013-04-09, 06:25:30 PM »
Vincent, thank you for the feedback and the motivation.

I will work on tuning my jumping animation sequence.

That will be the next major hurdle that I'll have to jump through (No pun intended)

The videos are useful because eventually, I'll have to animate attacks. Especially something like a flying kick would make a nice attack!

(Off topic)

I was replaying Legacy of Kain: R- I had to ask

In one of the locations, I believe it was a sewer under a part of a castle, you seemed to have done a wavy water effect in that level for the water, how exactly, did you achieve it?

I wanted to do something similar, I see it in a lot of older games.

41
Game Development Artistry / Re: Walking Sequences
« on: 2013-04-08, 02:14:37 PM »
Very nice!  It looks good!

Since you say the running animation doesn't seem natural, I looked at it and found 2 problems:
1- The "front" leg doesn't extend all the way, when it touches the ground, the knee is still bent a lot at that moment.
2- The motion of the leg going back and the motion of the leg going forward are essentially the same in reverse, but they shouldn't be.  When you run, to bring leg forward (in the back to front motion), you keep you knee bent and your foot high.  The foot only touches the ground when pushing (so in the front to back motion).


Vincent:

Followed your advice:

I kept the knee up

Extended the leg out

http://www.youtube.com/watch?v=y8Pgp48fslg

Incredible improvement, anything wrong with the jumping animation?

42
Help, Errors, FAQ / Re: OutOfMemory Exception When Building
« on: 2013-04-08, 12:39:09 PM »
I know it's beside the point now, but are you sure you looked in C:\Users\David Thomas\Documents\Paradigm for the second copy? I don't know how it would display that message without successfully saving the project.

Pic2 was from my second attempt, it wasn't corrupted, but by not saving, I mean that it's almost as if it went backwards- it was less recent than my less recent backup, as if it wasn't saved from recent data.

Either way, it loads fine now, it's just not the most recent project ;)

43
Game Development Artistry / Re: Walking Sequences
« on: 2013-04-07, 07:36:27 PM »
Okay, so I tried to make a Gif of the entire game, but it was about 27MB. Too large for upload to any major filesharing sites.

http://www.youtube.com/watch?v=y4yNJM7iJp4

Walking, Running, Standing, Jumping (I'm using the old standing animation, I'm going to switch to either of the two Vincent posted)

The running animation doesn't seem to be natural.

44
Help, Errors, FAQ / Re: OutOfMemory Exception When Building
« on: 2013-04-06, 11:25:02 AM »
It went on for about 7 minutes and hasn't come back!

The second copy, 99o, didn't actually save even though it said that it saved.

Either way, I had a backup that was more recent!

45
Help, Errors, FAQ / Re: OutOfMemory Exception When Building
« on: 2013-04-05, 05:49:26 PM »
WOW, never received this nasty looking one before: Pic # 1

EDIT: Pic # 2, Rebuilt, and at least the project that was saved wasn't corrupted this time :D

I was afraid that this would happen as my project developed.

Maybe my project is just meant to be a proof of concept.

Pages: 1 2 [3] 4 5 ... 34