Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

Tribad

Member Since 03 Jan 2012
Offline Last Active Yesterday, 06:20 AM
-----

#4997480 How were Commodore 64 games developed?

Posted by Tribad on 05 November 2012 - 01:53 AM

Commecial development has been for sure be done with Macro Assemblers, and compilers for programming languages like PASCAL. If I remember right there was an BASIC compiler available that gives good results. Mainly the assemblers and compilers are split into parts and loaded in background from a disk (160kb single sided 5 1/4 inches), wenn needed.
Think of the memory constraints that you have on a C64. Even if you turned off the BASIC ROM you allways had less than 64kB for your program and data.

Writing an assembler program and translating it by hand was only a time consuming thing. If you have done this some time you know the instruction codes by value and it was easy to read and write them. Reading could be interesting if you had some assembler code and wants to know what they do in there (reverse engineering). It was easy.

Accessing the hardware was even easy, because you had no restrictions while accessing. The hardware registers where all memory mapped. So you only needed to know the address and then you could manipulate the functions of the hardware at will.

Funny time


#4971552 Handling disconnections with multi-threaded

Posted by Tribad on 20 August 2012 - 11:46 AM

I used a timestamp to identify the connection a message is comming from. So if a user disconnects and connects very fast it is possible to identify that a message that should be send to the user is related to a connection that does not exists anymore even if it is the same user. This is a scenario for a web-server where you hold down the reload button.
The web-server gets a request the networking thread processes the incoming HTTP-Request and sends the already parsed request to the loader stage.
While the loader prepares the answer the closing happens and the loader sends a document for a connection that does not exist any more. The communication stales at some time.
The timestamp gets imporant because the memory management may give you the same pointer for the same client but for a new request. If the answer from the loader stage arrives you do not know whether it is for an old request of for the new one.
The sender drops the message if the timestamp in the loader stage answer message is not the same as the timestamp of the connection.


#4966305 C++ Thread safety

Posted by Tribad on 05 August 2012 - 02:49 AM

Haha, I wish I didn't have to share data between the threads, but I do Posted Image

I think I understand what you're saying, and that might just work out. I would still have to synchronize the data, but what you're saying could work better. Well, to think of it, I am using OpenGL to render. I actually have to set the context in the thread to the OpenGL one at initialization. It would be somewhat wasteful to set the context of each thread in the pool.

Hodgman is right with his answer.
If data must exist in another thread, make a copy.
I created a messaging system for my own applications to achieve that. In my approach the only thing that gets shared between threads is the message queue. The messages define the information flow in a strict way. So the overall system gets more structure.


#4959218 Header Guards

Posted by Tribad on 15 July 2012 - 03:03 AM

You do not have modern compilers in all environments e.g. embedded systems.


#4953948 Segmentation Fault When Calling Draw Function

Posted by Tribad on 29 June 2012 - 07:24 AM

This looks strange.
The this-pointer is an implicit parameter that you cannot see normaly. The this-pointer seems to be wrong. So you have no Entity2D object where you can call the draw method on.
This would think that something long before the crash goes wrong.


#4947062 I must be doing something wrong (slow development)

Posted by Tribad on 07 June 2012 - 09:13 AM

I read a study somewhere that at a large software company, the most productive programmer was more than 60 times as efficient than the least productive professional programmer. I find this very plausible.

This may be.
Another interesting measure. Even a good software engineer does not produce more than 25-50 lines of code per day, that is tested and works and is robust. This means has proper error handling and reactions.
With small systems around 2k-5k LOC this maybe a bit more. But the more complex the software grows the more you come to the 25 lines per day.


#4947011 I must be doing something wrong (slow development)

Posted by Tribad on 07 June 2012 - 05:16 AM

I think you can create large programs even with only some classes and inheritance.
It is more a question of the overall structure.
You can even do object oriented programming in C. But then you are forced to manage the encapsulation of methods and attributes by yourself and this allows you to ignore the rules at will.
C++ helps because of the language constructs that helps you in staying object oriented all the time.


#4946829 SDLNet - Disconnect on Recv(...);?

Posted by Tribad on 06 June 2012 - 12:20 PM

As I said before. You do not analysed the traffic.

This only makes it a better guess.
Between you clients and the server you have the TCP/IP stacks of two machines and the wireing between them. Or if they run on one machine you even have the TCP/IP stack between the two application and the operating system anyways.
If you have a hardware with multiple cores running you have parallel execution of the two applications. That a lot of stuff. And as long as you do not check the traffic between your clients and the server you are only guessing.

You are seeing misbehaviour and you do not have a clue whats wrong. So you worry about whats wrong but you must prove your result. This is how failure analysis is done. And while developing software you will do this all the time. If you are not proving your idea about the failure you cannot exclude things.

What you are doing right now is excluding without knowledge. This is fatal and not best practice.


#4945613 C++ tools that are new to you

Posted by Tribad on 02 June 2012 - 11:24 AM

OpenAmeos
ArtisanStudio

Both powerfull UML-Tools that allow you to completly define what kind of output you want. No development without them.


#4945348 How to manage code ?

Posted by Tribad on 01 June 2012 - 10:26 AM

Use UML.


#4944678 UML IT infrastructure

Posted by Tribad on 30 May 2012 - 08:04 AM

Maybe you should have a look at OpenAmeos UML-Tool.
The Tool stores the meta model in a database and the tool itself is completly independent from something like the UML-Meta-Model.
AFAIK it is based on Software-Through-Pictures from Aonix.
If you download and install the UML-Tool you get a lot of documentation about how it works and you get all scripts that make up the UML-Tool with it.
The UML-Tool has been created with a lot of scripts that define how the data should be handled.

Have a look at it. Its a funny flexible system


#4944614 How to detect abnormal user disconnection almost immediately

Posted by Tribad on 30 May 2012 - 04:03 AM

In my own web-server I have a time of 1 second for the first byte to receive and 5 seconds to complete the HTTP-Request.
If these are not met the connection gets closed.

This way someone must send about 60000 connects within 5 seconds. This is hard to achieve.


#4943989 UML IT infrastructure

Posted by Tribad on 28 May 2012 - 07:02 AM

I am doing most work with UML.
But I will not use IBM Rhapsody, former Rational, because this tool lacks a lot of features I need.
Whenever it comes to questions why UML is not used in software development I am getting the same answers.

These are the highlights:

- we are developing in C (not object oriented)
- code generation does not what I want.
- I can use any graphics tool for documentation
- refactoring can be done in eclipse easily aswell.

I am doing development in C and C++ as well and using UML all the time. Code generation works for me perfectly and not only creates the code but also the build files.
Shure. Any graphic is usable as long as everyone understand what you are thinking. Using a standard way of descibing something as pictures makes software more understandable.
Refactoring with an UML-Tool even means restructuring. Moving classes around, re-connecting dependencies and all such things. This is hard to realize with a eclipse only environment.

I am a fan of UML. But there are only a few tools that hit my feature list. I am fast even with small systems. And always have the possibility to create documents from the tools.


#4938048 #define doesn't work

Posted by Tribad on 07 May 2012 - 06:36 AM

@はとぶ:
You can set defines on the compiler command line. This way they are defined before any file is read. But anyways must be defined for all source files where HELLO must be defined.

@gamepopper:
No. In this case its the same.


#4921680 New to C++, could I get advice? (switching from C#)

Posted by Tribad on 13 March 2012 - 10:28 AM

I started software development in a time where MS state of the art compiler was the MS C-6.0 Compiler. I learned C++ software engineering with the next generation Compiler MS C/C++7.0 compiler and since than I never stopped developing software in C/C++.

Both languages C and C++ gives you a huge variance in how to organize your code, how to organize your data structures and many other things that make up the development of a software system. But on the other hand the same variance gives you the possibility of misunderstanding concepts of these languages.

I found that only a few C/C++ software engineers are able to create easy to understand and easy to maintain systems. But these few are doing nothing else than developing software architectures and the basic structures of software systems the whole day.

So I think, if you do not want to learn C/C++ for the next years every day again and again, you should start with some other language.




PARTNERS