Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Ballistic v0.1


xtal256
 Share

Recommended Posts

Hi, a while back i started a game called "Ballistic". See here for a description of the game and if you want to help.

Anyway, i have a working release:). Not much works yet, only the GUI and Event components, so the buttons actually click (!) but don't do anything else.

Here is a screenshot:

user posted image

 

Download source and exe here and tell me what you think of it.

thanks.

 

@K^2: if you have the time could you work on the XML code you gave me so that it accepts quotes. If you don't have time then i will eventually get to it.

Edited by Haro
Link to comment
Share on other sites

You should add a screenshot or three of actual gameplay. A "Character Selection" screen doesn't say to me wether this game will be worth the download.

 

Imagine if GTA4 had no actual footage or screenshots of gameplay and just released it. Be pretty lame, wouldn't it?

d653p.png

Link to comment
Share on other sites

You should add a screenshot or three of actual gameplay.

I dont have any gameplay blush.gif. Like i said "Not much works yet, only the GUI and Event components", i'm simply showing off what i have done so far in case anyone would like to help me make it (i.e. coding).

I guess i have been a little hasty in calling it a "release", but i'm only calling it that from a development point of view: it's not yet a game but the code works.

Link to comment
Share on other sites

it's not yet a game but the code works.

Allow me to disagree.

 

user posted image

 

Are you using .NET framework by any chance?

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

lol, ok i take that back too! blush.gif

I set /clr with the component mainly because i don't know that much about .NET and so i didn't know what compiler setting to use (MSVC that is). When i took clr off it gave some warnings about incremental linking and stuff but eventually i realised that i didn't need clr so i took it off. It should now run without the .NET framework and since i have added a few GUI features i have uploaded a new version. Click the link in my first post for the new version.

Link to comment
Share on other sites

Nope. Still doesn't work. Same error.

 

Any other libraries you use?

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

As far as i know, OpenGL is the only external dependency (DLL). I use the Allegro library but i statically link that, although your error message doesn't actually say that it's a DLL problem so it might be Allegro. I also use SOIL for loading my images but it's statically linked too.

I googled the error message and found

this. I'm not sure if it will help.

You might need msvcr80.dll and/or msXXX80.dll (C/C++ runtime libraries). Even though i compiled without /clr it might still need those DLLs, i recently had to update them (from 7.x to 8.0) for some app i was using. Oh, that's right, it was for this. The first time i compiled and ran the app i got some error messages (i don't think it was you're error). Anyway, i googled it and found that i had to update the DLLs and also upgrade VS 2005 to SP1 (that's VS's service pack, not Windows').

I have Visual Studio set to "Debug" configuration so i'm not sure if that matters.

Google the error message and see if you can find any solutions.

 

If anyone else can help me with this, that would be great. If i am going to release the game it obviously has to work on other people's machines too! smile.gif

Link to comment
Share on other sites

Oh. Did you compile it as debug or release? I think, something might be entering a "warning" area, and it can't find a debugger. Are there any warnings when you run it on your end? What about during compiling?

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

Hmm, well i get this warning about the SOIL library (which i compiled myself from the source):

 

(During Linking)SOIL.lib(SOIL.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance

 

I needed to exclude msvcrt from linking in Debug for some reason (i think it was what i mentioned earlier) but when I compiled in "Release" and got a ton of link errors (can't find definitions). So i included it and it compiled and linked ok. It ran ok too but crashed when i exited (?)

Here is the exe, it should work ok if you replace the old one in the above download (if it runs at all:))

Link to comment
Share on other sites

Doesn't work for me.

 

"The instruction at "0x00408d21" referenced memory at "0x00000004". The memory could not be "read".

 

Click OK to ... "

 

I really want to test the game smile.gif.

We will be the arms that lift you up oqKntbC.gifWe will be the hand that strike you down

Link to comment
Share on other sites

btw, i can't run it. says that "this application has failed to start because the application configuration is incorrect...."

turn.gif too bad

Link to comment
Share on other sites

Haro, there is a memory leak somewhere. The new EXE crashes.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

 

"The instruction at "0x00408d21" referenced memory at "0x00000004". The memory could not be  "read".

I debugged it in Visual Studio and went to address "0x00408d21". It turns out that it is the code from the SOIL library to load an image:

 

unsigned char *stbi_png_load(char *filename, int *x, int *y, int *comp, int req_comp) {   unsigned char *data;   FILE *f = fopen(filename, "rb");   if (!f) return NULL;   data = stbi_png_load_from_file(f,x,y,comp,req_comp);   fclose(f);       <-- Address is near here   return data;}

 

Maybe it can't find the images, do you have all the image files with the exe? You will have to download the zip file in my first post then replace the exe with the new one from my post above.

 

 

Haro, there is a memory leak somewhere. The new EXE crashes.

Hmm, I will have to check to make sure there are no memory leaks but still should start shouldn't it? When does it crash, and what error message do you get?

Link to comment
Share on other sites

I re-downloaded everything, but it still doesn't work, the same thing. I have 37 files in the img folder (35 image files, 2 readme.txt). Shows the same error.

We will be the arms that lift you up oqKntbC.gifWe will be the hand that strike you down

Link to comment
Share on other sites

Haro, there is a memory leak somewhere. The new EXE crashes.

I fixed the leak. It turns out that it was not what i expected (although, luckily, it didn't take too long to find). When i created OpenGL display lists (for efficiency) i didn't realise that i was creating a new one every time i updated an image, whereas i should have been reusing the same list.

I won't put the new code up since it didn't work for any of you. I don't know that much about the Windows API to know what's going on, i suspect that it's some DLL that it needs but i don't know.

Link to comment
Share on other sites

Hello, again. I have been working on the GUI a bit and i was going to post a screenshot on ImageShack but the server has been down for the last few days. The other day i set up my web page on SourceForge (i had registered for an account a few weeks ago). Anyway, i just realised that i have my own web host so i may as well use it biggrin.gif, below is a link to a screenshot on my website.

Screen shot

I will not bother to upload the exe until i have done more.

Link to comment
Share on other sites

I won't put the new code up since it didn't work for any of you. I don't know that much about the Windows API to know what's going on, i suspect that it's some DLL that it needs but i don't know.

Well, I can try compiling it from sources to see what's wrong. If it's a DLL dependency, I'd be able to find it this way. But I'll be busy the next two weeks. (finals, etc) If you still have this problem then, let me know, and I'll try to find a fix.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

Will do. By then i probably would have done a bit more of my GUI so you can check it out if you get it working. I got a working scrollbar now biggrin.gif

Oh, and if you get the chance could you get that XML code of yours to parse strings.

thanks

Link to comment
Share on other sites

The other day i switched from using Allegro to SDL for some of the game's components. I found SDL much easier to use and within an hour i had got the sound functionality working. This should have no effect on the problems you guys have had running it because there was no working Allegro code in the version i uploaded. I don't think Allegro needed any specific DLLs (since it was statically linked) but all DLLs that SDL requires will be included with the exe when i upload it.

Link to comment
Share on other sites

Why use all these libraries?

 

Use Windows API to handle all user input. Use OpenGL to do graphics. Yes, it can do sprites, so you shouldn't need a single non-OGL call for graphical output. Finally, use standard windows media library calls to play sounds. I would also approve of a lightweight library to load JPEG and PNG images, since these are a bit of a pain to work with. It should be a small library just for loading images, not a general image processing one. But that's it. You shouldn't need a library for anything else.

 

If you keep flooding your program with a bunch of libraries you don't really need, you will keep having all sorts of incompatibility issues. Not to mention, porting will be hell.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

K^2! Do you even know what your talking about! mercie_blink.gif Incompatibility? porting issues? These are exactly the things that you use a game library for! SDL is cross-platform, if i use only that and no Windows API for input (which i am actually using right now) all i will have to do to port it is compile it on a different machine. Why would i use Windows API if i am going to port? And i have never used Win32 sound API but i doubt it's as easy or useful as SDL's. I doubt it can load mp3s either.

 

 

I would also approve of a lightweight library to load JPEG and PNG images, since these are a bit of a pain to work with. It should be a small library just for loading images, not a general image processing one. But that's it. You shouldn't need a library for anything else.

I use SOIL for that. It's pretty good and easy to use.

Link to comment
Share on other sites

Fair enough on the portability. You are not doing yourself any favors, though. Input code is very straight forward on any code. You just need to read the OS messages and fill out appropriate buffers or generate corresponding internal messages. If you look for a library that does everything for you, you a) lose performance, b) introduce new places for bugs, and c) don't learn how to do these things yourself.

 

If you are planning to import MP3s, yeah, you'll probably want a library for that. But you shouldn't be using one for playback. Windows Media lib pretty much just calls your sound hardware, points it to the buffer you set up, and tells it to play. You control everything that happens with the sound. This kind of code can be ported to DOS if you wanted to.

 

In fact, I think it would be a good practice for you to write a few things in pure DOS without using a single library. No, not even stdio.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

If you look for a library that does everything for you, you a) lose performance, b) introduce new places for bugs, and c) don't learn how to do these things yourself.

Fair enough, but i just can't be bothered doing it myself biggrin.gif . I mean, i am writing a whole game, i can't do everything myself. Go to gamedev.net and see how many people are using game libraries. I would like to do low level things (like reading memory buffers and stuff) but it's far easier just to let a library handle all that and all i have to do is call higher level functions to do stuff like play a sound.

There are essentially two types of programmers; low-level engineers that work with assembly and speak only in hex, and the high-level application programmers that design classes with OO and think of the big picture. I am the first kind, but at times i do like to design an OO system with different components, inheritance and all that stuff. When i get to the parts of my game that need to be fast and efficient, i will (try) and use low-level code like using C arrays instead of C++ vectors. But for other stuff, it's far easier just to plug in a component (library) and let it do the work.

Link to comment
Share on other sites

 

I mean, i am writing a whole game, i can't do everything myself. Go to gamedev.net and see how many people are using game libraries.

Not trying to be mean, but you aren't exactly writing a HL2. Games on the scale of Ballistic have historically been done by one person. And back in the DOS days, it was done by using Assembly for graphics and sound. No libraries. Then again, maybe that's why games were good back then. People only spent the time and effort if a) they actually knew what they were doing and b) had a really great idea for a game. Today, it seems, every monkey with a keyboard wants to make a game that all end up having originality of Invaders clone #12098347105 and have just that number of bugs.

 

Ballistic is a good idea. Since devs behind the Worms series decided that they'll make more money on re-making the same over-simplified copy of the game rather than making something new, there haven't been any really new artillery games out there. As for people on gamedev.net, they are the aforementioned monkeys. Not all of them, of course, but the majority. I stopped going there after I figured out that I can get more information out of Microsoft Developer's Network, and that in itself is just scary. I mean, Microsoft, being useful. What's next? Windows that actually works?

 

I've been wanting to make a good tactics/artillery myself for a long time. Even had a 2D bump-mapped lighting engine written for it. Just never had the time to do it right.

 

Edit: Re-reading all that made me feel old. Apologies for all the negativity.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

...I figured out that I can get more information out of Microsoft Developer's Network, and that in itself is just scary. I mean, Microsoft, being useful. What's next? Windows that actually works?

lol.

 

 

Edit: Re-reading all that made me feel old.

Yes, i got that impression. You are the 1st type of programmer i mentioned, and that is good. You try to do things as simple and efficient as possible. And i like that too, but it would take me twice as long to make my game if i had to learn how to do all the basic stuff, by the time i got it completed, all the code would be obsolete. I plan to code up most of the game myself but i leave system interface stuff to the libraries.

And like i said before, the library takes care of porting so if i want to port to Linux, all i have to do is built the library on Linux and compile my code. It would take me years longer to actually learn Linux/unix programming (The Art of Unix Programming, look how long it is) and write the necessary code to run my game on Linux.

Link to comment
Share on other sites

Ok, here is the latest version. I have uploaded source code as well as exe so if it doesn't work and you have Visual Studio you can try to compile or debug yourself.

Link to comment
Share on other sites

Edmachine

Ahh... it still doesn't work. I get the error that K^2 posted in his first post here. And I don't have VS, so I can't compile/debug it.

We will be the arms that lift you up oqKntbC.gifWe will be the hand that strike you down

Link to comment
Share on other sites

Ok, here is the latest version. I have uploaded source code as well as exe so if it doesn't work and you have Visual Studio you can try to compile or debug yourself.

Any chance you could get VS to export a makefile? I don't want to have to install VS just to see which .cpp files and static libraries you are linking.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

Any chance you could get VS to export a makefile?

Not sure about that but you could look in the .sln and .vcproj files. Somewhere in them is a list of .cpp and link files.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.