|
-
Jan 3rd, 2002, 08:21 AM
#1
Help in Tile programming
Hi,
I'm totally new in game programming, but i've started my own "Sim city like" game, and of course I'v encounted a lot of problems...
Iwas using a set of control array (ex: ima(1), ima(2), ima(3),etc..) to draw my map...
Something like this :
_ _ _ _
|_|_|_|_|
|_|_|_|_|
|_|_|_|_|
but... this method isn't really good because I need 3 or 4 grid like this...
Someone Can help me? I'm searching for a good tile engine..with a "on click", "on mouse move"...
I'm also searching for any tuts on graphics in vb...
Thanx a lot.
-
Jan 3rd, 2002, 08:37 AM
#2
hey, im working on exactly the same type of game (except it is an rpg). i am using tiles that i pull out of one or two big bitmaps by using an API call, BitBlt. BitBlt just transfers one chunk of a picture over to a location in the computer's memory. Starting this sort of project is gonna take a lot of time and learning, especially if you are a beginner like me
i can't explain bitblt or how i do this, but there are some good tutorials out there (well, sort of). none of them have the exact answers, but heres a few:
http://vbden.tripod.com/articles/invmask.htm (sastraxi's )
http://rookscape.com/vbgaming/GBeebe/bitblt.php
http://fox.acky.net/vb/english/codin...ial/index.html
the last one is probably the best one for a beginner. if you have any specific questions, just post back!
-
Jan 3rd, 2002, 09:21 AM
#3
Frenzied Member
Just think of the carrier weasels.
-
Jan 3rd, 2002, 10:09 AM
#4
Thanx vshammas
The Last tut was really cool...
And you said you that u r making a rpg... interesting...
-
Jan 3rd, 2002, 11:27 AM
#5
numtel: huh?
craky2ooo: so far i have made an outdoor map and town map all with different tiles (if you want FREE tiles go to http://www.vbexplorer.com/charpack1.asp and download their free graphics pack (extras.zip)). you can enter the town and buy weapons, then fight lots of different monsters in an arena. if you win in the arena you get more gold to buy better equipment. it also has an experience type of thing, where each time the player kills a monster, he gains xp (experience points) and can go up a level to get better strength,dexterity, and hitpoitns. its a lot of work, but lots of fun! 
if anybody has any example source code for a tile-based rpg, please post it!! it would be of great help to everyone i think...
-
Jan 3rd, 2002, 01:05 PM
#6
Yeah, that's will be a great idea if we group as much as possible Tuts, sources and examples on tile based game...
If someone can help...
Me, I'm actually a bit " " on tile programming... i've seen what we can do with blitting... Need work
-
Jan 3rd, 2002, 01:51 PM
#7
i heard talk about a portal on visual basic game programming, but nothing seems to be happening. i can make a real quick webpage (done a lot of work with webdesign before) with links and source + maybe some tutorials if people keep writing, then ill post the link here. will work on it tonight (its 19:55) here right now, and maybe post tomorrow morning,depending on how quickly i can get webspace. if someone would like to donate a small chunk (1 megabyte?) then id happily accept!
thanks! post links if you find anything of value !
-
Jan 3rd, 2002, 05:36 PM
#8
ok, got this "portal" up and running now. i just took a bunch of links and organised them a bit. add more if people submit to the email address provided at the bottom of the page. looks kinda ****, but it took me about 30 minutes so....
anyway here it is: http://www.victorswebdesign.f2s.com/vblinks/
enjoy!
-
Jan 3rd, 2002, 06:00 PM
#9
Good Ol' Platypus
I've got a tutorial (albeit unfinished) that is about DirectDraw. I'll give you the link but it isn't in the most recent condition (or good HTML, I converted to HTML from Word, but I swear that function of MSW will never be used again). I need to change some stuff, a lot of stuff, and it's in my local copy.
http://vbden.tripod.com/ddc.htm
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jan 3rd, 2002, 06:35 PM
#10
reading it now, looks great. never done anything with directx before so this is a good introduction. will add it to the DirectX section tomorrow. have to read some stuff on c++ and then your tutorial so dont have time right now.
thanks!
-
Jan 3rd, 2002, 09:49 PM
#11
New Member
I'm currently working on a tile-based RPG myself. Right now I'm adapting a sample tile engine I got from a tutorial, just to get a good feel for making them. I've run into a problem, though. Ever since I animated the character, there has been a memory leak somewhere in the code. And, being relatively new to this, I can't figure out what's causing it.
I'd ask that anyone that thinks that they may be able to help, download my program and see if they can figure out what's causing the leak, and hopefully be able to fix it. I'd be very grateful if anyone could help, cause it's really annoying me. Btw, I found the tutorial at www.vbexplorer.com, in their tutorial section. It was quite helpful to me, and I think it would help you learn how to make tile-based games.
Here's my program to look at, but I warn that if you run it for too long (more than maybe 30 seconds) the character will dissapear and you'll be very low on memory and likely have to restart.
Thanks to anyone who can help.
Last edited by Sunfire785; Jan 3rd, 2002 at 09:57 PM.
-
Jan 4th, 2002, 01:27 AM
#12
Ok...
Vshammas, It's a really good idea... I have a web.. if ya want, I can give you some space (3MG+)
And for the RPG games, i havn't test it yet... but it may be something, with the array... that really use a lot of memory... all I know is that you have to clear all array when you don't used them
Hope it will help...
-
Jan 4th, 2002, 01:30 AM
#13
Hey ...
I know now how to use BitBlt (huraa) but this fuction is just and only graphical... hehe...
We can catch any event with it
for example, if I want to catch the mouse move envent on a little garphic I draw with bitblt, how can I do this?
-
Jan 4th, 2002, 07:04 AM
#14
what do you mean by "catching the event"?
oh, if the webspace that you can give is easier to remember than
http://www.victorswebdesign.f2s.com/vblinks/ then please send me the ftp info by email and ill upload it there! thanks!!!!
-
Jan 5th, 2002, 01:31 AM
#15
My web is http://liquid2k.com/crk,
When I said Catch the even... is for example... I'v just draw a little Pic on my form with the Bitblt function... for now, that's ok... but now I want to "for example move the pic" when I click on it... or to swap pictures when I move the mouse on it...
You see what I want to know?
-
Jan 5th, 2002, 01:34 PM
#16
i think if you want to move the picture you do this:
go to the click event of the picture and type in:
Picture1.left=picture1.left+10 or whatever to move the picture to the left, but it's probably best if you make 4 command buttons each representing a key on your keyboard and then having them add or subtract to the picture1.left or picture1.top . better yet you could use the API GetAsyncKeyState to find if the user has pressed any of the four buttons. more information at www.allapi.net . good luck...
-
Jan 5th, 2002, 08:15 PM
#17
New Member
Has anyone found a reason/fix for the problems with my RPG? I still can't get it to work right, and it's quite frustrating. Thanks to anyone who can help me.
-
Jan 6th, 2002, 05:18 AM
#18
Sunfire, sorry but there is no problem when I run your app...
-
Jan 6th, 2002, 05:23 AM
#19
you havn't understand what i want to do...
I dont want to move a picturebox or Image control...
I wantr to MOVE or do something else with a pic that was drawn with the bitblt function...
Understand?
-
Jan 6th, 2002, 09:24 AM
#20
well it's not that different! here's the code i use. player.x and player.y is the coordinate location of the player..
ex:
'checks if the tile the player is moving to is set to "Blocked"
If GetAsyncKeyState(37) <> 0 Then ' left key
If tileInfo(mapArray(player.x - 1, player.y)).Blocked = True Then
player.x = player.x
ElseIf tileInfo(mapArray(player.x - 1, player.y)).Blocked = False Then
player.x = player.x - 1 'move player left
End If
End If
of course you have to have a loop that constantly blits the player icon to the new location on the mapArray. hope that helps...
-
Jan 6th, 2002, 12:40 PM
#21
New Member
craky2ooo, what kind of system are you using? it might just be that your coimputer is a whole lot better than any of the ones i've tried my program on. oh well, i guess i'll just have to try harder.
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
|