Game Programming - Detect The Collision Of NPC's That Load Onto 2d Tile Map From Text File

Jun 25, 2009

I have a question about collision, yes my 2d tile rpg's map collision works just fine, but im having trouble with the collision with my npc's. At the start of the game it loads all the map data from a text file. well it also loads the location and other stuff about the npc's onto the map from a text file. how do i detect the collision of the npc's that were loaded from the text file, i could do collision with hardcoded npc's but i want to avoid hardcoding the game content into the game engine. RESTATING MY QUESTION: How do i detect the collision of NPC's that i load onto my 2d tile map from text file?

View 6 Replies


ADVERTISEMENT

Game Programming :: Collision Detection For Tile RPG

Feb 25, 2012

I'm trying ot make a top down rpg, or pokemon like game, but I can't find any proper tutorials for collision detection. I have found one, but when I did it it doesn't seem to work properly, and I get errors everytime I go to the edge of the form. What I can do to make good collision detection for walls?

HTML Code:
Public Class Form1
Public Level1 As New clsLevel()
Public Dude As New clsSprite(Level1)
Dim CanWalk As Boolean = True
[Code] ......

View 1 Replies

Game Programming :: Detect A Collision With The Edge Of A Form

Oct 2, 2009

I am currently investigating vb gaming and have set up a test project to move an object; it moves fine. The problem is that when it reaches the edge of the form it continues to move and eventually leaves the form entirely. So my question is how do i work out if my object has touched the edge of the form?

View 5 Replies

Game Programming :: Mario Like Jump In Tile Engine

Jan 24, 2012

I have a very basic tiling engine that was made from a YouTube tutorial for making an top down RPG style game and I am trying to adapt it to a platformer game. The code is fairly simple but not being a physics guy I am looking for adding a Mario style jump to the program. I know there will most likely need to be some additional variables added to it such as gravity and velocity. That said I am not sure where to get started, below is the meet and potatoes so to speak of the program.

Code:
' VIEW PORT
Dim ResWidth As Integer = 750
Dim ResHeight As Integer = 550
Dim TileSize As Integer = 32
' GRAPHICS VARIABLES
[Code] ......

View 1 Replies

Game Programming :: DirectX Collision Detection?

Aug 11, 2010

I have loaded two mesh's from .x files onto the screen, a map and a sprite. The sprite moves around, but because they aren't colliding the sprite goes straight through the mountains, and straight over the undulations. I have looked for a way to find the co-ordinates of a particular spot on the mesh, as I figured by finding the X and Z co-ordinates of the sprite, I could just set his Y co-ordinate to be the same as the map, and he would 'stick' to the ground... however I don't know if this is possible, and I haven't found it yet.

View 7 Replies

Detect Collision For A Game In Program?

Aug 5, 2010

How to detect collision for a game in vb.net ( i using picturebox for every thing ).

View 1 Replies

Game Programming :: Multiple Platform Collision Detection

Jan 12, 2010

Lately I have been making a platformer game, just to experiment and see how it would work, and after making two very basic levels I realized that it would take a lot of code to include several or more platforms.

[Code]...

View 4 Replies

Game Programming :: VB2008 - Space Invader Collision Detection?

Dec 28, 2010

i've looked up several tutorials on what i should do to create a collision detection, but im not too positive on how to function my ideas and convert them to code.Basically, i'm creating a space invaders like-game that is 2D Mario-themed (sprites used).I am using a panel for my enemies and Mario is being controlled by the movement of arrow keys and space button shoots.The problem is I can not make my bullets collide with the enemies to make them disappear. This piece of code is what i've got so far with the collision detection :

Code:
'*******************************************************************************************************************************************************
' Collision occurs whenever the pctShoot(podoboo) hits any of the enemy
' When blnTrue, both pctShoot and the enemy disappear

[code].....

While I'm at it, i have another question in concern; but this is not really related to collision but:How do you make an object move down automatically using a timer but make it appear randomly?Like any space invader game, the enemies are shooting back at the hero to make it appear more challenging right?(using Visual Basic 2008)

View 10 Replies

Game Programming :: Object Detect By Cursor

Oct 13, 2008

(Visual Studio 2008 - Visual Basic 2008 - 3.5 .Net Framework) I have few objects on my form and i would to like scan objects' names by my cursor. I wish to get name of object, which is under my cursor. (only one object is under cursor, and form)..

View 2 Replies

Game Programming :: Object Detect By Cursor?

Jun 7, 2011

I have few objects on my form and i would to like scan objects' names by my cursor. Bad english, so again: I wish to get name of object, which is under my cursor. (only one object is under cursor, and form)

View 1 Replies

Game Programming :: How To Read A Random Line Is A Text File

May 25, 2010

I want to read a random line (that I've chosen via random number) in a text file. I want to the system IO reader. But I am confused as to how to read a random line. Here's what I have...

[Code]...

View 10 Replies

Game Programming :: Selecting Random Number Of Lines From Text File?

Jan 12, 2012

Im making a text based game that i need to randomly select different numbers of lines from a text file then pass them to a list box. The text file is made in the following format:

20058,v,o,ED,95
20059,v,o,TI,95
20060,v,o,TI,95
20061,v,o,SL,95

First the code needes to identify the 4th element then randomly select lines from lines that contain that element. Im stuck on how to randomly select lines from that list.This is the code i have so far.

[Code]...

View 5 Replies

Game Programming :: Prevent Users Typing In Random Letters In A Text Box-Scrabble Game?

May 4, 2011

I have created a scrabble game that generates random letters. For the user to type in a word using the random letters they have to type it in a text box.

I want my program to prevent users from typing in letters that are not provided in the text box and to allow them to type in the random letters that are provided.

View 4 Replies

Game Programming :: Getting A Highscore To Save And Load Using My.Settings

May 20, 2011

I've tried to implement this highscore saving feature, so that when my application closes, the highscore saves within the my.settings storage function, and when my program loads up again, the same highscore loads up from this file. atm, it works ONLY within the application (I can close forms and it's still there, but if i end the program it resets to 0 next time it's loaded).it's basically 2 lines of code..1 for saving and 1 for loading..is this the best way to save a highscore for a game? I was initially thinking of making a database and linking it to that, but apprantly it's easier with the My.settings. even thought of using stremawriter but it's more uneccessary work over my.settings.[code]

View 7 Replies

Game Programming :: Searching For A Name (text)?

Nov 27, 2010

I know this is my first post and Im very sorry its a question right away. I apologize for this, but I felt that I have to ask, I was searching all over and couldnt find answer, probably I just need help to define the keywords..searching for a name of a monster in some game and move the mouse onto it. Example: In middle of the screen, there is monster named: AAA I would need the program to search for the name "AAA" and move the mouse onto it.

View 2 Replies

Game Programming :: When Accessing Form2, Text Is Selected?

Jul 23, 2008

I am creating a game with VB2005. On Form2 I have placed a textbox containing the Rules for the Game. When I click on Rules from the Menu in Form1, Form2 opens and displays the information, but the text is selected (highlighted blue) what have I done?

View 6 Replies

Bitmap Manipulation In A Tile Game?

Apr 21, 2009

Essentially I have a half text/half graphical tile game that has a level designer. I have several sets of tiles, all of which are bunched together in one file. I'd like to read a certain 32x32 square of said bitmap, and display only that portion on specified area of the screen. I know GDI+ enough to get the display going, so I just need help with reading the specified portion of the image from the bitmap.

View 4 Replies

Detect A Collision In A Maze?

Apr 4, 2012

I'm building a maze application in visual basic. The game relies on two variables, X and Y which are integers. There's a timer which basically invalidates the whole form for a redraw. Now my question is, that there are various squares and rectangles dotted around the form. How would I create a handler, or something as such to detect if the square that the form draws is touching these objects?[code]...

View 1 Replies

Tile Game: Converting Pixels To X/y Coords

May 5, 2009

So now I'm working on the map editor for my game. The map itself displays 32x32 pixels out from the upper and left bounds of the form. Each tile is also 32x32. So then i have two labels which display the corresponding coordinates divided by 32, this way it would show you x: 7, Y: 8, or whatever. The issue is that the map will be like 15x10, and when moving the mouse to the 15th row/column, it shows 15, but then moving to the 14th row, still shows 15. The rest of it works fine. Here is the code.

Private Sub FrmDesign_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If e.X < (subZone.Width * 32) + 32 And e.X > ((subZone.Width * 32) -

[Code]....

View 3 Replies

Game Programming :: Simple File Error

Aug 16, 2009

I am making a little game for my friend in Visual Basic 2008. It uses 3 files (gamedataidname.txt, gamedataidlevel.txt, gamedataidgold.txt).

When the play button is clicked, I wrote some code to check if the file exists and display the content of the 3 files. This part works fine. But then I have a 'Else' statement to create the files.[code]...

View 6 Replies

Want To Make Text Based RPG Game Will 'upgrade' As Programming Knowledge Grows

Dec 12, 2011

Well this is a re-post now as nobody replied in the gaming section, and i believe this question could go as a normal VB question, therefore I'm asking in this category instead.I have decided to pick up on programming and want to make a text based RPG Game i will "upgrade" as my programming knowledge grows.I got some ideas that i think i should use, but i want you guys' opinions on it.I assume I'll use different classes for each monster, which will have properties.Should those monsters then be inside a list of all possible monsters, or would i have a monster class which i would use and generate the enemies when needed? And would i use the same approach on items and character stats?

View 4 Replies

Game Programming :: Make A Game In VB In Which Character Can Move Around, Jump, And Kill Things?

Apr 2, 2008

im trying to make a game in visual basic in which your character can move around, jump, and kill things. I can get the picture box with the character to move and everything is fine. but i did run into one problem. when the character moves over a tree (or something) you can see the gray backround of the character as i made in paint. how do i make the backround of the picturebox transparent?

View 4 Replies

Game Programming :: Adding Score To Rock Paper Scissor Game?

Oct 3, 2011

Im new to VB. how do I get to add the score.my code is

[Code]...

View 6 Replies

Game Programming :: Spinning Reel - Fruit Machine Game For Windows Mobile Device

Feb 16, 2011

I'm trying to make a simple fruit machine game for windows mobile device.

I can create the game easily enough and flip through pictures in a picture box to display the correct symbol.. but what I'd like to do is do a proper spinning reel, but have no idea where to even start.

What I have is a list of images in an imagelist (or individual files) - what I'd like is them attached to each other and moving downwards, preferably as though it were going around a drum but just them moving would be a start.

View 7 Replies

Game Programming :: Transparant Images - Make A Game Which Basiclly Lets You Shoot Ducks

Feb 1, 2010

I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.

My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.

Below is an image to illistrate my problem

I have tried adding transparent background, transparant key etc

View 2 Replies

Game Programming :: Pig Dice Game - When Program Runs - Never Goes To Computer's Turn And Does Not Update Users Score Either

Apr 18, 2012

On programming assignment without having any real experience in vb. I guess I don't understand subroutines that well. When the program runs it never goes to the computer's turn and does not update the users score either. This assignment is already in but would like to know what is going wrong. Using VB 2010, and this is windows application.

Code:
Public Class Form1
Dim Myturn As Integer
Dim Computerturn As Integer

[CODE]...

View 6 Replies

Game Programming :: Changing Field Size A Game Should Restart

Apr 30, 2011

Upon changing the field size a game should restart. Upon trying to do so I see the previous grid (e.g. 10x10) displayed on top of the new one (e.g. 4x4). How would I prevent this and indeed start the game fresh?

View 10 Replies

Game Programming :: Game With Jumping While Moving And Sensing Colour

Feb 4, 2011

So here is my problem. I have a vb game with animated sprites and all, and the character even jumps. However it only works in the y direction. So if i'm moving, he stops in place and jumps, instead of jumping forward. I was wondering if someone knew how to make him move at the same speed forward during the jump.

[Code]...

View 2 Replies

Game Programming :: High Score List For A Who Wants To Be A Millionaire Game?

Apr 19, 2011

I currently have a who wants to be a millionaire game that I have made in visual basic 2010. Each question is in its own form. Form1 opens at the start, and question 1 is opened by a button click on Form1. The user has to click on the picture box at the side to show the text for the question each time. If they answer incorrectly, it displays a message box, opens an input box asking for their name, and goes to the form with the high score list, Form17.

Upon opening Form17, I want the scores to load and be displayed in the list box. The high scores are saved in a text file at C: est.txt . Upon clicking menu or end, the high scores are saved to the text file.

View 2 Replies

Game Programming :: Writing A Video Poker Style Game ?

Apr 1, 2009

I m writing a video poker style game. the form consists of the player's 5 cards, a deal button, a hold button for each card, a button to select amount to play that hand. im using Visual Basic 2008 Express Edition.

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved