Important alert: (current site time 7/15/2013 9:10:59 AM EDT)
 

winzip icon

The 2D Game Engine (Scroller, like Pokemon)

Email
Submitted on: 5/6/2005 1:08:00 AM
By: DanDaMan 
Level: Advanced
User Rating: By 12 Users
Compatibility: VB.NET
Views: 29888
author picture
(About the author)
 
     My game is a tile based game, where you control a man that walks around the screen. It was created for a school project. Before this project, I had never worked with VB.NET's GDI+ components. This project is created from scratch, and was inspired from http://www.vbprogramming.8k.com/tutorials/RPGProgramming.htm . Since VB.NET is relatively new, there are very few games for it. I found it quite difficult to create something with almost no other sources. I hope you enjoy and learn from this code, for it was quite difficult to write. This program does not use external API's like other mini games I have seen. It uses the e.Graphics of a form. This program will teach you how to use classes, how to access a form from a class without creating a new one, and much more! Changes: Main change is the engine. I created a loop with doevents, invalidate, and sleep, whereas the old program would simply react upon pressing a button. My game creates a bitmap in memory and prints the smaller tiles all to it, in the correct order and position as the map file shows. Instead of a loop to print each tile seperately every frame, it simply prints this one background once. Instead of Passable TRUE OR FALSE tiles, I changed the map file to speeds, so that different tiles would make you walk different speeds, ie. tall grass (slower) and a street (faster). Some smaller changes... I would still like to thank the tutorials at vbprogramming (see link in text above). This code is not copy-pasted. It is created from scratch upon the ideas of another programmer. Please vote! Thanks!!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/6/2005 2:39:13 AMDanDaMan

Please feel free to comment and/or vote!
(If this comment was disrespectful, please report it.)

 
5/7/2005 1:50:07 PMXeon Productions

This code is pretty cool, I found a bug, if you go diagnal, you can somehow set the collision of the map off base....and walk thought certain tiles and other strange effects.
(If this comment was disrespectful, please report it.)

 
5/8/2005 11:59:21 AMjoejoe

Nice work !
(If this comment was disrespectful, please report it.)

 
5/8/2005 10:00:25 PMDanDaMan

Hmm, Xeon. I'll take a look into it. Thanks!
(If this comment was disrespectful, please report it.)

 
5/9/2005 10:53:26 AMSyed Muhammad Fahad

Nice work... Keep it up!
(If this comment was disrespectful, please report it.)

 
5/11/2005 7:13:12 AMComander()

i liked the idea so am gonna give ya 5
(If this comment was disrespectful, please report it.)

 
5/18/2005 9:26:01 PMVisionForce

Marvelous work, dan ol' boy! I do feel inspired by your work. I believe I shall have to make an engine of my own (don't worry, I shall not copy yours). I do think I shall make mine more like a "Game Maker" though. It should probably run off of four files for each game made. A game file, levels file, collision file, and AI file... all that rot. Oh, this shall be jolly fun! Be on the lookout for it; I shall call it "RPG Engine". Anyway, 5 "circles" from me, mate!
(If this comment was disrespectful, please report it.)

 
5/20/2005 12:53:57 AMDanDaMan

Thanks! Glad to help. Much of the coding was self inspired because there are barely any games in VB.NET that actually use its advancements
(If this comment was disrespectful, please report it.)

 
5/25/2005 11:52:56 AMVisionForce

I've pretty well neary finished my RPG Engine, but I'm waiting 'til next month to upload so that they're won't be any competition between us ;-) You have the coolest game, mate!
(If this comment was disrespectful, please report it.)

 
5/25/2005 11:53:50 AMVisionForce

there not they're* lol
(If this comment was disrespectful, please report it.)

 
5/25/2005 10:18:00 PMDanDaMan

Hehe. Thanks! Cant wait to see your RPG engine!
(If this comment was disrespectful, please report it.)

 
7/4/2005 2:11:46 PMVisionForce

RPG Engine was released here in the .NET section. (you were the first to know) ;-)
(If this comment was disrespectful, please report it.)

 
10/17/2005 12:29:55 AMMatthew D. Cummings

I cant get the guy to move in the finel exsample. The original works fine thou, any sugesstions. He does turn, but doesn't move to another square.
(If this comment was disrespectful, please report it.)

 
12/27/2007 12:28:19 PMSangre

This code is alone a sample, no engine but i appraise your animus. Study up, go.....go....
(If this comment was disrespectful, please report it.)

 
12/27/2007 12:34:02 PMSangre

Upgrade your work with bug fixed and better him. Come....the user is not contents? fight it.
(If this comment was disrespectful, please report it.)

 
2/19/2008 4:24:45 AMVatec

It's nice but it has some bugs... :S
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.