Is your complex gamemode keeping you up at night w/ maintenance?
#21

Depnding on my motivation and free time I usually work on the gamemode for like a week, then it sleeps for 3 weeks or more and so on. During that time i often fall into scripting rage, scripting and testing all night.

Coming back into the script never has been a major problem for me, even after some months of pausing. Single choerent sections are split on single files in a very intuitive way. This is the best way to organize big and complex scripts in my opinion. Putting everything in a single messy file with 50k+ lines is just stupid and pointless. Even scrolling to a specific line gets annoying.
Reply
#22

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Depnding on my motivation and free time I usually work on the gamemode for like a week, then it sleeps for 3 weeks or more and so on. During that time i often fall into scripting rage, scripting and testing all night.
Recognizable.

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Single choerent sections are split on single files in a very intuitive way. This is the best way to organize big and complex scripts in my opinion. Putting everything in a single messy file with 50k+ lines is just stupid and pointless.
I have lots of different stuff in a folder structure too, although it's become quite messy now.
pawn Код:
#include "../src/def/enum/player/flags.txt"
#include "../src/def/enum/player/timers.txt"

#include "../src/def/enum/global/textdraw.txt"
#include "../src/def/enum/global/checkpoints.txt"
Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Even scrolling to a specific line gets annoying.
CTRL+G is your friend.
Reply
#23

Quote:
Originally Posted by Vince
Посмотреть сообщение
CTRL+G is your friend.
Of course, but i find it way more comfortable just to scroll to the section in a 1k lines script, than typing the lines all the time
Reply
#24

Quote:
Originally Posted by Vince
Посмотреть сообщение
Recognizable.


I have lots of different stuff in a folder structure too, although it's become quite messy now.
pawn Код:
#include "../src/def/enum/player/flags.txt"
#include "../src/def/enum/player/timers.txt"

#include "../src/def/enum/global/textdraw.txt"
#include "../src/def/enum/global/checkpoints.txt"
I do the same thing,
but not as split up, I don't do enum's in one and defines in another,
I more or less do it by features/or sub systems, eg Users, Vehicles, Jobs, Fractions, ect...
with a core file for db, and core gamemode code that will not be added/removed

I tend to make my most of my includes optional drop in's
most of my includes can be added/removed without
changing any code anywhere. This allows me to change a feature or sub system without needing to
touch any other file.
Reply
#25

Interesting.

Quote:
Originally Posted by Joe Staff
Generally, I'll get far enough into a project where I feel that completely starting over will help with optimization. This may sound like it would take forever, which it does, but the second time you do something new you are far more aware of how the process works and thus are able to plan ahead enough to optimize it.
I couldn't agree more. When I began designing games in C a few months ago, memory leaks were one my biggest concerns/issues. You wouldn't want something consuming memory to not be destroyed when it's finished being used right? Sure I could have simply modified the code, but I also noticed how many unnecessary and unwanted things were being used. I can't even count how many times I've redone some projects over that and many other issues.

cessil also brought up a most interesting statement.

Quote:
Originally Posted by cessil
Also doing basics first allows a better understanding of how your plan will turn out and will allow you to change things around without too much effort or time consumption.
There is no doubt about this. My observations of this forum has lead me to think that many people believe that petty concepts such as "creating a command" and etc is key to PAWN. PAWN is a brilliantly designed scripting language. It's C like syntax allows programmers such as my self who are mainly C oriented to grasp the concepts quickly and effectively. For those who aren't multilingual or have never even dealt with programming NEEDS to read. And I'm not talking about the wiki on the forums, but pawn_lang.pdf. It explains PAWN in great detail. The main focus of people on this forum is to create a server, but this requires time and precision. You must understand what your dealing with, how to utilize it and utilize it EFFECTIVELY. Once you've done that, the rest is cherry picking.

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
well I kinda agree with you y_less, using libraries is important
But sometimes these libraries are too complex, and when something mess's up
we cant fix them/our code as we really not sure how this library works.

I was making a mode from scratch using some libraries, YSI was one of them,
I ran into trouble in that mode for a few reasons,
I'm not experienced enough yet with PAWN,
I'm not experienced enough yet with YSI,
Libraries aren't as complex as you sought them out to be. You only use it if you need something from it. YSI in particular is humongous. Anything can't go wrong unless the code is improper and code is only improper as the one whose coded it. There is documentation about YSI. You CAN fix the code yourself, but many people prefer to come on the forums and request help and that's fine as this is one of the purposes of the SA-MP Forums.
Reply
#26

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
And coding a mode from scratch is the WORST way to optimise! I say this over and over and over again - use libraries!
It has become the norm around here to create your mode "from scratch" unfortunately. Every time a new person comes on here, they will constantly be bombarded with the fact that you must create your gamemode "from scratch", when you really don't need to do that.

Why don't you save time and gain efficiency by using the libraries already released on the forums, there's no need to create what has already been created from scratch again. If you think the library you are using is not good enough, then make a better one and release it or suggest the changes to the author.

I think one of the core issues is that people don't particularly understand basic programming and they just jump straight into it, so they aren't going to understand what the point of libraries are or how to make use of them. For example, when someone on here wants to replace a piece of text within a string with another piece of text, their instant reaction is to try to do it themselves. If that doesn't work, they go on the forums and ask how to do it. They don't go "oh, I need a string replace function, I wonder if there is a library out there that provides it". Which is what most proper programmers would do rather than spend time trying to create their own, when someone has already purposely built an efficient library for that purpose.
Reply
#27

@ JaTochNietDan

I am struggling to understand your point, i know using libraries like YSI provides efficient techniques to code your stuff, but were talking about samp script's, the majority of it is coded in the basics of pawn, yes a fast command processor and a reliable ini file system better accessed by a library, but at the end of the day your coding the main from scratch(Unless your clearly editing a script, which is not a "bad thing")

@ Y_Less

I cant begin to explain how i agree with you now, and didn't before.

@ Disturn

Well said.
Reply
#28

Quote:
Originally Posted by warcodes_
Посмотреть сообщение
@ JaTochNietDan

I am struggling to understand your point, i know using libraries like YSI provides efficient techniques to code your stuff, but were talking about samp script's, the majority of it is coded in the basics of pawn, yes a fast command processor and a reliable ini file system better accessed by a library, but at the end of the day your coding the main from scratch(Unless your clearly editing a script, which is not a "bad thing")

@ Y_Less

You cant begin to explain how i agree with you now, and didn't before.

@ Disturn

Well said.
Yes we are talking about SA-MP scripts, but that's not a reason to code the entire thing from scratch. If you're talking about the core gameplay, then yes, you code that from scratch using the libraries available to you. You do not code the entire script from scratch as there is no point, there are a ton of libraries already available to do that for you such as the ones you mentioned.

That was my point.
Reply
#29

Quote:
Originally Posted by warcodes_
Посмотреть сообщение
Why would you want to look at the old sloppy code? When you can play it(Which you most likely have) and then innovate it.
I'd rather read it, then go through endless compiling (Almost every string cell size in the GF is 256...)
It makes me feel like I'm reading a history book. The GF was the most popular mode of its time afaik.

But it does help to play it in order to understand it.
Reply
#30

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
If you come from c then it would be easier to get, but say coming from visual basics 6.0
would have thought me next to nothing, besides maybe what a routine/sub routine is
working with database's and that kinda stuff , basic math operators, these kinda things are common in
most languages. Now if id come from c# id be in the same boat, but have a better understanding of
the syntax of pawn and probably more of the operators.! I'm just trying to general speak for the novices, not
that i consider myself one, but i'm not far from it.

So someone like me is stuck in Read Only mode for allot more time.
This wasn't the point I was getting across though. Regardless the language you came from, your still learning. In C++, the new operator is used in memory allocation (malloc func in C) and when I got into PAWN I realized it was used to create a variable. So as I say again, your still learning. People who put more effort into what they enjoy will achieve a greater product.
Reply
#31

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
I've always wanted to re-write the GF line by line with more modern techniques.
Same!
Reply
#32

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
Same!
... same, actually.


I started on it too, but then I was like... "meh"
Reply
#33

Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
... same, actually.


I started on it too, but then I was like... "meh"
It shouldn't be too difficult. Hell, Calgon basically made an over-hauled Godfather, but the fact that it isn't just ruins it for me.
Reply
#34

I couldn't of said it any better frankly.
Reply
#35

Quote:
Originally Posted by spookie
View Post
IMO:
1. Get it working.
2. Optimise.
3. Prettify.
Thats pretty much exactly how I treat my women too!
Reply
#36

Quote:
Originally Posted by Joe Staff
View Post
... same, actually.


I started on it too, but then I was like... "meh"
Quote:
Originally Posted by Y_Less
View Post
Same!
Same! I was going to call it "Godmother" but I thought it sounded a little gay. I made a login, registration and report system, I didn't get very far with it. It would be pretty cool to do if someone had the time though, but for now I'll stick to releasing new versions of Vortex every once in a while.

Quote:
Originally Posted by VincentDunn
View Post
It shouldn't be too difficult. Hell, Calgon basically made an over-hauled Godfather, but the fact that it isn't just ruins it for me.
I'm probably going to make the next version (3) a lot more like Godfather, in the sense that it's simple to play.
Reply
#37

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
Same!
Welcome to the club of 1 million other people who are waiting for something like that to be released in the Gamemodes section!

Anyway, I've had a server, don't want to have one any more. It kept me busy and now I see things in it that make me want to grab a Time machine from Rac3r and just slap myself.
Reply
#38

Should've known about the comments earlier, if I'd take a look at the cowly cow, for example, I'm totally mindfucked on what does what.

o epic bump i sees
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)