Giter Club home page Giter Club logo

adadoom3's Introduction

AdaDoom3

screenshot

Join the chat at https://gitter.im/AdaDoom3/Lobby

NOTE: THIS PROJECT IS MOSTLY INCOMPLETE

The aim of Ada Doom3 is to re-engineer the id-tech 4 engine with a clear dependency hierarchy, and robust tasking systems.

Planned Features:

  • Load and play doom 3 bfg levels
  • Load Valve map workshop levels
  • Native ports for Windows and SDL
  • Input support for XBox 360 controllers
  • Multi-monitor windowing
  • Threaded rendering with Vulkan
  • Responsive multi-player
  • Steam support for user accounts and achievements

Compiling

To compile with GPRBuild:

gprbuild -p -P neo.gpr

Or the Gnat Programming Studio IDE may be used by simply double clicking on the project file neo.gpr once it is installed: http://libre.adacore.com/download/

To compile with GPS click the build-all hammer button after ensuring the scenario drop boxes from the View > Scenario menu are correct.

After successfully compiling press play ▶ to run.

Using Git

Github's tutorial on installing and using commandline git: https://help.github.com/categories/54/articles

Frequent commands:

git init

git config --global user.email ""

git config --global user.name ""

git remote add origin https://github.com/AdaDoom3/AdaDoom3.git

git pull origin master

git pull origin branch

git commit -am ''

git push origin master

git push origin master:branch

Contributing

Begin adding Linux/Mac support by implementing stubbed functions/subprograms

Getting Started

To begin developing for AdaDoom3, first examine all of the “base” system and foundation components in the /Code directory.

Each package in this folder (as all packages in Ada) consists of a specification (ads) and a body file (adb). For clarity, everything but subprogram, package, protected type, and task bodies are placed in the specification (including global variables and private function prototypes) allowing an entire overview of user-important information in one file.

More to come...

Design

adadoom3's People

Contributors

adadoom3 avatar gitter-badger avatar kensan avatar michael-hardeman avatar mulander avatar onewingedshark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adadoom3's Issues

Fix linux build script

Remove perl code from linux build script

[AdaDoom3-linux-x86-64] $ /bin/sh -xe /tmp/hudson7119401552559386359.sh

  • perl -pi -e s/USE_64_BIT : constant Boolean := False;/USE_64_BIT : constant Boolean := True;/g ./Code/neo-foundation-build_options.ads
    Can't open ./Code/neo-foundation-build_options.ads: No such file or directory.
  • make

Libraries

So far I think the project should include the following libraries (as opposed to creating a custom alternative), because the amount of work involved in rewriting AND maintaining is just too high.

  • OGG Audio file reading
  • OGV Video file playback
  • OPIS Speech encoding
  • GTK library (for possible dark radiant rewrite?)

We should have make/batch files for building the libraries and creating binaries of the libraries in the libraries directory (testgenprotectremoval branch) labeled ./Libraries/LIBFOLDER/libnameBITSIZE.dll (example for windows 32 bit ./Libraries/SDL/sdl32.dll)

Accidentally Committed File

I noticed that you (probably accidentally) committed an Emacs backup file to your repository. The file in question is Code/.#neo-system.adb#. I recommend deleting it.

Assembly problems

It might be a good idea to just not allow jump statements at all and break up some of the assembly blocks.

Assembly memory leaks

Program errors are raised in the x86-64 assembly code (https://github.com/AdaDoom3/AdaDoom3/blob/master/Code/x86-64/neo-system-processor-implementation_for_architecture.adb). Probably having to do with the size of passed data structures (lines 65, 260, and 815). Also converting the address calls to access calls should be desired.

This error effects only linux builds for some reason.

==29931== Invalid write of size 4
==29931== at 0x409B2D: neo__system__processor__implementation_for_architecture__initialize (neo-system-processor-implementation_for_architecture.adb:266)
==29931== by 0x40337E: _ada_main (main.adb:147)
==29931== by 0x40330A: main (b~main.adb:248)
==29931== Address 0xfefff8c0 is not stack'd, malloc'd or (recently) free'd
==29931==

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: s-intman.adb:139 explicit raise
Call stack traceback locations:
0x4e51e71 0x57ca49e 0x409b2b 0x40337d 0x403309 0x57b576b 0x403403
==29931==
==29931== HEAP SUMMARY:
==29931== in use at exit: 3,992 bytes in 3 blocks
==29931== total heap usage: 3 allocs, 0 frees, 3,992 bytes allocated
==29931==
==29931== LEAK SUMMARY:
==29931== definitely lost: 0 bytes in 0 blocks
==29931== indirectly lost: 0 bytes in 0 blocks
==29931== possibly lost: 0 bytes in 0 blocks
==29931== still reachable: 3,992 bytes in 3 blocks
==29931== suppressed: 0 bytes in 0 blocks
==29931== Rerun with --leak-check=full to see details of leaked memory
==29931==
==29931== For counts of detected and suppressed errors, rerun with: -v
==29931== ERROR SUMMARY: 128 errors from 1 contexts (suppressed: 2 from 2)

incomplete stack traces

When I compile via commandline (with only -g and -gnat12) on windows I get the following trace

  1: 0043B61F
  2: 00404F12 neo.system.processor.implementation_for_compiler.put_trace
           At neo-system-processor-implementation_for_compiler.adb:40
  3: 0040B19D neo.system.processor.put_trace
           At neo-system-processor.adb:333
  4: 0040AE8E neo.system.processor.test.a
           At neo-system-processor.adb:38
  5: 0040AEA2 neo.system.processor.test.b
           At neo-system-processor.adb:45
  6: 0040AEB6 neo.system.processor.test.c
           At neo-system-processor.adb:52
  7: 0040AECA neo.system.processor.test.d
           At neo-system-processor.adb:59
  8: 0040ACCD neo.system.processor.test
           At neo-system-processor.adb:215
  9: 00404241 main
           At main.adb:34
 10: 0040192B main
           At b~main.adb:333
 11: 004010B9
 12: 004012A6
 13: 74D433A8
 14: 771B9EF0
 15: 771B9EC3

but with the gpr file the trace doesn't have the Test subprogram nested subprograms (a, b, c, d)

 1: 0043B46F 
 2: 00406B14 neo.system.processor.implementation_for_compiler.put_trace 
          At neo-system-processor-implementation_for_compiler.adb:40
 3: 00409929 neo.system.processor.test 
          At neo-system-processor.adb:333
 4: 0040539B main 
          At main.adb:148
 5: 004019C2 main 
          At b~main.adb:336
 6: 004010B9 
 7: 004012A6 
 8: 770F33A8 
 9: 77979EF0 
10: 77979EC3 

Also there always seems to be two -g flags when building

gcc-4.6 -c -g -g -m64 -O3 -gnato -fstack-check -gnatW8 -gnatE -gnata -gnat2012 -I- -gnatA >/var/lib/jenkins/workspace/AdaDoom3-linux-x86-64/Code/main.adb

objectada

Is it possible to make a gpr file work with objectada? If it is not documentation should be found on making an objectada project

Slow tasks

One of the strengths of ada (I thought) was the tasking constructs built in, but apparently using them for a common issue (select MESSAGEA or MESSAGEB else NORMAL EXECUTION) is very slow.

See Task_Input
https://github.com/AdaDoom3/AdaDoom3/blob/testgenprotectremoval/Code/neo-system-input.adb

From
http://www.adacore.com/adaanswers/gems/gem-93-high-performance-multi-core-programming-part-1/
"Worse yet, the asynchronous select statement was the "else part" of a selective accept statement for a rendezvous, all within a loop. Effectively the program was polling in the most expensive manner imaginable. Worst of all, this code was in the worst possible place – the code implementing the primary behavior of the threads. As a vehicle for displaying Ada constructs the design was impressive, but as a demonstration for performance it was not competitive."

Should I continue with my current method, adapt another method, or do some sort of hybrid tune-able with a constant (e.g. DO_USE_FAST_TASKS)? Maybe removing the select statement all together and using the protected types as data pools to handle the messages could be the other method?

won't build on Windows 10 Pro running 32-bit Ada

c:\gnat\2017\bin\gcc.exe -c -x ada -gnatA -gnatE -gnatW8 -O0 -gnato -gnatf -g -m64 -gnatec=C:\Users\byron\AppData\Local\Temp\GNAT-TEMP-000003.TMP -gnatem=C:\Users\byron\AppData\Local\Temp\GNAT-TEMP-000004.TMP C:\cygwin64\home\byron\dev\AdaDoom3\Engine\main.adb
gnat1.exe: sorry, unimplemented: 64-bit mode not compiled in

compilation of main.adb failed

gprbuild: *** compilation phase failed

Compile error in a-comutr.adb

I had to remove this procedure in order to compile AdaDoom3:

procedure put_image (S :

Because it was failing due to lack of with Ada.Strings. I suppose this is the body for a different version of my a-comutr.ads. I'm using GNAT Community 2020 (20200427).

After that it built, but in any case, I could not run it. Apparently my laptop is stacked without drivers for Vulkan, neither from the manufacturer nor from the graphics card. I wanted to report the compilation error, nevertheless.

Linux Implementation

Tried to build on Linux. Am I missing some dependency?

gprbuild -d -P/home/artium/Ada/AdaDoom3/Setup/neo.gpr -XGame=DOOM -XSteam=Yes -XSystem=X11 -XArchitecture=x86-64 -XWordsize=32 -XSafety=Yes -XOptimize=Yes -XDebug=Yes -j2
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 main.adb
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo.adb
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O2 neo-command.adb
neo.ads:456:03: warning: types for unchecked conversion have different sizes
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-game.adb
neo-game.ads:3:06: file "neo-link.ads" not found
neo-game.ads:3:06: "Neo.Game (body)" depends on "Neo.System.Import (body)"
neo-game.ads:3:06: "Neo.System.Import (body)" depends on "Neo.Link (spec)"
neo-system-import.adb:28:03: "Neo" is not visible
neo-system-import.adb:28:03: non-visible declaration at neo.ads:97
neo-system-import.adb:30:14: missing body for "Open_Text" declared at neo-system.ads:92
neo-system-import.adb:30:14: missing body for "Execute" declared at neo-system.ads:93
neo-system-import.adb:30:14: missing body for "Set_Alert" declared at neo-system.ads:94
neo-system-import.adb:30:14: missing body for "Get_Specifics" declared at neo-system.ads:95
neo-system-import.adb:30:14: missing body for "Get_Last_Error" declared at neo-system.ads:96
neo-system-import.adb:30:14: missing body for "Is_Okay" declared at neo-system.ads:97
neo-system-import.adb:35:05: missing "return" statement in function body
neo-system-import.adb:38:22: "Record_Unix_Name" is undefined
neo-system-import.adb:40:12: "Get_Unix_Name" is undefined
neo-system-import.adb:40:42: "SUCCESS" is undefined
neo-system-import.adb:41:17: "System_Call_Failure" is undefined (more references follow)
neo-system-import.adb:44:09: invalid prefix in selected component "Name"
neo-system-import.adb:45:11: invalid prefix in selected component "Name"
neo-system-import.adb:46:11: invalid prefix in selected component "Name"
neo-system-import.adb:46:31: "UNIX_NAME_LINUX" is undefined (more references follow)
neo-system-import.adb:48:16: invalid prefix in selected component "Name"
neo-system-import.adb:48:29: invalid prefix in selected component "Name"
neo-system-import.adb:73:09: invalid prefix in selected component "Name"
neo-system-import.adb:74:11: invalid prefix in selected component "Name"
neo-system-import.adb:75:11: invalid prefix in selected component "Name"
neo-system-import.adb:75:31: "UNIX_NAME_MACINTOSH" is undefined (more references follow)
neo-system-import.adb:77:16: invalid prefix in selected component "Name"
neo-system-import.adb:77:29: invalid prefix in selected component "Name"
neo-system-import.adb:123:15: "Unsupported_Feature" is undefined (more references follow)
neo-system-import.adb:124:16: "DEFAULT_USERNAME" is undefined
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-system.adb
neo-system-import.adb:22:03: file "neo-link.ads" not found
neo-system-import.adb:22:03: "Neo.System (body)" depends on "Neo.System.Import (body)"
neo-system-import.adb:22:03: "Neo.System.Import (body)" depends on "Neo.Link (spec)"
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O1 neo-system-graphics.adb
neo-system-graphics-opengl-import.adb:18:08: missing "body"
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-system-graphics-window.adb
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-system-input.adb
neo-system-input-import.adb:62:09: missing "begin" for function "Lookup_Character" at line 47
neo-system-input-import.adb:88:07: "end Handle_Events;" expected
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-system-memory.adb
neo-system-memory-import.adb:20:03: file "neo-link.ads" not found
neo-system-memory-import.adb:20:03: "Neo.System.Memory (body)" depends on "Neo.System.Memory.Import (body)"
neo-system-memory-import.adb:20:03: "Neo.System.Memory.Import (body)" depends on "Neo.Link (spec)"
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O1 neo-system-processor.adb
neo-system-graphics-window.adb:2:03: warning: subunit "Neo.System.Graphics.Window.Import" in file "neo-system-graphics-window-import.adb" not found
neo-system-input-import.adb:62:09: missing "begin" for function "Lookup_Character" at line 47
neo-system-input-import.adb:88:07: "end Handle_Events;" expected
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-system-text.adb
neo-system-text-import.adb:23:06: pragma Source_File_Name cannot be used with a project file
gnatgcc -c -gnateE -gnatW8 -gnat2012 -fstack-check -gnato -gnatE -gnata -g -O3 neo-system-text-console.adb
neo-system-text-console-import.adb:23:06: pragma Source_File_Name cannot be used with a project file

   compilation of neo-system-input.adb failed
   compilation of neo-system-graphics-window.adb failed
   compilation of neo-system-graphics.adb failed
   compilation of neo-system.adb failed
   compilation of neo-system-text.adb failed
   compilation of neo-system-text-console.adb failed
   compilation of neo-system-memory.adb failed
   compilation of neo-game.adb failed

gprbuild: *** compilation phase failed
[2015-11-07 19:04:29] process exited with status 4 (elapsed time: 15.74s)

Makefile removal?

Since we are relying so much on the gpr to build the project would it be a good idea to use a shell script instead of make?

Also, is it possible for a bash script to download the gnat compiler for the user if they don't have it?

Changing Word_Size has no Effect

Changing the Word_Size parameter in neo.gpr doesn't actually modify the gcc command called by the GPS IDE. So, a 64-bit executable is never created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.