Yesterday I thought that Quake C could be taugh at schools. Most likely secondary education ones. I mean, it is OOP and quite in the spirit of original OOP http://userpage.fu-berlin.de/~ram/pub/p ... kay_oop_en
Quake C has few states entity sets for simulation (model, movetype and nextthink) and few event handlers (think, touch and block). That is beautyfull. I thought that think and touch might be called timer and collision (or onCollision), but it just takes a habit to get used to. I guess that there might be some collisionmodel variable.
Quake C has event handlers where it is connected to the Quake engine :
Plus "only" places it is connected to Quake are these
void StartFrame(); ....
void PlayerPreThink(); ........ name makes sense but it is PlayerPrePhysics();
void PlayerPostThink(); ....... PlayerPostPhysics();
void ClientKill(); ................... GameQuit()
void ClientConnect(); .......... PlayerAdded()
void ClientDisconnect(); ...... PlayerRemoved()
void SetNewParms(); .......... PlayerSaveGame() , it is not regular save game though, but it handles saving of some net parameters, so why not handle event of player saving game ... I think it has been mentioned like
void SetChangeParms(); ..... ???
void PutClientInServer(); ..... ??? I dont know what this one means but thre might be on called LevelChanged() when player finishes level
void main(); ...... I never used this one and I do not know what it is good for
Some of them seems more or less useless to me (liek these which handle parameters ) and I tried to trim these handlers and change names:
Well. If player finishes level and is about to change to new one. What about saving the whole state to a save game? There has been some problems with *Parms handlers because they have dozen floats (?) which are transfered between levels.
On a new level, lot of entites will be destroyed. Of course. But some will remain, like a player. So they can retain some state. There may be problems in what to save and what not, becasue designers would not want some to save ... So I guess it would need a special handler - LevelChanged() and just set what should be transfered and what not or maybe somehow else, I do not know ...
So I came up with these :
void StartFrame(); ....
void PlayerPreThink(); ........ ~ PlayerPrePhysics(); ~ PlayerPreTimers()
void PlayerPostThink(); ....... ~ PlayerPostPhysics(); ~ PlayerPostTimers()
void PlayerAdded .......... when player starts single player or when player connect to a network game
void PlayerRemoved(); ...... if player kills himself or if he disconnects from network game
void PlayerSaveGame(); .......... called when player saves the game (for example : make players experience points lower if he saves )
void PlayerLoadGame();
void LevelChanged(); ..... player finishes or starts level, mark what to save and what not. I guess best would be to say which stuff should be saved.
I think, that it is certailny not complete and I believe that it has to be tested on real kids (end-users) to came up with good design. What You think about it? I think that Quake C is so simple and that we can spread it. And lot of people can program in it, or maybe start programming in it (because making simple stuff is very direct here).
I dont know which data types to save either. Vectors, float and entities are must for any game. But there might be also some dictionaries (maps, hashes), lists (stacks, queues) and arrays.
USE CASE.... animation
I have not made animation in Quake yet so I dont know if its syntax is good. I guess it is. But is it also good for bone/skeletal animation?
USE CASE.... physics
I like dead simple set movetype/solid and physics is simulated. Wee need to gather use cases of physics to make the best one. Because from what I gathered lot of people are remaking Quake Physics a lot.
USE CASE.... saving stuff between levels
Changing of levels. I mean there is Oblivion/GTA with saving some stuff when loading new block of map and entering dungeon. And there is Quake with saving some stuff between levels. I dont know what syntax to make it with. Point is, "get inspired by best way the other games are doing it".
USE CASE ... AI
For example for searching the path.
for example lists are useful for AI to make decision treees and state space search. Well, but one can make special syntax for it. Do You remember frames used for ainamtion, I mean syntax which is special just like this for animations. You know, "this engine is Game ready, so it supports making AI blazingly fast just in your notepad. ".
USE CASE ... "I am new to Quake. I was using Game Maker (or similar) ..."ai wrote: base :
you set variables are in each state : state
you set transition functions which are just "rewriting pairs" : list of (state, state)
you set start and set of goals
= you need some event handlers like there_is_nothing_to_generate (you usually send monster to room it was previously searching for enemy) and ...
= such ai should be made as stepping function it will always offer you new possible moves or it will say it cant ... and you will realize animation of walking or something to fullfil these goals, if you did you just say "continue" to AI and if you failed somehow you may restart or cancel ai
What about these guys. What do they like about GM/similar and what not. Get inspired.
I certainly forgot about some parameters and I do not know how to call tracelines and such, probably prefix them with "quake." or "qc." so one knows they all belong to one package of commands for Quake game. Because there might be differend games QuakeC might be good for, I just think that some other games might take use of it ... and if you would be looking at source than you will know which game it is using !
Well, I dont know ... threre should be barebones but AI and animations need special syntax, so make it barebones too .