|
-
Oct 7th, 2013, 12:38 PM
#51801
Re: Post Race!
Odd that I see FRIEND FUNCTION FILES_CREATED_BYDATE() in the HTML when I view the source of the page...
-
Oct 7th, 2013, 12:48 PM
#51802
Re: Post Race!
I need to clean the code up a bit, I noticed that I left some </p> tags in there that don't belong. I also noticed that the footer doesn't format properly in IE10 like it does in FireFox. For my CSS I used only one sheet to modify all the pages. It's such a small site that I didn't think that I needed one sheet per page. Where do you see the Friend... in the HTML? When I hit F12 in IE I don't see it at all, but then again for the code I'm using:
Code:
<pre><code>
'Code
</code></pre>
-
Oct 7th, 2013, 01:01 PM
#51803
Re: Post Race!
I figured out why my footer wasn't formatting properly, it was because I had compatibility view turned on in IE.
-
Oct 7th, 2013, 01:02 PM
#51804
Re: Post Race!
And now that I look at my HTML some more, I don't have any extra </p> tags in there. I don't know why IE is telling me that I do.
-
Oct 7th, 2013, 01:02 PM
#51805
Re: Post Race!
I did a right-click on the page and did a VIEW SOURCE - from IE...
That stuff never would have made it into the HTML in the dev tool - as it was not of good format.
-
Oct 7th, 2013, 01:04 PM
#51806
Re: Post Race!
How so? Or how would you improve upon it?
-
Oct 7th, 2013, 01:13 PM
#51807
Re: Post Race!
Was it your intent to send the VB functions into the HTML source? I've never seen that - what does that do?
-
Oct 7th, 2013, 01:15 PM
#51808
Re: Post Race!
Oh - I'm being stupid - that's what you intended on showing on the page!!
Oops - ignore me!!!
Sorry - backs out of the room quietly...
-
Oct 7th, 2013, 01:28 PM
#51809
Re: Post Race!
Lol, yeah I intended to show the vb.net code on the html page. So instead of using JavaScript to parse the vb.net code and show it like this:
vb.net Code:
Dim somecode As Integer = 1 + 2 - 9 (3 * 21)
-
Oct 7th, 2013, 01:33 PM
#51810
Re: Post Race!
I was in the DEV TOOL - looking at the HTML and saw error messages about id's and such - wasn't even looking at the actual page as much!
Talk about not being able to see the forest for the trees!
-
Oct 7th, 2013, 02:39 PM
#51811
Re: Post Race!
I just realized that I missed a pun, but it's too late now.
My usual boring signature: Nothing
 
-
Oct 8th, 2013, 11:01 AM
#51812
Re: Post Race!
I found a computer that my dad gave me the other day that had Win 98 with the most up to date .net framework installed on it was 1.1. Funny how PC's have since changed.
-
Oct 8th, 2013, 11:05 AM
#51813
Re: Post Race!
I still have a 5.25" floppy drive around here somewhere. I don't think I have any discs for it, but I do have 3.5" discs, and a computer with a drive for them.
My usual boring signature: Nothing
 
-
Oct 8th, 2013, 11:18 AM
#51814
Re: Post Race!
I imagine your house has a room that resembles a mad scientist laboratory with tons of computers, laptops, and drives scattered in a way that only you know where they are.
On a side note, I've never seen a 5.25" floppy before.
-
Oct 8th, 2013, 12:24 PM
#51815
Re: Post Race!
Floppy would be the word to describe them - soft case...
-
Oct 8th, 2013, 12:30 PM
#51816
Re: Post Race!
Yeah, a lady in my office said that she use to be able to make them wave whenever she'd move them because they were so huge.
-
Oct 8th, 2013, 05:29 PM
#51817
Re: Post Race!
I'm working on an XNA pong game, this is what I have so far:
Code:
Option Strict On
Option Explicit On
Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Public Class Form1
Private grafix As GraphicsDevice
Private effect As BasicEffect
Private quit As Boolean = False
Private player1 As Paddle
Private player2 As Paddle
Private ball() As Paddle
'In XNA the flow is:
'Initialize
'Load Content
'Update <> Draw - Repeat the process until finished
'Unload
'Initializes the graphics device
'This is apart of the Initialize process
Private Function InitializeGraphics(ByRef surface As PictureBox) As Boolean
Try
Dim pparam As New PresentationParameters
pparam.DeviceWindowHandle = surface.Handle
pparam.IsFullScreen = False
Dim grafixAdapt As GraphicsAdapter = GraphicsAdapter.DefaultAdapter
grafix = New GraphicsDevice(grafixAdapt, GraphicsProfile.HiDef, pparam)
InitializeGraphics = True
Catch ex As Exception
InitializeGraphics = False
End Try
End Function
'Initializes the basic effect
'This is apart of the Initialize process
Private Function InitializeEffect(ByVal graphics As GraphicsDevice) As Boolean
effect = New BasicEffect(graphics)
Try
effect.VertexColorEnabled = True
effect.Projection = Matrix.CreateOrthographicOffCenter(0, graphics.Viewport.Width, graphics.Viewport.Height, 0, 0, 1)
InitializeEffect = True
Catch ex As Exception
InitializeEffect = False
End Try
End Function
'Managed game loop set at 60FPS or it executes the code 16.6 times per millisecond
'This is apart of the Update process
Private Sub GameLoop()
grafix.Clear(Color.White)
effect.CurrentTechnique.Passes(0).Apply()
Call Draw()
grafix.Present()
Call MovePaddle()
If quit = False Then
ExecuteAfterPause(CInt(16.6), New MethodInvoker(AddressOf GameLoop))
End If
End Sub
'This draws the two players and the ball
'This is apart of the Draw process
Private Sub Draw()
grafix.DrawUserPrimitives(PrimitiveType.LineList, player1.Primative, 0, 1)
grafix.DrawUserPrimitives(PrimitiveType.LineList, player2.Primative, 0, 1)
End Sub
'This updates the location of the paddle
'This is apart of the Update process
Private Sub MovePaddle()
player1.Y_Location = PointToClient(MousePosition).Y - CInt(player1.Length / 2)
player2.Y_Location = player1.Y_Location
player1.Primative = Set2dLine(player1.X_Location, player1.Y_Location, player1.Z_Location, player1.X_Location, player1.Y_Location + player1.Length, player1.Z_Location, player1.Color)
player2.Primative = Set2dLine(player2.X_Location, player2.Y_Location, player2.Z_Location, player2.X_Location, player2.Y_Location + player2.Length, player2.Z_Location, player2.Color)
End Sub
'This starts a new game
'This is apart of the load process
Private Sub NewGame()
player1 = New Paddle
player2 = New Paddle
With player1
.Color = Color.Black
.Length = 50
.X_Location = 5
.Y_Location = CInt(pb_surface.Height / 2) - CInt(.Length / 2)
.Z_Location = 0
.Primative = Set2dLine(.X_Location, .Y_Location, .Z_Location, .X_Location, .Y_Location + .Length, .Z_Location, .Color)
End With
With player2
.Color = player1.Color
.Length = player1.Length
.X_Location = pb_surface.Width - player1.X_Location
.Y_Location = player1.Y_Location
.Z_Location = player1.Z_Location
.Primative = Set2dLine(.X_Location, .Y_Location, .Z_Location, .X_Location, .Y_Location + .Length, .Z_Location, .Color)
End With
End Sub
'This function simply draws a line
Private Function Set2dLine(ByVal x1 As Integer, ByVal y1 As Integer, ByVal z1 As Integer, _
ByVal x2 As Integer, ByVal y2 As Integer, ByVal z2 As Integer, _
ByVal color As Color) As VertexPositionColor()
Dim vertices1, vertices2 As New VertexPositionColor
vertices1.Position = New Vector3(x1, y1, z1)
vertices1.Color = color
vertices2.Position = New Vector3(x2, y2, z2)
vertices2.Color = color
Return {vertices1, vertices2}
End Function
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
If InitializeGraphics(pb_surface) AndAlso InitializeEffect(grafix) Then
Call NewGame()
Call GameLoop()
End If
End Sub
End Class
Public Class Paddle
Private x As Integer
Public Property X_Location() As Integer
Get
Return x
End Get
Set(ByVal value As Integer)
x = value
End Set
End Property
Private y As Integer
Public Property Y_Location() As Integer
Get
Return y
End Get
Set(ByVal value As Integer)
y = value
End Set
End Property
Private z As Integer
Public Property Z_Location() As Integer
Get
Return z
End Get
Set(ByVal value As Integer)
z = value
End Set
End Property
Private _len As Integer
Public Property Length() As Integer
Get
Return _len
End Get
Set(ByVal value As Integer)
_len = value
End Set
End Property
Private _color As Color
Public Property Color() As Color
Get
Return _color
End Get
Set(ByVal value As Color)
_color = value
End Set
End Property
Public Property Primative As VertexPositionColor()
End Class
I'm pretty proud because I use a managed game loop and I don't use any bitmaps. So when it's all said an done it will actually compile on a Xbox 360 as well as a Windows Phone. Tomorrow I'm going to start on the logic to move the ball as well as the AI for the cpu player.
-
Oct 8th, 2013, 05:30 PM
#51818
Re: Post Race!
I need to figure out how to handle getting rid of all the components when the user 'x' out of the game though.
-
Oct 8th, 2013, 05:44 PM
#51819
Re: Post Race!
 Originally Posted by dday9
Yeah, a lady in my office said that she use to be able to make them wave whenever she'd move them because they were so huge.
You got me wondering what this lady looks like...
Moar mermaids??
-
Oct 8th, 2013, 07:29 PM
#51820
Fanatic Member
-
Oct 8th, 2013, 07:42 PM
#51821
Re: Post Race!
 Originally Posted by szlamany
You got me wondering what this lady looks like...
Moar mermaids??
MOAR MERMAIDS!!!
-
Oct 8th, 2013, 07:43 PM
#51822
-
Oct 8th, 2013, 07:44 PM
#51823
-
Oct 8th, 2013, 07:45 PM
#51824
-
Oct 8th, 2013, 07:45 PM
#51825
-
Oct 9th, 2013, 05:06 PM
#51826
Re: Post Race!
I've submitted three new things in the past day and a half, I've been busy!
-
Oct 9th, 2013, 05:06 PM
#51827
Re: Post Race!
Oh and I've also started my website on Monday too.
-
Oct 9th, 2013, 05:07 PM
#51828
-
Oct 11th, 2013, 12:13 PM
#51829
Re: Post Race!
print ("I'm learning Python now!")
-
Oct 11th, 2013, 03:27 PM
#51830
Re: Post Race!
Well I feel proud of myself. In about a day I taught myself the basics of Python. I got down: declaring variables, getting input, displaying output, setting up my own functions, setting up classes, and basic IO functions.
-
Oct 11th, 2013, 03:28 PM
#51831
Re: Post Race!
python Code:
class person:
name = ""
age = 0
height_feet = 0
height_inches = 0
weight = 0
david = person
david.name = "David"
david.age = 22
david.height_feet = 5
david.height_inches = 10
david.weight = 165
print ("Name : " + david.name)
print ("Age : " + str(david.age))
print ("Height(ft): " + str(david.height_feet))
print ("Height(in): " + str(david.height_inches))
print ("Weight : " + str(david.weight))
-
Oct 11th, 2013, 03:35 PM
#51832
Re: Post Race!
So - I take in the BLANK line is a CODE-BLOCK delimiter - right?
-
Oct 11th, 2013, 03:38 PM
#51833
Re: Post Race!
Nope, the interpreter ignores the blank line. The CODE-BLOCK delimiter is the indentation in the class. The same can be said for the loops:
python Code:
i = 0
while i < 9
i += 1
print (str(i))
-
Oct 11th, 2013, 03:45 PM
#51834
Re: Post Race!
Ok - that's cool - simple enough...
I knew it had to be "something" that made that CLASS definition END...
-
Oct 11th, 2013, 04:03 PM
#51835
Re: Post Race!
Yeah, it kind of confused me because in Visual Basic you have End and then Sub/Function/Class/Module/Etc. and in C# you wrap code in {} so I was kind of confused at first.
-
Oct 11th, 2013, 05:11 PM
#51836
Re: Post Race!
Still better than a semicolon.
My usual boring signature: Nothing
 
-
Oct 11th, 2013, 05:19 PM
#51837
-
Oct 11th, 2013, 05:19 PM
#51838
Re: Post Race!
 Originally Posted by Shaggy Hiker
Still better than a semicolon.
100% agree!
-
Oct 11th, 2013, 05:39 PM
#51839
Re: Post Race!
I've done so much C++ and JavaScript in the past two years that the semi-colon is a natural for me now!
-
Oct 11th, 2013, 05:51 PM
#51840
Re: Post Race!
 Originally Posted by szlamany
I've done so much C++ and JavaScript in the past two years that the semi-colon is a natural for me now!
God help you. Imma pray for you my child
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|