Author Topic: Basic FPS Wolfenstein  (Read 9203 times)

0 Members and 1 Guest are viewing this topic.

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Basic FPS Wolfenstein
« on: November 02, 2009, 08:19:48 am »
Ehrm so yeah, I just might make a game :P
I mean, I've been here for 4 months now, and I havn't contributed something of my own yet so..
OK, this might take a while ( maybe never gets finished either) c'z this would still be my first full program.
The only thing I have atm is a spash screen, don't get too excited, it's just 2 pictures changing in a loop, and a ClrDraw everytime x.x
But hey, let me nub mah own way  8)


actually, It does look a tiny little bit better on a real calc <_<

EDIT; YES I run it from MirageOS, Hell no it ain't asm/hybrid/whutever
just putted ::"Wolfenstein on the first line of code, things just look cooler when you open them from MirageOS  ;D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Basic FPS Wolfenstein
« Reply #1 on: November 02, 2009, 01:31:58 pm »
Looks nice, I can't wait until you have some more stuff, though, such as gameplay screenshot. Will you do it all text or will it be ASCII or graphical?

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #2 on: November 02, 2009, 01:41:45 pm »
Well, I'm going to make a First Person Shooter, so all graphical I'm afraid :P
I'm still looking at codes of other games first tho, I don't get a **** of how they use matrices to create maps, neither how they read 'em
I think it'l be a wire-enviroment, with pic-objects.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Basic FPS Wolfenstein
« Reply #3 on: November 02, 2009, 04:11:09 pm »
Ah ok I was not sure yet since before you wanted to make text games, I can't wait to see what you will come up with. Feel free to ask questions if you need help. TI-BASIC Developper or TI-Freakware tutorials can also be useful (altough the later is mostly for 2D games)

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #4 on: November 02, 2009, 04:51:50 pm »
yh, there appear to be no tut's on this <_<

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Basic FPS Wolfenstein
« Reply #5 on: November 02, 2009, 08:07:03 pm »
Usually, for BASIC fpses, it was nearly essential to use a matrix, altough it was possible to use strings at the huge cost of speed.

Basically, in a basic FPS, you had a variable for the direction you faced, one for your X pos and one for Y pos (another for Z position if your dungeons had multiple floors and ladders). If the direction var equalled 0 for example, the program displayed the appropriate tile for the northern path (a open passage or a wall), one for the western path (either a passage or a wall) and one for east. rotating right would increment the direction var value by 1 (then loops back to 0 if it was equal to 4), or vice versa. When facing east, it displayed the north path to the left of screen, the eastern part in the middle and the southern path to the right. And so on. Eventually I might write a small code for such thing.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #6 on: November 02, 2009, 08:35:00 pm »
Wow... I don't wanna even think about making the pics for them... I am really horrible drawer :D
Especially on calc

I hope to see more progress in this, Necro!


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Basic FPS Wolfenstein
« Reply #7 on: November 02, 2009, 09:03:36 pm »
Oh, usually we just use lines to startup. However, some people use pics for walls and doors

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #8 on: November 03, 2009, 02:15:54 am »
You could use list as a 3D matrix.

EDIT: or even 2D, what's the issue?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Basic FPS Wolfenstein
« Reply #9 on: November 03, 2009, 02:55:21 am »
Are lists faster to grab data from? (knowing  you would need to do a bit more maths like instead of [A](A,B) you would need to do L1(16A+B-16) or something like that? Plus I think with lists, there would barely be any size difference

Offline JoeyBelgier

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 545
  • Rating: +25/-21
  • Joey
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #10 on: November 03, 2009, 06:06:22 am »
I'm afraid pictures will be the easy part :p
also level making can't be too hard once the engine is done.

Anywho for today: I have once week of vacation (started this weekend), so today I'm going to use some of that time to learn some mathematics. I'm going to look at the matrices thing later this day.

Q: DJ, you said how it works but, I thought i'd also have to check 2tiles and 3tiles further to the north? no?
Might have misunderstood yr post tho but I dunno x.x

Offline simplethinker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 695
  • Rating: +16/-5
  • snjwffl
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #11 on: November 03, 2009, 08:53:35 am »
Are lists faster to grab data from? (knowing  you would need to do a bit more maths like instead of [A](A,B) you would need to do L1(16A+B-16) or something like that? Plus I think with lists, there would barely be any size difference
I just tested it (16000 reads of a 20x20 matrix/list) and reading from a matrix was 12% faster than from a list.  The matrix was also one byte smaller than the list.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Professor Robert Silensky



Chip's Challenge: ħ%

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #12 on: November 03, 2009, 09:56:04 am »
It does make sense that matrix is faster... Grabbing a number from the last number of the list will take time searching for it, while matrix will skip the whole rows/columns until it reaches the number...


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #13 on: November 03, 2009, 10:21:30 am »
Actualy, since Matrixes and Lists have fixed size, the only difference should be the difference in data type.

 If you make a 999 dimension List and access the very first element, it will take the same amount of time as accessing the 999'th element.  The lengths of each element are fixed, so the data is Random Access. (at least according to my tests) Strings on the other hand, sometimes have 1 byte tokens and sometimes have 2 byte tokens, so the TiOS is forced to search through the entire string for the one you want, which is one of the reasons strings are so slow.

Its interesting why Matrixes would be faster than a list, because in calculator memory, a matrix would be stored exactly the same as a list (calculators don't have 2d memory XD) so there must be some other thing that is giving the speed difference.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Basic FPS Wolfenstein
« Reply #14 on: November 03, 2009, 03:36:02 pm »
Oh... hmmm may be the calculation to get the number from list, like L1(16A+B), and such???


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*