Quake3World.com Forums
     Programming Discussion
        Various troubles. Any kind of help will be good.


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Various troubles. Any kind of help will be good.

Warrior
Warrior
Joined: 13 May 2012
Posts: 90
PostPosted: 04-10-2013 02:04 PM           Profile Send private message  E-mail  Edit post Reply with quote


Ok, as far you know from...one year i think... my goal is to merge all the best mods of q3a. Freezetag, CPMA, osp etc...

I'm not a good debugger or programmer so i still got a lot of problems.
I will try to use only this topic in order to not fullfill the forum with my questions.

So let's begin:
1. I'm trying to add "on hud" the current time, everything looks so simple also because inside the game there's time.h ... but for some strange reason it doesn't work. One thing i hate on all quake (this is a feature i want for my own) is that i can't see realtime on my hud, so still playing, the current time. When i was young isn't a problem but right about now know if there are the 01.00am or 04.00am when i need to wake up at 05.00am in order to work can be very good.

2.There's a debug or log command or cvar in order to record anything on my game? I create a lot of new gametypes but with one (a CTF based one) my game crashes at random (so probably i made a mess with the code). Any clue in order to get detailed info about what's happend?

3.I'm trying to add a gameplay similar to Clan Arena or Rocket Arena;
A. i need to create the READY command before the warmup...can i use the one from intermission or it's better if i create a new player state?

for now that's all...i'm trying to make little steps...for now the most annoying trouble i get is the CTD i got with the CTF gameplay. It's like an Instagib CTF so probably the mess is about something i commited out (like powerup spawn etc...)

Thanks again. Any direction will be good for any kind of these troubles.
If you need more detailed code or stuff just write here. I will be glad to share it. For what i do, the only uncleary code on Instagib CTF is about the spawn and respawn. I repeat all the gameplay looks and works good, but i got random crashes on desktop. So, for sure, it's something i coded wrong somewhere.




Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 384
PostPosted: 04-10-2013 11:36 PM           Profile Send private message  E-mail  Edit post Reply with quote


1. There's a trap_RealTime system call for cgame and ui. You can store the data in qtime_t as follows:
Code:
qtime_t      time;

trap_RealTime(&time);

Now if you type in "time." it'll show you a list of members such as tm_hour, tm_min, tm_sec etc that you can use to compile a time string.

2. g_log <file name>. Being ioquake3, it will save to your %appdata%/HOMEPATH_NAME_WIN folder

3. If you can find a way to use that then why not? I created a new one myself... added a readyToBegin boolean in gclient_t which toggles with a new command in g_cmds.c, checks the ready statuses of all non-bot players in g_main.c which then creates a ready mask cl->ps.stats[STAT_CLIENTS_READY] to communicate all ready statuses to clients and returns true or false to the warmup functions to say whether the match should begin or not.

You created a new gametype for insta CTF? Why not just add a g_instagib cvar? All it does is alter the damage, item spawns and starting weapons. It's not a new gametype all on its own...




Top
                 

Warrior
Warrior
Joined: 13 May 2012
Posts: 90
PostPosted: 04-12-2013 03:35 AM           Profile Send private message  E-mail  Edit post Reply with quote


Thanks as ever muffin!
It's something i hate can't know what time is it when i play.

Yes i created both things: a GT_game for instagib related ones and a cvar in order to set instagib also a normal match.

so with trapRealTime i will got all the time infos inside "time" that are stored as tm_hour, tm_min etc...

can i set some vars with tm_ etc... and create a char var = va("%i,%i",var with tm_hour,var with tm_min) and use it in a draw function?




Top
                 

Warrior
Warrior
Joined: 13 May 2012
Posts: 90
PostPosted: 04-13-2013 04:03 AM           Profile Send private message  E-mail  Edit post Reply with quote


that's exactly what i want to add, a realtime clock in order to know what hour's =) i'm checking it right now.
Nice stuff the 4 players split screen!




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.