• Advertisement
Sign in to follow this  

Please someone for some beginner pseudo code! yay

This topic is 3954 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I been studying a while and I always end up writing something like this down. ____________________________________________________________________________ If actions = functions then functions = swing, heal, defend if mobile units = classes then mobiles need 1 class looking kind of like this.. class mobile() HP=0 defence=0 Lvl=0 next lvl=1 functions swing heal defend _____________________________________________________________________________ As you can see im very newbie, but if i could get a grasp on just a basic world. A text game with 4x4 tile. I guess i need a game loop to start with but after i get my loop up and going by maybe a start command or something?? then what do i do? maybe print hail knight bla bla blah. choice (1,2) then maybe type in walk north and somehow the system knows to automatically load a function that throws a class moblile() out there to attack me? I just need some professional examples and how a text game is laid out in psudo code please. right now im way to new to be woried about any kind of graphics i just want a simple game loop and 4 x 4 world with my char and maybe 2 other mobile units. if someone could work with me and let me know how to go about this id greatly appreciate it.

Share this post


Link to post
Share on other sites
Advertisement
Some advice not related to what you want. YAY!

I think its a bad idea to try program something when your new without even having your game all the way designed out (all the functinality you want).

It would be much better to start with console version of games in this order
(games that you should know all the rules so you have some direction)
tic-tac-toe
???*
connect-four
Sudoku


Tic-Tac-Toe Psuedu code

App Starts
Clear board ( char board[9] )
Game loop
{
ask user for a move
check for win/lose/cat (end program if win/lose/cat found)
computer AI move
check for win/lose cat (end program if win/lose/cat found)

go to begining of game loop
}
print victory or loss message
end app



*(cant think of the game name - but you move tiles around so they are all in decending order with one block removed so you have room to shuffle them around)
Game board looks like this

A B C D
E F G H
I J K L
M N O

When its completed, other wise its suffled up like

B F H D
M G C N
O A F H
E I J

Share this post


Link to post
Share on other sites
Quote:
Original post by Jamie7823
If actions = functions then functions = swing, heal, defend

What is this supposed to mean?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement