Functions: break to maintain small size?
Yes! less than 1 page!
 38%  [ 5 ]
No. wasteful.
 61%  [ 8 ]
Total Votes : 13

Komak57 wrote:
...(though i changed the language to make it fast(much))...

Kllrnohj wrote:
You DO realize that VB will be MUCH slower than C/C++?

Yeah, I think I'm gonna go with Kllrnohj on this one. VB tends to b emuch less optimized - it goes VB compiled into C/C++, compiled into assembly. the added layer of compilation makes it a great deal slower.
And it adds alot of extra checking (array bounds checking, string length management, etc...)
Indeed. VB = argh. I hope you'll reconsider moving back to C or some variation thereof.
I don't know VB
Neither do I. I started out with C++. I guess I've never been interested in learning VB.
I know VB6 (a little), and it is an ok language, but I think C/C++ is better (though I don't know any of it really).
So anyway, back on topic for VB since that's what he seems to be using for now. Any idea on how to repair Komak's program?
i think yall have completely lost track of where i started to where im going.... i started on GBA-C++ ... its very slow... somewhere around as slow as forcing a game to run on a processor slower than its minimum requirements... it runs about 60 f/s (if its going well) and the processor on it isnt much faster than the TI-83 p's.... now im in VB... where im making a basic version that will just ... i dunno... WORK... the GBA-C++ was so slow and sometimes the code didnt come out to what should have happened... in VB i can pause, show all the values, and continue... i can even make a mini-map to show me whats going wrong... i know VB is slower than C++ but if you read my post... i plan on finishing it in VB, then moving on to C/C++ once ive got the coding down... thats what i started on the Calculator... it was so slow and difficult... if it made 1 mistake, i didnt know how to fix it... the values were WAY off... a lot further off than they should have been... so then i moved to GBA cuz i had 2 programs obtained from tutorial sites... they gave me some b/g info on what i really needed to do, but i noticed that the GBA coding was.... a bit off... what you tell it to do, may not do what its supposed to... the coding has to be exact (very difficult seeing as your dealing with some huge codes)... now.. in VB, it shows me everything i do/did wrong... and it will help me out when i want to make it internet based (which will happen in due time) heres my planning so far:

1) Program a solid view so that you can see what you should see
2) make it to where you can move and change angles (left and right viewing) without issues
3) change the size of the map and add obstacles (stray walls) and debug further
4) change map type to cube(from square) to change from the wolfenstein style to more of the new game...
5) obtain a 4 way viewing instead of a 2 way (left right up and down)
6) change values of walls from 0(empty) and 1(wall) to more values and use as color codes
7) increase the size of the map and give a view limit, where you can only see so far ahead (increases speed and will help in next step)
Cool add fake char points into the map and create a recognizer for where that char is
*is the char within your range
*which angle do you see the other char
*draw a picture depending on which angle your looking from and what char the player has chosen
9) use home server to create and test the abilities of off-computer players and start testing for buggs..

next steps include translating to C++ and learning how to put it in an online server and then creating some actual gameplay and chatting abilities... at step 9, all one will be able to do is see the (NPC's) that have been put in, and other players that are walking around... in order to communicate, you would have to either be talking to them via aim or having 2+ comps in the same room...
So you are prototyping it in VB because your C++ sucks? (hehe, Just Joking about the sucks part) Thats cool, I do that with Python all the time Smile My VB is horrible (mainly because I think its a worthless language that without MS's gigantic backing would have been laughed out of the computer world)
im not saying C++ sux or anything NEAR that... personally, i think c++ is the best language to program IN.... but my skills at it arent too well... so im proto-typing in a language im very familiar with... ^.^ GO C++ ....

anyways... back to my current issues.... my main issue... is that VB's Trig functions require Radian angles and gives Radian answers... all of what i do requires Degree measurements... TI devices easily swap between them... anywhos... im substituting with an array since it wont do Deg-Rad translations... anyhowhoots... im getting the distances from each wall like i should... only problem is when i try to get the height of the wall... im getting the height of each wall at each angle like i should... but its like your looking STRAIGHT at it... instead of at an angle... if you looked straight at a wall, the point you looked at would be the biggest on that wall... however... by using the formula i am using right now.. it looks something like this:


______       ________

where in reality it should look like this:


....-       -....

the walls/view point is this:


  |                 |
  \                 /
  | .           .   |
  |    .     .      |
  |       X         |
  |                 |
  |                 |

the code i use to find the distance is this:


[ { dist from wall touched / Cos(angle to point on wall) } = Dist From Wall ]

and the code i use to find the height of the wall is very similar


[ { Tan(how high you can see) * Dist From Wall } = Height ]

somewhere in the height formula, i need to change values or the entire thing... because im getting the wrong drawings... since the room is flat, there are no upper levels... it doesnt have to become more complicated than finding out what the height... however... i need to find out what formula i should use... it would be greatly appreciated... keep in mind, i dont care what language you can do it in, i just want the basic math formula for it ^.^ so try to make it as basic as simple... since we all SHOULD know TI basic, just write it in that language... that should make it easy for me to rewrite... sry if the images are a lil off...
WOOHOOOO... ive DONE it ^.^ i completely debugged the first step.... i can turn and move within the area... my next step will be to increase the size of the map from the 1 open square on a 3x3 map to many in a 10x10 map... even add some obstacles when i get that done... i spent 8 straight hours making huge progress... the last time i spoke, it was giving me incorrect distances at the correct angles... within an hour i successfully got the distance to each wall, and found out how to make it a perspective view instead of a distance view ^.^ (a lot more simple than i had thought) anywhos... then i decided to use MSExcel to make arrays for Sin/Cos/Tan but in learning how to do it in Excel, i learned how to swap to Degrees/Radians ^.^ so im no longer using hand-writen arrays for trig functions... ^.^ anywhos... that made it a hell of a lot easier to complete the next task.... moving (viewing was simple... i had already been building it to change view, just hadnt gotten around to implementing it) moving was a lil wacked at first... but after a few more hours of debugging, its complete... my 1x1 square room with me in it ^.^ anywhos... heres a screeny of the VB Proggy of what it is so far >.<

all of it works... you move in a straight line (0.1 squares in distance) in whatever angle your looking at, and you cannot move into a square that doesnt have a 0 value (0 = empty, 1 = black wall), there are no errors at this time... my next step includes increasing the map size, adding more programming to make it keep searching for a wall... anywhos, have fun with the screeny till then ^.^
I like! Can you look at the wall at an angle other than increments of ninety degrees? In other words, do you have free rotation?
absolutely... as i stated, you are bug-free and able to move at any angle and move forward at any angle 0.1 units forward and turn 2 degrees at a time(will change when the area gets bigger and you really need to move...) there are no issues with the program at this time... the code is a lot shorter than i expected... there are only a few issues im thinking about... 1 is the render-walls method im using... im using a timer to draw out the screen degree by degree... the left side looks awesome, but then you see it get to the right side and it fades much too fast for you to see it well... i had to stop the rendering in order for you to see the full wall how it should look... there has been the idea of making a new timer go off for each degree.... but that will end up being a TON of timers and i dont know how to make VB program new timers on the fly... i know how to create them, its just a matter of telling it what to do that becomes the issue... anyways, dont need to go that far, im just going to make it read a bigger map, then ima try to throw it into C++ as well as i can, for now, i dont need any1s help, but not too long from now, ill need some good C/C++ programmers to help me translate it out >.<
Wait, why are you using a timer? Games run in a loop, there isn't any timer involved. Get rid of that timer crap. If you want the GUI to not block (as in you can still push the buttons) while "playing", just call DoEvents every game loop
OH YEAH... i remember doevents... i just completely forgot about it >.< heh... tanx alot ^.^
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 4 of 4
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum