Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Game Programming > A simple 2d game


Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2005, 11:15 AM
MikeF MikeF is offline
Newcomer
 
Join Date: Dec 2005
Posts: 6
Unhappy A simple 2d game


Hello! In Computer Programming at my high school, we are currently studying Visual Basic. For a grade, we make programs to impress our teacher by using what we have learned thus far and branching out a little. I have made a simple tic-tac-toe game, a calculator, and some other programs that I have gotten inspiration from by looking at the Start >> Programs menu . But to the point.. For our last grade before the quarter ends, I'm hoping to make a 2d game. It's simple and corny, but I love programming! Yes, I am a geek but meh.. Here's what I have planned:

-No scrolling, because I have looked at some examples and it looks confusing, so it might just be a set of forms that display 10 32x32 tiles or something like that.

-The goal is to get to the end of the last level (of course)!
-However, there are things like pushable walls and switches you must use to get past the puzzles

But, there is a slight problem.. I have a rough idea on how to get the tiles on the screen and then have a way of seeing if something is a wall or whatnot, but it isn't efficient, and definatly not the simplest, but it was the first thing that came to my mind..

-Make a string array, and fill it with letters
-When the form loads, take the letters and place the tiles on the form and place the player's letter at the start*
-When the player moves, check to see that the letter in their direction isn't, let's say, a W for a wall.*

This might be simple, now that I take a look at it again, but anyways.. Are there any other ways that you can display tiles on either a picturebox or the form itself, and check to see if it's a wall when the character moves?

Thank you!
Mike
Reply With Quote
  #2  
Old 12-30-2005, 12:35 PM
jaden2001 jaden2001 is offline
Junior Contributor
 
Join Date: Apr 2005
Location: Albany, GA
Posts: 235
Default

Id say to start with these tutorials... They were great Help when I attempted a game...

http://www.xtremevbtalk.com/showthread.php?t=177598
http://www.xtremevbtalk.com/showthread.php?t=129548

Hope it helps
__________________
Da Vinci - "Sleep is but a waste of time"
Reply With Quote
  #3  
Old 12-30-2005, 05:41 PM
MikeF MikeF is offline
Newcomer
 
Join Date: Dec 2005
Posts: 6
Default

I did it! I finally understand the basics of BitBlt! Your links lead to one thing, then another, and now I'm back here! I don't know why I'm ecstatic at understanding how to draw things on the screen, but for some reason I am.. Now, do you (or anyone who might read this), know how I can check if a tile in the character's direction is a wall or whatever instead of using an if-else chain? I would greatly appreciate it, but I'm sure there are rescources out there to get help with it.

Thank you again!
Mike
Reply With Quote
  #4  
Old 12-31-2005, 11:57 AM
VB_Alien VB_Alien is offline
Contributor
 
Join Date: Apr 2004
Posts: 679
Default

I'm not sure if this is what your looking for but i made a little
demo map editor and game player. Game player is only used
to demonstrate the walkability of the tiles. Hope this helps.

***Edit***
Ooops. Forgot to upload my demo.

Edit by reboot: Far too late, but in the future, please don't give people code handouts for homework assignments.

Last edited by reboot; 01-10-2006 at 06:02 AM.
Reply With Quote
  #5  
Old 12-31-2005, 05:59 PM
MikeF MikeF is offline
Newcomer
 
Join Date: Dec 2005
Posts: 6
Default

You have no idea how much it helped! It even helped with a nasty little problem with how the tiles were placed.. Thank you again!
Reply With Quote
  #6  
Old 01-10-2006, 05:42 AM
Blue Magic Blue Magic is offline
Privileges Suspended
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 18
Default Hmmm...

If this is a school project and you are being graded for it then why are you asking for example projects because that wouldn't be your own source code.

You should try looking for 2D Game tutorials in Visual basic on Google or something...

Cheers,
Blue Magic.
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
 
 
-->