Interested in game development
Interested in game development
Interested in game development
Interested in game development
Interested in game development
Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development
Interested in game development Interested in game development
Interested in game development
Go Back  Xtreme Visual Basic Talk > > > Interested in game development


Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2011, 09:37 AM
NewVBProgrammer NewVBProgrammer is offline
Centurion
 
Join Date: Jul 2010
Location: Grand Manan
Posts: 163
Default Interested in game development


Hello,

I'm interested in game development, but need to learn more about it. I've been working on text games in VB for awhile, but wouldn't mind taking on a simple 2d project sometime.

I'm just wondering if people can point me in the direction of good resources for beginners in it...

I had some obvious questions.

1) is there a way of making the invisible aspects of an image, say background of png = nothing, for collision detection purposes. So that that extra space isn't calculated into the code, so that ones not using all square objects..

2)Where can I learn all about directx, or openGL from the ground up...

stuff like that...even if I don't use any of it, I have a strange thing for learning, haha...I'd read the books and resources, and see where it took me.
Reply With Quote
  #2  
Old 04-25-2011, 04:23 PM
NewVBProgrammer NewVBProgrammer is offline
Centurion
 
Join Date: Jul 2010
Location: Grand Manan
Posts: 163
Default

I've been looking into XNA, but the tutorial site I found isn't working for me. They tell me to import the 3 XNA references, but when I downloaded XNA there was like 10 references.

then their code brings up errors in my editor.

they use swapeffect in their code, when I entered the code in VB studio I get the some error... swapeffect is not a 'something' of microsoft.something.something, lol..
Reply With Quote
  #3  
Old 04-25-2011, 06:37 PM
PlausiblyDamp's Avatar
PlausiblyDampInterested in game development PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Again, without telling us which tutorial site you are referring to or what code you were attempting to use we have absolutely no idea what you are talking about or how to help you.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #4  
Old 04-26-2011, 09:17 AM
NewVBProgrammer NewVBProgrammer is offline
Centurion
 
Join Date: Jul 2010
Location: Grand Manan
Posts: 163
Default

oh, I wasn't interested in getting help with that, I was simply explaining what I was going through, but i did ask specific questions..

But this is the tutorial site

http://www.alanphipps.com/VisualBasi...ateDevice.html

here's the code that gave me the error

Code:
Private Function IntializeGraphics()

Try
Dim presentParams As New PresentationParameters
presentParams.SwapEffect = SwapEffect.Discard
Dim XNAGraphicsAdapater As Microsoft.Xna.Framework.Graphics.GraphicsAdapter = Graphics.GraphicsAdapter.Adapters.Item(0)
Device = New Graphics.GraphicsDevice(XNAGraphicsAdapater, DeviceType.Hardware, Me.Handle, presentParams)

Return True

this code error is "SwapEffect is not a member of 'Microsoft.Xna.Framework.Graphics.PresentationParameters

Code:
presentParams.SwapEffect = SwapEffect.Discard
and

Code:
DeviceType.Hardware
This code gives me error DeviceType is not declared.

Here's the code in entirety as it is typed in my forms code area.

Code:
Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Input

Public Class Form1

    'Define Device variables
    Private Device As Graphics.GraphicsDevice = Nothing

    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown

        Select Case e.KeyCode
            Case Is = Windows.Forms.Keys.Escape
                Application.Exit()
                Exit Sub
        End Select

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Start the 3d Device
        IntializeGraphics()

        'forces windows to only use the Onpaint method to draw the window
        Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.Opaque, True)

    End Sub

    Private Function IntializeGraphics()

        Try
            Dim presentParams As New PresentationParameters
            presentParams.SwapEffect = SwapEffect.Discard
            Dim XNAGraphicsAdapater As Microsoft.Xna.Framework.Graphics.GraphicsAdapter = Graphics.GraphicsAdapter.Adapters.Item(0)
            Device = New Graphics.GraphicsDevice(XNAGraphicsAdapater, DeviceType.Hardware, Me.Handle, presentParams)

            Return True

        Catch ex As Exception
            MsgBox(ex.Message)
            Return False
        End Try

    End Function

    Public Sub OnResetDevice(ByVal sender As Object, ByVal e As EventArgs)

        If Device Is Nothing Then
            'Start the 3d Device
            IntializeGraphics()
        End If

    End Sub

    Public Sub Render()
        If Device Is Nothing Then Return

        'Clear the backbuffer to a blue color
        Device.Clear(ClearOptions.Target, Microsoft.Xna.Framework.Graphics.Color.Blue, 1.0F, 0)


        Device.Present()

    End Sub

    Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)

        'If Device has been lost or reset
        OnResetDevice(Device, Nothing)

        'Render graphics to screen
        Render()

        'Force windows to redraw the window
        Me.Invalidate()

    End Sub

End Class
Reply With Quote
  #5  
Old 04-26-2011, 09:52 AM
AtmaWeapon's Avatar
AtmaWeaponInterested in game development AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

It's not a field with many tutorials, but it kind of makes sense.

In other fields of programming, there's some recipes everyone is going to end up committing to memory. Connecting to a database is something you can memorize and spit out every time. Filling a listbox with data items is cookie cutter. You can study these recipes to make it easier to write applications. However, you still need to apply some thought as to which recipes you'll need.

Game programming's much more complicated. You can find plenty of articles about writing a scrolling background for a 2D game, but there's dozens of different ways to do so and they're influenced by your map format, size of maps, axes of movement, etc. So tutorials tend to focus on bare-bones boring stuff with the understanding that you'll go off on your own and play with it for a few hours to get a feel for how the moving parts fit together.

XNA recently had a new version (sometime in the last year at least) and it's possible the tutorial site's version of XNA is different from yours. You need to get in the habit of including more information in each of your posts. You don't get a medal for typing really fast. You won't get prizes for reaching a high post count. Instead, you'll end up wasting your time answering questions you could have answered in the first place.

*update*
Yep, from another page on the tutorial you linked:
Quote:
Today's games have thankfully come a long way and now Microsoft has just launched version 1 of XNA Game Studio Express [...]
The current version is 4.0. It stands to reason a lot has probably changed.

I'd strongly recommend picking up a book if you're going to learn XNA. It doesn't have to be an XNA 4 book, but you need to make sure if you use a book for a previous version you also use the tools for the previous version. If you want to learn another framework, pick up a book for that one. It's possible to teach yourself a lot from the internet these days, and I don't doubt you could learn all you need to know for free. Books distill this information, cut it down to the things you need, and organize it in a logical fashion for you. It's a much faster route. I'm teaching myself iOS programming right now. My goal was to avoid buying a book; I've given up on that. I spent 3 weeks reading documentation and was getting pretty far, but at the rate I was going it'd be 4 or 5 months before I felt like I had a strong enough foundation to write good applications. I can finish a book in 1 months and be in the same position.

Statistically, I've got 40 years left in my life and probably 20 of those can be spent programming; every day I lose is gone forever. On the other hand, every day I generate a sum of money to replace money that I have spent, and there is potential for me to increase the money I get; theoretically my lifetime earnings could be infinite. This is a fancy way of saying no matter what you think, time is more precious than money and you should optimize accordingly.

If you are going to avoid the book route, I suggest you slow down. Your brain is the right tool, not your fingers. Don't skim. Spend a few minutes reading the sites you visit to decide if they're up-to-date and actively maintained. If neither is true, they probably aren't a valuable resource.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.

Last edited by AtmaWeapon; 04-26-2011 at 09:59 AM.
Reply With Quote
  #6  
Old 04-26-2011, 11:15 AM
NewVBProgrammer NewVBProgrammer is offline
Centurion
 
Join Date: Jul 2010
Location: Grand Manan
Posts: 163
Default

Thanks, that was quite wise. I didn't even notice that the site was using an older version of XNA. I'm going to have to find some other resource then. I like books. I got a few on the basics of VB...I've run into a problem tho...

the beginning VB books to Master, or Pro VB books seem to skip some sort of step...

I understand all the books that are in the beginning of VB because they cover things we basically all know. starting with variables, functions, sub routines mods, classes, stuff like that....

but the code in the advanced books I don't understand. Is there a book that will help me make it through the intermediate stages?

I'm going to look into XNA books, or newer tutorials.

Thanks.
Reply With Quote
  #7  
Old 04-26-2011, 12:57 PM
AtmaWeapon's Avatar
AtmaWeaponInterested in game development AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Have a look at the words on this page.

The journey from novice to master is made of many steps. Books can guide you along the first steps and many texts are written about the difficult problems at the end of the journey, but you have to write the chapters in between yourself.

There are an infinite number of problems and numerous ways to attack each one. There's no book or series of books that can help you solve them all. The best thing you can do is read one of the beginner/intermediate books, spend some time writing *something*, then visit some advanced topics for a while. Think of a fun game. Try to write it. If you get stuck, ask for help.

One thing that will be a major stumbling point: fear of sharing source code. If your goal is to learn, you're going to have to share your source with others. It may be to get help when you're stuck, but it also doesn't hurt to post the source to your finished game. Someone might read it and comment on some places that could be improved (I'm a sucker for those kinds of post and usually respond to anything < 5,000 lines); that's a learning experience! Some novice might find it and learn some new tricks; you just helped someone! This is one of the aspects of the open source philosophy I agree with: the more code is out in the open the better our craft becomes.

If you can't write a game, pick a different one and try that. You might find that while working on the other you get unstuck on the first one. Sometimes the solution to a hard problem reveals itself while you're solving a more simple problem. Other times it turns out you hit something that computers don't do well but you think of an alternative that's easier.

The important thing isn't knowing everything. The important thing is gaining experience so that which you don't know grows smaller. Books can only get you so far down that path; eventually it becomes faster to find the knowledge on your own.

Oh, also: don't be proud. The best of us write horrible code from time to time. If someone tells you that your code is bad and can back it up with data and an alternative approach, be thankful for the advice. If they say it's bad and provide no other details, ask someone else and shrug it off if no one seems to know. There's some people that are only good for tearing other people down.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #8  
Old 04-26-2011, 05:05 PM
NewVBProgrammer NewVBProgrammer is offline
Centurion
 
Join Date: Jul 2010
Location: Grand Manan
Posts: 163
Default

I think if and when I get there, direct x is going to be the way to go. There seems to be more support in that area. More books, more people using it. Better chance of getting help. First I gotta slow my role, and finish what I'm working on, haha.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Interested in game development
Interested in game development
Interested in game development Interested in game development
Interested in game development
Interested in game development
Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development Interested in game development
Interested in game development
Interested in game development
 
Interested in game development
Interested in game development
 
-->