Register new account
Edit account
Search

Ancient Domains Of Mystery, forum overview / Roguelike / Tryin to start a new roguelike

Online users ( Unknown)
Application object not working properly at the moment, no clue who is online...

* Numbers in parentheses are the number of minutes since the user last loaded a page. Logged-in users time out after 40 minutes (unless they manually log out), lurkers and anonymous posters after 20.

This thread is 2 pages long.
Go to page 1 2
Apocalyptic
Registered user
Apocalypse of time


Last page view:

6855 days, 20 hours, 49 minutes and 23 seconds ago.
Posted on Wednesday, February 02, 2005 at 03:48 (GMT -5)

The maxnoofrooms is set at 20 before the loop so it'll keep doing the loop until maxnoofrooms equals 0.
Let the reaper come for me for when he does I shall make him play ADOM and he'll forget about me due to being addicted.
Apocalyptic
Registered user
Apocalypse of time


Last page view:

6855 days, 20 hours, 49 minutes and 23 seconds ago.
Posted on Wednesday, February 02, 2005 at 03:49 (GMT -5)

I'm going to half to throw that attempt out anyway and start on a new one. It locks up when I run it. I don't know why it's doing that but it has to be in the programming. I don't have any problem with it though since I learned a lot from this attempt.
Let the reaper come for me for when he does I shall make him play ADOM and he'll forget about me due to being addicted.
Twinge
Registered user
Communist in Disguise


Last page view:

5200 days, 21 hours, 59 minutes and 50 seconds ago.
Posted on Wednesday, February 02, 2005 at 14:24 (GMT -5)

you might want to use a for/next loop instead of a Do loop if you're going to have a regular increment/decrement in the loop.

For example...

For MaxRooms 20 to 0 Step -1
(Code)
Next MaxRooms
Apocalyptic
Registered user
Apocalypse of time


Last page view:

6855 days, 20 hours, 49 minutes and 23 seconds ago.
Posted on Wednesday, February 02, 2005 at 23:22 (GMT -5)

I hadn't thought of doing it that way but it will probably work out better. Thanks for the tip.
Let the reaper come for me for when he does I shall make him play ADOM and he'll forget about me due to being addicted.
Apocalyptic
Registered user
Apocalypse of time


Last page view:

6855 days, 20 hours, 49 minutes and 23 seconds ago.
Posted on Monday, February 07, 2005 at 04:31 (GMT -5)

I finally got the dungeon generator working. Yes I've got random dungeons finally. Now I just have to make it so that the character can move on the screen. I figured I'd do that in the keypress event but it's not working out. Oh well back to work.
Let the reaper come for me for when he does I shall make him play ADOM and he'll forget about me due to being addicted.
Apocalyptic
Registered user
Apocalypse of time


Last page view:

6855 days, 20 hours, 49 minutes and 23 seconds ago.
Posted on Monday, February 07, 2005 at 10:30 (GMT -5)

The next problem I've ran into is moving the character across the screen. It's not working out to well and any help is appreciated. For now I'm going to take a brake from the programming and do some research.
Let the reaper come for me for when he does I shall make him play ADOM and he'll forget about me due to being addicted.
JCool14
Unregistered user
Posted on Tuesday, April 05, 2005 at 11:33 (GMT -5)

Ok, I'm sorry if this has been pointed out (I got tired of reading). You're going to have a lot of trouble doing this in VB. It helps to have something more OO, such as C++ or Java. But, if you must continue, storing values for x and y is easy. I'm pretty sure you can make your own types (TYPE PlayerType) and put in variables such as these:

DIM px,py,opx,opy AS INTEGER

I haven't used VB in a while so you'll have to change this to your situation. Now when a character moves, first save the value at px (player x) into opx (old player x) and the same for py. Then update px and py to whatever the player inputed (like if he/she pressed up, then py = py - 1) and check if that is a valid square, if it is, then move there. If it isn't, then change the px and py to their old cooridanates. Also for the map, use a multi-dimensional array to store the type of square for each coor. on the map. Make sense?
JCool14
Unregistered user
Posted on Tuesday, April 05, 2005 at 11:41 (GMT -5)

Oh, sorry, I notice now you got that worked out. Well, good luck. I'll try to think of something for your current problem.
JCool14
Registered user

Last page view:

6522 days, 13 hours, 24 minutes and 59 seconds ago.
Posted on Tuesday, April 05, 2005 at 14:39 (GMT -5)

Alright, what you need is a game loop. A
WHILE gameQ = False
loop. The gameQ variable is the boolean that says wether or not to quit the game. Simple enough. Now, every turn, check to see what the last button pressed by the user was, such as arrow keys, or maybe an attack button, your choice. The store that value in another variable. Here could be some tidbits of code you might use(again, I haven't used VB in a while now, so bare with me)

WHILE gameQ = FALSE
SELECT CASE Inkey$
Case 1: keyPressed = UP
Case 2: keyPressed = LEFT
Case 3: keyPressed = RIGHT
...
Case 20: keyPressed = Q
...
END SELECT


doAction (keyPressed)
LOOP
Something like that. By the way, you'll have to replace the case numbers with the appropriate letter, or chr$(###), the ### being the ASCII character key. Hope this helps.




[Edited 1 time, last edit on 4/5/2005 at 14:41 (GMT -5) by JCool14]
demented_yam
Registered user
yaaarrrrrghhhh!


Last page view:

6948 days, 14 hours, 47 minutes and 52 seconds ago.
Posted on Tuesday, April 05, 2005 at 21:21 (GMT -5)

"Ok, I'm sorry if this has been pointed out (I got tired of reading). You're going to have a lot of trouble doing this in VB. It helps to have something more OO, such as C++ or Java"

i don't think it really needs to be object oriented for this.

hell, pascal isn't and i'm doing fine with mine
JCool14
Registered user

Last page view:

6522 days, 13 hours, 24 minutes and 59 seconds ago.
Posted on Tuesday, April 05, 2005 at 23:59 (GMT -5)

I said it'd be "helpfull". Doesn't mean it has to be. Heck, I was doing one in Qbasic.
tongHoAnh
Unregistered user
Posted on Wednesday, April 06, 2005 at 06:35 (GMT -5)

I'm doing one on Java. Actually, Java (and C) is the only language I can make anything proper out of it. I didnt tackle with map generator yet, my design simply put a question mark on that section. The question is, how to make corridors?
tongHoAnh
Unregistered user
Posted on Wednesday, April 06, 2005 at 06:37 (GMT -5)

btw, I highly recommend u guys subcribing to rogulike development newsgroup. The frequently pop up neat solutions.
Go to page 1 2

Color mixer:
Red: Green: Blue: HTML color code: result:      
Your Name: Check to login:

Your Message:


Read the
formating help
Are you a spambot? Yes No Maybe Huh?
Create poll? Yes No   What is this?
Poll question: