Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: I need a turn system  (Read 3609 times)

0 Members and 1 Guest are viewing this topic.

shiverbob

    Topic Starter


    Beginner

    Thanked: 1
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
I need a turn system
« on: July 25, 2014, 01:48:52 PM »
With my saving problem fix. I need a turn system for my game that I am in the middle of and it needs a turn system for it work. Any help I will try
Thanks a million
Pff computers are easy, math is hard.

Allan

  • Moderator

  • Mastermind
  • Thanked: 1260
  • Experience: Guru
  • OS: Windows 10
Re: I need a turn system
« Reply #1 on: July 25, 2014, 02:09:09 PM »
You need to turn a system? What does that mean? And what do you mean your "saving problem fix"?

If English isn't your first language that's fine, we're happy to work with you - but I really don't understand what you're trying to say.

shiverbob

    Topic Starter


    Beginner

    Thanked: 1
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: I need a turn system
« Reply #2 on: July 25, 2014, 02:19:10 PM »
What I mean is a turn system like the civilization games and ignore that part about the saving stuff
Pff computers are easy, math is hard.

Salmon Trout

  • Guest
Re: I need a turn system
« Reply #3 on: July 25, 2014, 02:27:37 PM »
Maybe he wants to implement a scheme for different players to take turns?

Shiverbob, you MUST TRY HARDER to be clear.


shiverbob

    Topic Starter


    Beginner

    Thanked: 1
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: I need a turn system
« Reply #4 on: July 25, 2014, 02:37:32 PM »
1 player it is a city builder game. Everything take turns research building
Pff computers are easy, math is hard.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: I need a turn system
« Reply #5 on: July 25, 2014, 09:13:01 PM »
Clear as mud...
" Anyone who goes to a psychiatrist should have his head examined. "

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: I need a turn system
« Reply #6 on: July 25, 2014, 10:13:13 PM »
He can use Google Translate.
https://translate.google.com/

shiverbob

    Topic Starter


    Beginner

    Thanked: 1
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: I need a turn system
« Reply #7 on: July 26, 2014, 10:17:09 AM »
this is what I meant it 1 player. There are no others. The game runs like civ and the building and the research all the this many turns. I have no idea how to make a turn system where things count down until that many turns are done and your building or research are done. I will try to post the code tomorrow and btws I born in kansas. I can't spell well.  ;D
Pff computers are easy, math is hard.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: I need a turn system
« Reply #8 on: July 26, 2014, 12:30:52 PM »
My thoughts on this are that its best to learn a programming language and process a turns counter in which if the number of turns reaches certain intervals you can trigger other events to happen in the game. You could even have an Easy, Normal, and Hard Mode in which the easy mode gives more turns before events trigger that are likely events that are bad that you have to fend off a problem etc, and normal mode having fewer turns than easy for the initial construction period, and hard mode being even fewer turns in which you really need to know what to make in what order to be able to sustain against the attack etc.

Curious as to this games visual construction.... in batch etc?

Are you happy with it being an ASCII based character constructed game or will you be creating a real graphics generated game which can be done in a number of many languages out there such as C or C++ or even simpler to call bit maps from within the code vs constructing each pixel placement etc?

I'd suggest not doing this in batch unless you are doing this as a fun way to strengthen your skills in batch, however the limitations of batch may be frustrating.

I have made games before in batch and hit walls that otherwise wouldnt have happened in creating the game within a true IDE such as C or C++.

If you are working with a DOS system even QBasic offers much more than Batch alone. Also the cool thing about QBasic is that if you know the older line number Basic programming you can code in QBasic in a legacy format of what normally would have been in GW-Basic format and the games will run. However if wanting to make a modern like game, I'd suggest C++.

If you are not good at creating graphics, another method of making turn based games is to make the game with HTML and a Scripting language such as Java Script, in which the Javascript handles the logic and the browser is used to display HTML web pages with text and pictures, in which you can create or use already created pictures called thru the javascript to display. Many Many turn based online games have this same layout of dynamic text and images that are called to fill the browser window, however they go beyond JavaScript which is ( Local ) logic and the logic instead is server side of the web server serving up the dynamic web page to the many connected players with player accounts.

For the fact that you seem to be part way through a project I am eagerly awaiting your construction methods and execution of this game that you are making.

Lemonilla



    Apprentice

  • "Too sweet"
  • Thanked: 70
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 7
Re: I need a turn system
« Reply #9 on: July 27, 2014, 08:56:35 AM »
I believe he's looking to create a turn based game, such as chess.  The thing he's having difficulty with is a turn counter, which would count down the turns until something happens.  Here would be an example of how I would do this:

Code: [Select]
set turn=0

:turn_start
set /a turn+=1
REM This is the playable turn



REM this is the AI part



if %turn% EQU %VAL% REM something happens
goto :turn_start
where VAL is the turn number that the thing would happen on.
Quote from: patio
God Bless the DOS Helpers...
Quote
If it compiles, send the files.

shiverbob

    Topic Starter


    Beginner

    Thanked: 1
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: I need a turn system
« Reply #10 on: July 27, 2014, 12:45:55 PM »
Thanks but that's not the problem. I don't know how to make it where if you click next turn everything counts down until however long it said it would take it would be done or build.
My game just needs a turn system to work. Its kinda like civ but it is one player and no ai. You start with one building and you build stuff from there and you progess by researching and building stuff. I am tyring to help u guys understand but I don't know how to explain it. And I really don't want to make it with javasrcipt and html. Plus I don't want to learn anything new right now. My little head can't take much more. :P


If I did the "if" command and have set the build times in the place where you build stuff it wouldn't work because it says if "%libbt%" == "5" (
set /a libbt-=1
)
if "%libbt%" == "4" (
set /a libbt-=1
) it wouldn't work because it would just go down then in one turn instead of five you would have a libary
« Last Edit: July 27, 2014, 01:01:28 PM by shiverbob »
Pff computers are easy, math is hard.

Lemonilla



    Apprentice

  • "Too sweet"
  • Thanked: 70
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 7
Re: I need a turn system
« Reply #11 on: July 27, 2014, 02:57:32 PM »
try reversing the order,
Code: [Select]
if "%libbt%" == "4" set /a libbt-=1
if "%libbt%" == "5" set /a libbt-=1
That will make only the last one true, or you can make an if else tree:
Code: [Select]
if "%libbt%" == "5" (
set /a libbt-=1
) else (
if "%libbt%" == "4" (
set /a libbt-=1
) else (
if "%libbt%"=="3" (
set /a libbt-=1
)
)
)
Quote from: patio
God Bless the DOS Helpers...
Quote
If it compiles, send the files.

shiverbob

    Topic Starter


    Beginner

    Thanked: 1
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: I need a turn system
« Reply #12 on: July 27, 2014, 06:00:43 PM »
Thanks I didn't know you could do the else tree. But it work thanks everyone
Pff computers are easy, math is hard.