Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / scolling bars

Author
Message
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 26th Dec 2003 05:57 Edited at: 26th Dec 2003 06:05
i need to get the same effect as this

http://www.geocities.com/deathlink84095/war2.JPG
(hrm...dont know if image is working. its just a screenshot of the WAR2 editor)
any ideas? i dont nessesarly need it to be scroll bars. but something like if up arrow then move screen up...etc...

heres what a little of my code will look like


so basically what it does is check in each array position for what int is storred in it, and it will display differnt images depending on what the number is. and eventually making a 2d map of sorts. so i need suggestions for scolling effects. thnx

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 26th Dec 2003 11:11
Simple...



Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 26th Dec 2003 22:30 Edited at: 26th Dec 2003 22:33
thanx JessT. aparently, if you "paste image" it doesnt move with the camera...but i was going to change them to plains anyways...

JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 26th Dec 2003 22:35 Edited at: 26th Dec 2003 22:39
crap...i just realized something:
if i use plains, i will have to make tonz of plains...should i just make as many plains as i need across?
heres my code:


any suggestions on what i should do? i dont want this to be a huge map editor, just a simple 2d map editor. it will export the information from the numbers stored in each cordanant of the map so the text file would look something like this:


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Dec 2003 04:28
Um, if you're trying to get the same effect as the War2 editor, what I would do would be to make a matrix ( a flat one ) that has a size denoted by the input gained at the start of your editor.

Ie,;


And then, where you have paste image, just texture the matrix tile.
ie:


That way, all the matrix tiles are textured with the selected image. And you can see them all by using the camera movement that I provided.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 27th Dec 2003 04:29
ok, sounds good. but how would i export them? could i do that in the array?

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Dec 2003 04:52 Edited at: 27th Dec 2003 04:53
Indeed you can.


Then all you have to figure out is the load function ( which will be a bit harder. )

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 27th Dec 2003 21:52
lol, i just figured out why someone would need to know how big a array is...

i think i know how i will do the load

JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 27th Dec 2003 23:53
i am having a problem with my code.


it wont let me start with 2 (dirt) i dont understand why not. it works perfectly with 1. so i dont know whats up. any help? it says "matrix tiles doesnt exist" or something lik ethat

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Dec 2003 07:41
I'm not 100% surem but I think it has to do with were you have:


It should be:


But, don't hold me to my word, I may not be correct.

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 29th Dec 2003 08:18
i actually took that out all together...just found it is needless, im jsut going to have it start with a blank matrix

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Dec 2003 08:35
Lol, ok...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-06-07 02:52:26
Your offset time is: 2025-06-07 02:52:26