Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run problems
#1
when i try to test my game out I save it then go to run it and it will flash up then disappear. it makes the game but doesn't run it. any ideas as to why?
Huh Confused Huh
Reply
#2
No, can you show what you are doing? Some code or the game to compile to see what is going on?
Reply
#3
(02-01-2019, 09:14 AM)cvirus Wrote: No, can you show what you are doing? Some code or the game to compile to see what is going on?

this is the code. its for a GLOOM game

import "gloom.lib"
import "Keycodes.lib"
import "Speed.lib"

set redraw off

if not GLOOM_Init(75.0, 640, 480) then end

if not GLOOM_LoadMap("my_map.txt") then end

load image 1, "my_wall.png"

_GLOOM_InitMap GLOOM_LoadedMapWidth(), GLOOM_LoadedMapHeight()
_GLOOM_BuildLoadedMapWalls

playerX# = float(GLOOM_LoadedMapWidth()/2)
playerZ# = float(GLOOM_LoadedMapHeight()/2)
playerAngle# = 0.0

do
    if keydown(VK_LEFT)
        playerAngle = playerAngle - 2.0
    endif
    if keydown(VK_RIGHT)
        playerAngle = playerAngle + 2.0
    endif
    if keydown(VK_UP)
        playerX = playerX + cos(playerAngle)*0.04
        playerZ = playerZ + sin(playerAngle)*0.04
    endif
    if keydown(VK_DOWN)
        playerX = playerX - cos(playerAngle)*0.04
        playerZ = playerZ - sin(playerAngle)*0.04
    endif
    _GLOOM_PushOut playerX, playerZ, 0.3

    set color GLOOM_FogR(), GLOOM_FogG(), GLOOM_FogB()
    cls

    _GLOOM_Render playerX, playerZ, playerAngle
    redraw

    _SPD_HoldFrame 60    
until keydown(VK_ESC, true)
I'm new and i have A LOT of questions.
Reply
#4
You are getting into the hard stuff. The problem you are having sounds like NaaLaa can not find your map file.

 I found a map file that works with your code and a map editor that I have not tested yet. I hope it helps.


Attached Files
.zip   GloomTest.zip (Size: 808.08 KB / Downloads: 2)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)